Files
qemu/hw
Xiaoyao Li fb1aa703ab HostMem: Add mechanism to opt in kvm guest memfd via MachineState
Add a new member "guest_memfd" to memory backends. When it's set
to true, it enables RAM_GUEST_MEMFD in ram_flags, thus private kvm
guest_memfd will be allocated during RAMBlock allocation.

Memory backend's @guest_memfd is wired with @require_guest_memfd
field of MachineState. It avoid looking up the machine in phymem.c.

MachineState::require_guest_memfd is supposed to be set by any VMs
that requires KVM guest memfd as private memory, e.g., TDX VM.

Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
---
Changes in v4:
 - rename "require_guest_memfd" to "guest_memfd" in struct
   HostMemoryBackend;	(David Hildenbrand)
2024-07-25 11:57:59 +02:00
..
2023-10-20 08:51:41 +02:00
2023-09-21 11:31:16 +03:00
2024-06-20 10:04:36 +03:00
2024-03-13 21:52:34 +03:00
2023-11-10 18:19:13 +01:00
2023-09-21 11:31:16 +03:00
2023-09-20 07:54:34 +03:00
2024-05-02 13:03:01 +03:00