qemu/include
Chao Peng c15e568407 kvm: handle KVM_EXIT_MEMORY_FAULT
Upon an KVM_EXIT_MEMORY_FAULT exit, userspace needs to do the memory
conversion on the RAMBlock to turn the memory into desired attribute,
switching between private and shared.

Currently only KVM_MEMORY_EXIT_FLAG_PRIVATE in flags is valid when
KVM_EXIT_MEMORY_FAULT happens.

Note, KVM_EXIT_MEMORY_FAULT makes sense only when the RAMBlock has
guest_memfd memory backend.

Note, KVM_EXIT_MEMORY_FAULT returns with -EFAULT, so special handling is
added.

When page is converted from shared to private, the original shared
memory can be discarded via ram_block_discard_range(). Note, shared
memory can be discarded only when it's not back'ed by hugetlb because
hugetlb is supposed to be pre-allocated and no need for discarding.

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-13-michael.roth@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-04-23 17:35:26 +02:00
..
authz Prefer 'on' | 'off' over 'yes' | 'no' for bool options 2021-01-29 17:07:53 +00:00
block virtio: Re-enable notifications after drain 2024-02-07 21:51:03 +01:00
chardev chardev: use bool for fe_is_open 2024-01-12 13:23:48 +00:00
crypto crypto: Modify the qcrypto_block_create to support creation flags 2024-02-09 12:50:37 +00:00
disas disas: introduce show_opcodes 2024-03-06 12:35:51 +00:00
exec physmem: Introduce ram_block_discard_guest_memfd_range() 2024-04-23 17:35:26 +02:00
fpu fpu: Add conversions between bfloat16 and [u]int8 2023-09-16 14:57:15 +00:00
gdbstub gdbstub: Save target's siginfo 2024-03-13 11:43:52 +00:00
hw HostMem: Add mechanism to opt in kvm guest memfd via MachineState 2024-04-23 17:35:25 +02:00
io io: Introduce qio_channel_file_new_dupfd 2024-03-12 15:22:23 -04:00
libdecnumber Replace config-time define HOST_WORDS_BIGENDIAN 2022-04-06 10:50:37 +02:00
migration migration: purge MigrationState from public interface 2024-03-11 16:28:59 -04:00
monitor monitor: add more *_locked() functions 2023-05-25 10:18:33 +02:00
net Revert "tap: setting error appropriately when calling net_init_tap_one()" 2024-03-29 14:59:07 +08:00
qapi error: Add error_vprepend() in comment of ERRP_GUARD() rules 2024-03-12 11:45:33 +01:00
qemu util/qemu-config: Extract QMP commands to qemu-config-qmp.c 2024-04-18 11:17:27 +02:00
qom include/qom/object.h: New OBJECT_DEFINE_SIMPLE_TYPE{, _WITH_INTERFACES} macros 2024-02-27 13:01:42 +00:00
scsi hw/ufs: Support for UFS logical unit 2023-09-07 14:01:29 -04:00
semihosting * util/log: re-allow switching away from stderr log file 2023-10-09 10:11:18 -04:00
standard-headers linux-headers: update to current kvm/next 2024-04-23 17:35:25 +02:00
sysemu kvm: handle KVM_EXIT_MEMORY_FAULT 2024-04-23 17:35:26 +02:00
tcg tcg: Add TCGContext.emit_before_op 2024-04-09 07:45:01 -10:00
ui ui/curses: Do not use console_select() 2024-03-20 10:27:58 +04:00
user {linux,bsd}-user: Introduce get_task_state() 2024-03-06 12:35:19 +00:00
elf.h util: spelling fixes 2023-08-31 19:47:43 +02:00
glib-compat.h compiler.h: replace QEMU_NORETURN with G_NORETURN 2022-04-21 17:03:51 +04:00
qemu-io.h
qemu-main.h ui/cocoa: Run qemu_init in the main thread 2022-09-23 14:36:33 +02:00