From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) (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 8E5E347ECFA for ; Thu, 4 Jun 2026 14:30:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780583405; cv=none; b=GKqfKuBJ/YVy5n5obBltJ9kYKmf9cIVuWgFpWWNfi3BhlsEBxZMWXl5DVBMsnbdnAKll42uR+ZnP0txokOCvEjQjA/3euspk0LDWtjuKVawYZUk4zWwClYa0gede7a71msWg5vUYpTlwnxURah8urbp+0GyKEAjBFWGfQaO/cBc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780583405; c=relaxed/simple; bh=uV78Na/cU+RIve0Q1YJ19wLHf0X6yGP9GKIsahjNfAg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pZR7FjAmmcW/auxUJVxApXngK3uuStXkjhynHK3If+oeGdOtGiN2lsJ3oTiBzEm7XxBQPSzXx8FhyuuCvop5vF5qufdeITFCKyo+jSd7FU4Rz3mb9CB3kJW1s7dxvKcxnO/3rZF04k7NoK+vT9hkNxNMoRxflzQYGH7Z9g9Xa84= 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=WhXP/5Ul; arc=none smtp.client-ip=209.85.222.173 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="WhXP/5Ul" Received: by mail-qk1-f173.google.com with SMTP id af79cd13be357-9157ec935c5so131586585a.2 for ; Thu, 04 Jun 2026 07:30:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1780583403; x=1781188203; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=leYnnf5Pg/xQRLvt6GMDQfv6g59yyMdkhV1lUPQrWAM=; b=WhXP/5UlNSCaNX9EtYvizOTbjzvTYIDLo51KQuUuzQDYBeTbYHkN0+SeQatPn6TzxE fGQXR/IFUji7JWNjULzs1sUihdkgUkdXjHZVhIXgumUxrv04ZI+t1NGLdjv6xIrjYCmD piEZkEs7yPXtqyug4x130DU9oaTioZc6pBPjQEIF1WPYu9WB2eImq+ywr5XsyczA9Xf9 hoOb3PvuQRtkzHPB4qpJp65nxM+60ELBIUv64Gf5ufC9NuC1V54X0AVq7gQPekx64Ra4 rx5QQ+t6N01GZ7fhHJwPipjw8nQ2cFI6d6fEAdJ41Q9X/Rto7PWvWIN4YRPZzTr++ooz /9Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780583403; x=1781188203; h=in-reply-to:content-disposition: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; bh=leYnnf5Pg/xQRLvt6GMDQfv6g59yyMdkhV1lUPQrWAM=; b=Ip0ib4EyBoTe0bg2V1Ly7HcJESdiokoBqObKJHnR7bXU9p68wLEySyYc3gTKzhTWO1 EiygPJzZl3DyK7wepS+sukv/YkGpdcACY6E47E4CwN4DQvxvXbtF5I+FEa3z4kk3nEOv 2JvjLdCZH9cLrpLWENgBEE1CNhstoGsanQXI02VMHcuHPOx1jJ0aKWLUzxBQX2flbKql w8WYsNsZQ69Nq6QlrerenWMFZT/pufreTXsWSCsMtwE+AAFt4e9DYtUCCrG7vqpwWxAZ hwjjpv9iOM2Q7afrwXKrSKsUWOfNqqvpGZSVxT483uBlz47ZBSLYc/Ga6iuiP2KUtBFz eFkg== X-Forwarded-Encrypted: i=1; AFNElJ97q6eDoXVXcExSinbMi28pksDx5rhGajLp4hBtJ7e3Ytg9ua0hVqx9wHASjnNE6OxFTBDOXLbx6lyFsR0=@vger.kernel.org X-Gm-Message-State: AOJu0YxNDaW6eiG/Ttwy4TKkYslD8g0fvyxSbfpl1Cx0/Lo/wN3gC7EC +s0fbjB2I7zHlR2x5aFcGE3IYJs1S/4XfZvu0DoQD36mse81yJ80EktC936uy8+2Cbs= X-Gm-Gg: Acq92OEQyOuZoWnoL9XSkXUep9H2PYfI1aPiGJrYU6DWF/34YD0jneW57hOgsajtMvs AkDuq1sMrWnviDqJi2zc1uMlIBGswHCSzWw4ayrGQSp95ORtc6iOsewDioHd1rzOQyXxwV76x7R 1mXg1C9mGuM4yie4WEAwh2muPXK6tQKtz/EGB6D2gwr5NZdkX7DAgaxXxoS5lLszzfDAnEhBpwU sqwpoRgUvlLh2FSyJ/RDYedu1gDHbmyD0Tm4s7xnBtfPFieTVup1ppprdGzXNqYzhvka+sd4ONX PtvfTipp9sHJtcy1SwxWi2VinWSIncM7c0iG8S34ogFKssPhkTRQMhSvN++5Z/FjDrUUGVU6dm0 sI/Do4D4F7UbckzYoON/u82eKA4YX+dip+hGBIr48/YWxs7sac46SiDFsBUlZV2CqIvW0WKw61A 7ge37GVtRGa4SbQcYPLqSu50Qa18HgWLv7R0MnVCl9Bl2ax8c0Niv4pz043b+sdw/VIadUD5YeP amhq/iU2bhm5nns X-Received: by 2002:a05:620a:2544:b0:915:3e46:c44a with SMTP id af79cd13be357-9158a80c3f3mr1387419585a.46.1780583403463; Thu, 04 Jun 2026 07:30:03 -0700 (PDT) Received: from ziepe.ca (crbknf0213w-47-54-130-67.pppoe-dynamic.high-speed.nl.bellaliant.net. [47.54.130.67]) by smtp.gmail.com with ESMTPSA id af79cd13be357-9158a21d2c1sm657350885a.11.2026.06.04.07.30.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jun 2026 07:30:02 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1wV958-00000008IZw-1Hzl; Thu, 04 Jun 2026 11:30:02 -0300 Date: Thu, 4 Jun 2026 11:30:02 -0300 From: Jason Gunthorpe To: Michael Kelley 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" , Jiri Pirko Subject: Re: [PATCH v5 05/20] dma-pool: track decrypted atomic pools and select them via attrs Message-ID: <20260604143002.GA2487554@ziepe.ca> References: <20260522042815.370873-1-aneesh.kumar@kernel.org> <20260522042815.370873-6-aneesh.kumar@kernel.org> <20260603005454.GM2487554@ziepe.ca> 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: On Thu, Jun 04, 2026 at 02:05:35PM +0000, Michael Kelley wrote: > From: Jason Gunthorpe Sent: Tuesday, June 2, 2026 5:55 PM > > > > On Tue, Jun 02, 2026 at 02:24:40PM +0000, Michael Kelley wrote: > > > > > Except that in a normal VM, the "unencrypted" pool attribute does *not* > > > describe the state of the memory itself. In a normal VM, the memory is > > > unencrypted, but the "unencrypted" pool attribute is false. That > > > contradiction is the essence of my concern. > > > > I would argue no.. > > > > When CC is enabled the default state of memory in a Linux environment > > is "encrypted". You have to take a special action to "decrypt" it. > > > > Thus the default state of memory in a non-CC environment is also > > paradoxically "encrypted" too. > > The need to have such an unnatural premise is usually an indication > of a conceptual problem with the overall model, or perhaps just a > terminology problem. Oh yes I do think the AMD derived terminogy is aweful :( > Here's a proposal. The new DMA attribute is DMA_ATTR_CC_SHARED. > Name the pool attribute "cc_shared" instead of "unencrypted". Yeah maybe. I sometimes imagine replacing the encrypted/decrypted names with cc_shared too just to make it sane. > "cc_shared" set to false in a normal VM doesn't lead to the non-sensical > situation of claiming that a normal VM is encrypted. It seems like a good idea to me Jason