From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 691233BE17B for ; Mon, 27 Jul 2026 04:24:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785126250; cv=none; b=tasG4Eiqdnr0GZVlP4hQ59Ri02ihGtemlNEoJvMT9rIeJ67yNOBE0cGK2q2D+J1yI7MD3ON7chqagvf8qkifdf27B+sGhcYQuRMr+ucRejqSUtsGeV4/eg1gT/GSn4V0tHmFyIQRobczes4aAITvtNgQhNkpBDbsVGyMjYebRYI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785126250; c=relaxed/simple; bh=Yy8IISh+FV9cpGipg7vORYQVek5AJgkZkfEGn4HmLng=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hC354dPbpabuY1KKOZwFSs8U/6NA0RaI69DPZSuS5sldh5srytvjreutfEyg5ZOsFznfYnLsDJ6P8U9DtSSsF42fIF2Lo8SSOfQ1/4I5mID7to3caaj8V7CpcrD14H+O2do6mMgzVegTb7t6aXMEbn9nHwBra4nC4AYJC+OkLfo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=SMek3enj; arc=none smtp.client-ip=209.85.216.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="SMek3enj" Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-383cb94f742so1831340a91.3 for ; Sun, 26 Jul 2026 21:24:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1785126249; x=1785731049; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=Yy8IISh+FV9cpGipg7vORYQVek5AJgkZkfEGn4HmLng=; b=SMek3enjC0QcceEKJ2YigUQLSZxXK7+3z6wbSBE/YJ128mSWeXKUEkGpJll+RTWWtw /vKU0ZiDRC8OHKtfMeT8GTe6dzMdnug7Ok6gdGqtwM+xHmvI+TVxw6Vi9q8q2Kq8thSm 859oqd4WyfYkZK3Q5k8HJh10d9doqxgDT7tZvzcsSQGe/vQ+Dp/WbzTbEM5F9xlLtxPK HQokyFrZrWN+X+e0zfTp2B5sRCWfyn7Pg9tGxZBzvbv/1mAidlwP6OvFsaW92kp6X5ug jDwyIupoid8bEpOHpM7LnCe6/bsGE2HvunMDWy8D5teCbmJQ9d6eLfQY2n8QmYQOGi+2 n10Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785126249; x=1785731049; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Yy8IISh+FV9cpGipg7vORYQVek5AJgkZkfEGn4HmLng=; b=ZbsoEkeSMJQJ4AvcSM55y7u3/mvrQ59d7CQBUiBGjw/1Cq3maEQLlZmbNkhJC2t9Jo 7JEKXtws7wMScj6JTinAIX+OptvNAB+y0FVeeYvlqXl5UH9QNHm6cFziJOF5eUe1tmBO C5c9H0zSWLhFBpCg+mN1dIgvT8v3XAU87lS1bHSJ5Fw3Ofr5xSbdTy2xRYO4bhXtr43j X0Z9U2yyFnr/3Qdv0O/V2UAQT5MRZJHZ57FWeV9AztSfTkOMpL0UaSrfItAzthspxJI/ w3wONGQDFQzgbMxB3o44c5A5J766GSl/PKiwTwUbLthr/fgxDS6l6uEZSV1QPvo3WEpe sAng== X-Forwarded-Encrypted: i=1; AHgh+RqjaGqtpoTWVUlejv14WsqL9rM6JoFUx8f8rlt/FNVO9DDhXhu4H4fWcvzl6trfTSe70tfERdjIYYhU6a8=@vger.kernel.org X-Gm-Message-State: AOJu0YwAGcI1J9RY1sqFVfsXKAraKwtL1+R/hUo7aBMPsQcHqMwyI/Di 6B0QN3M7+CmIcmDJcoEjMoSebrl7yM5V/BBv1LgT8SNQwMN2WgE0onqMTpiMRzrfbTe9pG+J5At 4BqBb X-Gm-Gg: AR+sD1215rMd29lJKeL9GUhZY4GiAsQ77gDfIN8jpF+RwC46+vHlXkp9ZmMDsM2+c/i IwKTts2ymw/3brH2mqatDDrWJPX36Y0rktn1ONFUbXldbonskXTdRT0XNRh+GVXKPSXwpiRw3Ph fIzsGDhNkHYtUI5kUKOfbm87dSRrOz5MBmvWPff/L+SD9TXsLEpxDBsrf2EKzlOnoq11bs9IDr0 PR0c30+fu0tjN33BUcVHljo6Cg5IH/J6kGpdcBs+GagF5i+eYReLDmDfOtmhxOI9faB4ycLHRBI es3BdZNYNt9BBxO38XPJHzj0Cw9pvMdiJ+mNVEmTHCmdXpx+1hzN/Au/zCReYE0rUudXdyCrK5p m0UO3RjA36bWcOwqblykjbn/ENKeocCDF92pbRRr31bmlCvPDa15iE/yX1xZ41Q== X-Received: by 2002:a17:90b:5350:b0:37f:be6c:f3f2 with SMTP id 98e67ed59e1d1-38f29399845mr6819950a91.2.1785126248497; Sun, 26 Jul 2026 21:24:08 -0700 (PDT) Received: from ziepe.ca ([64.114.68.211]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-38f041b8be9sm4471929a91.14.2026.07.26.21.24.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jul 2026 21:24:08 -0700 (PDT) Received: from jgg by jggl with local (Exim 4.95) (envelope-from ) id 1woCsf-0002Mt-Ls; Mon, 27 Jul 2026 01:23:57 -0300 Date: Mon, 27 Jul 2026 01:23:57 -0300 From: Jason Gunthorpe To: Leon Romanovsky Cc: "Aneesh Kumar K.V" , iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-coco@lists.linux.dev, Robin Murphy , Marek Szyprowski , Will Deacon , Marc Zyngier , Steven Price , Suzuki K Poulose , Catalin Marinas , Jiri Pirko , Mostafa Saleh , Petr Tesarik , Alexey Kardashevskiy , Dan Williams , Xu Yilun , linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" , Alexander Gordeev , Gerald Schaefer , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Sven Schnelle , x86@kernel.org, stable@vger.kernel.org, Michael Kelley Subject: Re: [PATCH v8 01/23] dma-direct: return struct page from dma_direct_alloc_from_pool() Message-ID: References: <20260717180442.110954-2-aneesh.kumar@kernel.org> <20260721115456.GI110966@unreal> <20260721142921.GN110966@unreal> <20260721153321.GO110966@unreal> <20260723075704.GC110966@unreal> <20260726081753.GD12003@unreal> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260726081753.GD12003@unreal> On Sun, Jul 26, 2026 at 11:17:53AM +0300, Leon Romanovsky wrote: > Currently, the phys type universally describes memory and can be > reliably translated into any required representation. It is the most > fundamental type we have. You cannot go from phys to page reliably unless you make assumptions about the phys, that's the whole issue here. If the callchain expects and intends to use a page it should really stay in a page and not take a side trip to phys. I agree it would help to have some helpers that were more phys based for the callchains that want that since we are mixing two fairly different activities in these functions.. But making phys the only output out of the pool isn't going to be an improvement. BTW how does a struct page even work for decrypted memory? You can't actually use it that way right? If you try to access it then you'll get the wrong IPA and it should explode? Maybe we should be blocking the struct page path entirely for CC shared? Jason