Re: [PATCH v4] x86/pci-dma: add a SWIOTLB_ANY flag to lift the low mem limitation

From: Borislav Petkov

Date: Sat Jul 11 2026 - 20:56:23 EST


On Thu, Jun 25, 2026 at 09:26:16AM +0800, Jun Miao wrote:
> When high-speed NICs or multi-GPU setups are passed through into confidential
> VMs, the SWIOTLB bounce buffer becomes the critical path between private and
> shared memory. Restricting it to low memory limits throughput and fails to
> scale for larger workloads.
>
> AMD SEV-SNP and Intel TDX guests run in a TEE where the hypervisor is untrusted.
> DMA-capable devices require bounce buffers to mediate between encrypted private
> memory and unencrypted shared memory. Confining these buffers to low memory (<4GB)
> unnecessarily caps their size and degrades performance.
>
> Power SVM already supports this; x86 does not. See commit 8ba2ed1be9
> ("swiotlb: add a SWIOTLB_ANY flag to lift the low memory restriction").
>
> [ aakarsh: completely trim down/rewrite changelog ]
>
> Tested-by: Aakarsh Jain <aakarsh.jain@xxxxxxxxxxxxxxxx>
> Suggested-by: Borislav Petkov <bp@xxxxxxxxx>
> Acked-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
> Reviewed-by: Aakarsh Jain <aakarsh.jain@xxxxxxxxxxxxxxxx>
> Signed-off-by: Jun Miao <jun.miao@xxxxxxxxx>
> ---

Sashiko has a question:

https://lore.kernel.org/r/20260625012616.2992535-1-jun.miao@xxxxxxxxx


--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette