From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.43]) (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 99B4E40B6EB for ; Thu, 14 May 2026 14:37:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778769457; cv=none; b=javh5+As56rpQ0lxDmWCDx+0GIx1hN3Kyws5r0CGOEcWWhQnYUttpC2WA9kF2NITHYqgCBbSYG56Tm9Vkj2bauBb86FTeO5/qasDY+sk7s9Xsy+kt5Ry+XTbSzAcxQYuxw0Ns2rH1WfiqXwXImVwPmgPQuehgfA+L0HvEwZF/+Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778769457; c=relaxed/simple; bh=1R/nhGX8X+QrR70RUCgUXl+c5YpTnUwInBBh5eq6G2A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GU359j/YZHX0M8aP7qnIDuRgI/oJWVmbiyMdpdEAoXivUJjVs9e+PWLPntwKrDch82+VOl7xh3TXE4Prsvha6/z4EVBu00Pme+NzBKzfSU8C5ZX61DL50wodlJEEULxqAyPk6pBGBXF5Pgd5opBy8R8+EUajBjtAQ5O5kuwdjXI= 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=cSc8k9w7; arc=none smtp.client-ip=209.85.219.43 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="cSc8k9w7" Received: by mail-qv1-f43.google.com with SMTP id 6a1803df08f44-8acae26e564so79121946d6.2 for ; Thu, 14 May 2026 07:37:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1778769455; x=1779374255; 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=TKVmCu+Gb/QJi05GS/MUngbhCp2nJ8/F0kCLFA01DR8=; b=cSc8k9w7tEpbi8iOL8N+3t6eQFPffF84Fk+HyJ+WnZFcOHkzkL1DVNsTKbG0uUibL8 HzzqF7SHLllGz0Eyink0ap9anZL6dUI8kngC7T490+dQ6ROtMsVMXEYQj206s2wL1Q0K /KNmHlRiNeyDysIfIUd0HxIxtNe5JRA+p+gfU9CotGOD/3v8hrOAHgQwli+MyPfEnYPO AB5hW5seKKdBfVS7fpr4y5kcb6N7MXEk07/IqyVgphtE6P/KWhNr42sKBjMJfePn0CzG yUjV2WYXU/HhxYhKzuebAVgexP7DaoK9XSGs5xCSQQzcqBvUMUQQfP+AftNE0uBLOaL7 kRQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778769455; x=1779374255; 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=TKVmCu+Gb/QJi05GS/MUngbhCp2nJ8/F0kCLFA01DR8=; b=gYhXvqoBP37cKLF+z+g2D3bC9Spcm/mv6i1WMuMYw7Ktu2/ecF3UJ9gXraHIHVSkYa 41MuGTZ8sn1436RfQnm5YvmxS78rgBQyrqnt/dKC/ax5Hf0foOPHcvbeIWWc9sLU2SSO FLqtrzapDEZ4jCp9py4FsY4PbvhRGdVkiYi+UnrxD5uNGcBub6eLnskcAS4gBczVs+qK EBlV4QqrQHOnjj4RtArmYpuTG9CPsBWgQxjTQFAho4bDYkMdEK6qhyWfRsT1kPkUoR+v Z6cmrmubOb6IW5aFp06aYZCar7loCO3GN71FQ+zmlMcqjSMlSE/YgZWdWTx79YCW0cVS OKNw== X-Forwarded-Encrypted: i=1; AFNElJ9RvHfVzRyAhqueI6AEEpaCIfa2tApEoVv/+0fNMX+F6SzvJdNxuyV3qAVoYW0fG7S/zcpqhpu/MDeLWOA=@vger.kernel.org X-Gm-Message-State: AOJu0YxXP7urvewQp5C43E6yDmBzKFJQirPG/td/uSzQxCZ8VSgmR2xT nQNHsyRnQe8PzcXJBpZ31CWYXv9GFpdYsmQ4o3pQMIle87yBv6mbunHzviWIYLGo/IA= X-Gm-Gg: Acq92OFKAayNbvTVoqv8uBNL5kV0aCi7n0fdbx/BNaRUJMjz0sgpf/z9Gv2soyfuGZD qYICv7azSLtbEpBs4Ns2D+/zg6DEQ9PPB8mEvCO3dmLIMcqtef6+nqQMdrhRd3iTZeup4wCBmLw V4IMf7yDLZGI9I7EsL7ER9xmOBsdku04RoeQRLAaHQ94mexS2dcKXy9Hw+4Vz8HOgYId8tm+i4H JINU5qiRy75QiEioJJexk5RWEb9n6RXeNSpWhoDgy/NLk01i2coqQSUJi6cttS6UnqGJvE6d7AN K8DAbZZtbo6foVS4mFUreUwznBx6LPyE5SzlZx+ZnuGwUeouPAy+Rqg8AXyUCHw+qfMKnmkSqWE qpUwDeuIiigZfK/NsAGNsZ1mdLc5FkscVT5ESIkELVnn0P5hgBWM8aTWR0dI4e/uhhuuDNqusn4 U3tqLWGm9QFxNsg9AjyYei+/EdkWiTNbsMKol4KhxLeja4eZTO2keSDJW8u2CHRbIhf4qQoeQNN 6EM8Q== X-Received: by 2002:a05:6214:55c6:b0:8ca:ee3:6e99 with SMTP id 6a1803df08f44-8ca0ee376b1mr2894306d6.44.1778769454659; Thu, 14 May 2026 07:37:34 -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 6a1803df08f44-8c908e11929sm25017416d6.14.2026.05.14.07.37.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 May 2026 07:37:33 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1wNXBt-00000005Lti-0CPB; Thu, 14 May 2026 11:37:33 -0300 Date: Thu, 14 May 2026 11:37:33 -0300 From: Jason Gunthorpe To: "Aneesh Kumar K.V" Cc: Mostafa Saleh , 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 , 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 Subject: Re: [PATCH v4 04/13] dma: swiotlb: track pool encryption state and honor DMA_ATTR_CC_SHARED Message-ID: <20260514143733.GB7702@ziepe.ca> References: <20260512090408.794195-1-aneesh.kumar@kernel.org> <20260512090408.794195-5-aneesh.kumar@kernel.org> 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, May 14, 2026 at 06:18:05PM +0530, Aneesh Kumar K.V wrote: > > There is no problem with non-protected guests as they don't use memory > > encryption, my initial thought was that th encrpyted/decrypted is > > per-pool property which is decided by FW (device-tree). > > What I meant was that we need a generic way to identify a pKVM guest, so > that we can use it in the conditional above. If I understood Mostafa's remarks I think different devices in the guest need shared/decrypted and some don't? Ie a virtio hypervisor device needs shared while a real PCI device doesn't? Is that right? In CC terms that would be a mixture of T=0 and T=1 devices hardwired and signaled by firwmare.. Ideally we'd have a flow where if the arch precreates a swiotlb pool with special parameters this overrides all other decision making. Then this series is about making CC NOT use that flow... ?? Jason