Thread (34 messages) flat view 34 messages, 5 authors, 4h ago

Re: [PATCH v6 0/9] coco: guest: Enforce host page-size alignment for shared buffers

From: Jason Gunthorpe <jgg@ziepe.ca>
Date: 2026-09-18 16:57:59
Also in: kvmarm, linux-coco, linux-iommu, lkml

On Fri, Sep 18, 2026 at 05:52:31PM +0100, Catalin Marinas wrote:
TBH, I'm tempted not to support this configuration at all, just fail
gracefully if the realm page size doesn't match the host's. However, if
that's a real world configuration, 
realm != host is going to be fairly common.

host > realm is probably not that common, I would guess.
I wonder whether could we leverage the swiotlb mechanism but with a
separate io_tlb_mem as a shared coco allocator with the right
alignment and use this pool when force_dma_unencrypted() instead of
specific alloc_pages() with adjusted order.
I propose we fix the far too low level set memory decrypted apis into
proper allocators, with APIs that can handle a round up. Then see
where we end up after that.

If we can hide 90% of it in an allocator then lets see if we can open
code the rest.

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