Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) (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 9955D25B0BF for ; Wed, 3 Jun 2026 00:54:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780448098; cv=none; b=kogpMGEPpyHWJXTKluwWLROzktDG/q8Cb6yHWpaeqBEDx+LOq7Ew/rQiIIkVXntnkLNTlbqyeprCg6jRO4x99UNJccMUvsHqF9j2+0UDsoQZSYV4LEA7yhMz+ygrnZttadehxY+gKPajJ5ywhulE99XcBikTculkjusGlxjxuYM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780448098; c=relaxed/simple; bh=W/c+ST5uf3ZVEZ/AWys6/pG+OcAIML9okmITgYiOjr0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YDa3Fa2Rkpz5qVnlaGVX686Gnq1qvbP3paZTUh6crBIF0uErSv01lihDvkX+jjR2JNia/qdH1h6CDv0/vQrSvaRVkmnT4qghC02+uVcrso3elUFjzIhfR8uVQtsmq7bqdH13pVCcoL/VXdsA+RUZ9wtEBsRvH1VAlB0wwxqrEUc= 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=HGhSxbyQ; arc=none smtp.client-ip=209.85.222.172 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="HGhSxbyQ" Received: by mail-qk1-f172.google.com with SMTP id af79cd13be357-9156b74006aso186924485a.0 for ; Tue, 02 Jun 2026 17:54:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1780448097; x=1781052897; darn=lists.linux.dev; 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=npyTF2LAztZXio21Bq8j0RB5zw9LU0pLQvjc7W7RzIc=; b=HGhSxbyQBn7cjHprCd+F3SD9tstHAyyD5kBo5Dq4Cr12keaWIDkbXX7tjH4LT+85GN FH0orV2iURLGYPDd5je+TyRK6rrJKuyGari8TG3BGFJGzETspJxxVo/zjvklTdarVhnj 8I1iruQzbVXqE43F1M3qq5QJ/zzKMITYhxOyy6eyvmYqZmRlCwfu7blftvV7CrNJ+vFx lGvTGtRIrp0XsoFO/OnpSmboDKwcA7kEA9l5zSH1feekb1/PK6g+uGHtb2wxr/Px9T8h ccZaWZMI6KYHkQ1J+kc0KC041in8M2x0ZMjwSnGqgb6O2kJqAuDo79t2Zl+1vrYJFuOS el3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780448097; x=1781052897; 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=npyTF2LAztZXio21Bq8j0RB5zw9LU0pLQvjc7W7RzIc=; b=OROQyMN8wABSdkvgV0BaLjOc4iFu90IAtNhfqdd1qEakE0hQRECkC2bY6qR6qcaCk0 OEUqtIzomxwDmtU7CJYtp3rihfst0MhmAfOZXQ4d5sQdN2gET/p0vlihlrG4+oKB5Ui2 xYMXYkEzOutRqpz5pOuZhsKViu20wnRblwzM+T0rutD4Gt/mHhiDF+pZP9dBV3jZFb6C 7NSNlFVSGhyPsiQ8+z3KUCq7kOslkTgi9a3rdNY7hAGQnRQKcFlaIvbGS68o+InqdnfC iNCYcuFfTUWe2RLlsAim4DCFKzA5XFgLyaWZ+1+XFIZz2Z7iuwHBz/E5X9j73EzJ/0KS vu2w== X-Forwarded-Encrypted: i=1; AFNElJ9gc9nCCISDebU6/srLQlHWpzey8cLR9KV9lw0RCZsjG57OUoMQ7s2G6vbLeCgXtLoO51CieIal9vfU@lists.linux.dev X-Gm-Message-State: AOJu0YzfWs49Bm/5JtljkrX3lwsprMljJsFEaTgvVmhB13ATkX/tQyHP oTyn+ALcfL38zaAmPC8V9MtZ/9BunT+JKOBXI5Yeb3GdGqKFkW3fymUqf89NgU+ZXwo= X-Gm-Gg: Acq92OF/HSq3krVrMdzTWBg+pog2VJ37GsfmWX4I1LnxbqccPBDVdqaOEhm4AeqSONl CU3odzHIu9qNpolY3RHUJVyksFy0Piv66EBF6cM5p4qMHCITlfcAdJJmDU8VszPsvO5it+NgPkl L88ZCJYA+TIGLxO9hIUOm7eSRAget4D4DNIGiLfEoaTcyxNfG7tHfqKQqfmIRlivlqCmwLNFW3y rAqkOIefxdcDSiv7TQ3JbZuHXtO9jUO/6Anxp2uDY0zXz/yl1jB+w2Imjjxg2+ADxJV3XFXxGlf qZ9C4m4FtHKvt327l+axkw+fkcquObcGU3H/BMc5vbKQPzd2yo7oZNjaKKDkPLe8tnRA6g8IbIK Ku5OldaKgFVf4CRZtxOJL2Y2ND/D4bxXFigmenqxULTj/i7zK6g8Jp4MN7vJfgag+a1uYtuftMB upEfgcNyL4BcHXZwY92POUjFdnd+AMTFjgxY8NxFT1LUpmq4qM/Uecb0b3JthQgNPJ0FdCa5pyL MDwtMte7B5c76wi X-Received: by 2002:a05:620a:4409:b0:8d1:a75e:2f8c with SMTP id af79cd13be357-9158a86b6acmr242337785a.53.1780448096650; Tue, 02 Jun 2026 17:54:56 -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-9158a237330sm100630585a.16.2026.06.02.17.54.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2026 17:54:55 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1wUZsk-00000004x1y-3mPP; Tue, 02 Jun 2026 21:54:54 -0300 Date: Tue, 2 Jun 2026 21:54:54 -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: <20260603005454.GM2487554@ziepe.ca> References: <20260522042815.370873-1-aneesh.kumar@kernel.org> <20260522042815.370873-6-aneesh.kumar@kernel.org> Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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. "decryption" is impossible. Therefore the "unencrypted" state is a special state that only memory inside a CC VM can have. A normal VM can never have "unencrypted" memory at all, so having it be false in the pool is accurate as far as the APIs go. un-encrypted = true means "the memory in this pool was transformed with set_memory_decrypted()" - which is impossible on a normal VM. Jason