On 9/12/2025 1:45 PM, Xiaoyao Li wrote:
On 8/14/2025 5:45 PM, Xiaoyao Li wrote:
On 7/21/2025 2:52 PM, Xiaoyao Li wrote:
shm can surely serve as the shared memory for coco-VMs. But currently it
doesn't check the backend->guest_memfd to pass down the RAM_GUEST_MEMFD
flag. It leads to failure when creating coco-VMs (e.g., TDX guest) which
require private mmeory.

Set and pass down RAM_GUEST_MEMFD when backend->guest_memfd is true, to
allow shm memory backend serve as shared memory for coco-VMs.

ping...

Paolo, will you merge it for QEMU 10.1? I think it's worth it.

ping again.

ping++,

+ Peter,

Maybe you can queue it in case it gets missed from Paolo again?

cc: Stefano Garzarella <[email protected]>
Signed-off-by: Xiaoyao Li <[email protected]>
---
  backends/hostmem-shm.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/backends/hostmem-shm.c b/backends/hostmem-shm.c
index f66211a2ec92..806e2670e039 100644
--- a/backends/hostmem-shm.c
+++ b/backends/hostmem-shm.c
@@ -54,6 +54,7 @@ have_fd:
      /* Let's do the same as memory-backend-ram,share=on would do. */
      ram_flags = RAM_SHARED;
      ram_flags |= backend->reserve ? 0 : RAM_NORESERVE;
+    ram_flags |= backend->guest_memfd ? RAM_GUEST_MEMFD : 0;
      return memory_region_init_ram_from_fd(&backend->mr, OBJECT(backend),                                                 backend_name, backend- >size,






Reply via email to