[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <yq5a348n823t.fsf@kernel.org>
Date: Tue, 16 Sep 2025 09:45:18 +0530
From: Aneesh Kumar K.V <aneesh.kumar@...nel.org>
To: Mostafa Saleh <smostafa@...gle.com>
Cc: linux-coco@...ts.linux.dev, kvmarm@...ts.linux.dev,
linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org, aik@....com,
lukas@...ner.de, Samuel Ortiz <sameo@...osinc.com>,
Xu Yilun <yilun.xu@...ux.intel.com>,
Jason Gunthorpe <jgg@...pe.ca>,
Suzuki K Poulose <Suzuki.Poulose@....com>,
Steven Price <steven.price@....com>,
Catalin Marinas <catalin.marinas@....com>,
Marc Zyngier <maz@...nel.org>, Will Deacon <will@...nel.org>,
Oliver Upton <oliver.upton@...ux.dev>
Subject: Re: [RFC PATCH v1 04/38] tsm: Support DMA Allocation from private
memory
Mostafa Saleh <smostafa@...gle.com> writes:
> Hi Aneesh,
>
> On Mon, Jul 28, 2025 at 07:21:41PM +0530, Aneesh Kumar K.V (Arm) wrote:
>> Currently, we enforce the use of bounce buffers to ensure that memory
>> accessed by non-secure devices is explicitly shared with the host [1].
>> However, for secure devices, this approach must be avoided.
>
>
> Sorry this might be a basic question, I just started looking into this.
> I see that “force_dma_unencrypted” and “is_swiotlb_force_bounce” are only
> used from DMA-direct, but it seems in your case it involves an IOMMU.
> How does it influence bouncing in that case?
>
With the current patchset, the guest does not have an assigned IOMMU (no
Stage1 SMMU), so guest DMA operations use DMA-direct.
For non-secure devices:
- Streaming DMA uses swiotlb, which is a shared pool with the hypervisor.
- Non-streaming DMA uses DMA-direct, and the attributes of the allocated
memory are updated with dma_set_decrypted().
For secure devices, neither of these mechanisms is needed.
-aneesh
Powered by blists - more mailing lists