diff options
author | Chao Peng <chao.p.peng@linux.intel.com> | 2024-03-20 03:39:05 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-04-23 17:35:25 +0200 |
commit | ce5a983233b4ca94ced88c9581014346509b5c71 (patch) | |
tree | 0bc3c3fbceb52c45b12dfc5f8374ea7076adca36 /include/sysemu | |
parent | 15f7a80c49cb3637f62fa37fa4a17da913bd91ff (diff) |
kvm: Enable KVM_SET_USER_MEMORY_REGION2 for memslot
Switch to KVM_SET_USER_MEMORY_REGION2 when supported by KVM.
With KVM_SET_USER_MEMORY_REGION2, QEMU can set up memory region that
backend'ed both by hva-based shared memory and guest memfd based private
memory.
Signed-off-by: Chao Peng <chao.p.peng@linux.intel.com>
Co-developed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Message-ID: <20240320083945.991426-10-michael.roth@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/sysemu')
-rw-r--r-- | include/sysemu/kvm_int.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sysemu/kvm_int.h b/include/sysemu/kvm_int.h index 227b61fec3..3f3d13f816 100644 --- a/include/sysemu/kvm_int.h +++ b/include/sysemu/kvm_int.h @@ -30,6 +30,8 @@ typedef struct KVMSlot int as_id; /* Cache of the offset in ram address space */ ram_addr_t ram_start_offset; + int guest_memfd; + hwaddr guest_memfd_offset; } KVMSlot; typedef struct KVMMemoryUpdate { |