Thread (80 messages) flat view 80 messages, 8 authors, 1d ago

Re: [PATCH] arm64: swiotlb: Keep the default size for protected guests

From: Jason Gunthorpe <jgg@ziepe.ca>
Date: 2026-08-07 13:58:27
Also in: linux-arm-kernel, linux-coco, linux-iommu, linux-s390, lkml

On Fri, Aug 07, 2026 at 02:18:31PM +0100, Will Deacon wrote:
quoted
I was under the impression that there is a possibility of using swiotlb
instead of restricted-dma-pool with pKVM.
Yes, that patch enables swiotlb as a possibility for protected guests
but with your patch we avoid shrinking the swiotlb buffer even when
restricted dma pools are being used and that's a waste of memory.
I also thought we switched pkvm to use CC-like swiotlb as part of the
alignment in this rework? Mostafa ?
quoted
If that is not the case, then we could change:

!cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT) &&

to

!is_realm_world() &&
Perhaps, or you could just pass the swiotlb= option if the defaults don't
work for you. Can you give more details about the slots exhaustion you're
seeing under CCA?
We see badness with swiotlb too, it basically doesn't work out of the
box if you have to use it 100% for real devices. It easily runs out
of memory.

Auto tuning to higher levels makes sense to me, but I'd rather the
core code handled adjusting its size to the estimated need, not arch
code.

Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help