aboutsummaryrefslogtreecommitdiff
path: root/include/sysemu
diff options
context:
space:
mode:
authorXiaoyao Li <xiaoyao.li@intel.com>2024-03-20 03:39:06 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2024-04-23 17:35:25 +0200
commit0811baed49010a9b651b8029ab6b9828b09a884f (patch)
tree260b05bbc1ab1000ddf3f40eeefd46f9bd3d9476 /include/sysemu
parent72853afc638b3e28779c86dd05da2f3bb149fe2c (diff)
downloadqemu-0811baed49010a9b651b8029ab6b9828b09a884f.zip
qemu-0811baed49010a9b651b8029ab6b9828b09a884f.tar.gz
qemu-0811baed49010a9b651b8029ab6b9828b09a884f.tar.bz2
kvm: Introduce support for memory_attributes
Introduce the helper functions to set the attributes of a range of memory to private or shared. This is necessary to notify KVM the private/shared attribute of each gpa range. KVM needs the information to decide the GPA needs to be mapped at hva-based shared memory or guest_memfd based private memory. Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com> Message-ID: <20240320083945.991426-11-michael.roth@amd.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/sysemu')
-rw-r--r--include/sysemu/kvm.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
index bd247f3..594ae9b 100644
--- a/include/sysemu/kvm.h
+++ b/include/sysemu/kvm.h
@@ -536,4 +536,8 @@ void kvm_mark_guest_state_protected(void);
* reported for the VM.
*/
bool kvm_hwpoisoned_mem(void);
+
+int kvm_set_memory_attributes_private(hwaddr start, uint64_t size);
+int kvm_set_memory_attributes_shared(hwaddr start, uint64_t size);
+
#endif