Thread (96 messages) flat view 96 messages, 10 authors, 3d ago

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

From: Catalin Marinas <catalin.marinas@arm.com>
Date: 2026-08-10 16:22:10
Also in: linux-arm-kernel, linux-coco, linux-iommu, linux-s390, lkml

On Mon, Aug 10, 2026 at 04:58:42PM +0100, Will Deacon wrote:
On Mon, Aug 10, 2026 at 04:44:51PM +0100, Catalin Marinas wrote:
quoted
I can see x86 in mem_encrypt_setup_arch() adjusting the bounce buffer to
6% of the guest memory. We could make up similar logic for arm64 or we
could just rely on CONFIG_SWIOTLB_DYNAMIC (default off currently for
arm64 I think).
As Jason said, this should be done outside the arch code.
I agree, better in the core code. I'd prefer to go for some dynamic
resizing than random percentage of guest memory like x86 (but, in the
absence of dynamic swiotlb, we could pick some default).

I noticed we still have a small change in behaviour regarding dynamic
swiotlb. The increment for new allocations is based on default_nslabs
which is reduced with the new patches. It gets even weirder if one sets
the same IO_TLB_DEFAULT_SIZE on the kernel command line, it will be
overridden by swiotlb_adjust_size() anyway.

I think this core code needs a bit more tidying up.

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