You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/target/i386/kvm
Tom Lendacky 4cdc489eb9 i386/kvm: Prefault memory on page state change
A page state change is typically followed by an access of the page(s) and
results in another VMEXIT in order to map the page into the nested page
table. Depending on the size of page state change request, this can
generate a number of additional VMEXITs. For example, under SNP, when
Linux is utilizing lazy memory acceptance, memory is typically accepted in
4M chunks. A page state change request is submitted to mark the pages as
private, followed by validation of the memory. Since the guest_memfd
currently only supports 4K pages, each page validation will result in
VMEXIT to map the page, resulting in 1024 additional exits.

When performing a page state change, invoke KVM_PRE_FAULT_MEMORY for the
size of the page state change in order to pre-map the pages and avoid the
additional VMEXITs. This helps speed up boot times.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Link: https://lore.kernel.org/r/f5411c42340bd2f5c14972551edb4e959995e42b.1743193824.git.thomas.lendacky@amd.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 days ago
..
hyperv-proto.h hw/hyperv/hyperv-proto: Move SYNDBG definitions from target/i386 3 months ago
hyperv-stub.c target/i386: hyperv: add stub for hyperv_syndbg_query_options 7 months ago
hyperv.c exec/cpu-all: remove exec/target_page include 2 months ago
hyperv.h include: Rename sysemu/ -> system/ 6 months ago
kvm-cpu.c qom: Have class_init() take a const data argument 1 month ago
kvm.c i386/kvm: Prefault memory on page state change 2 days ago
kvm_i386.h i386/tdx: Add TDX fixed1 bits to supported CPUIDs 2 weeks ago
meson.build i386/tdx: Initialize TDX before creating TD vcpus 2 weeks ago
tdx-stub.c i386/tdx: Handle KVM_SYSTEM_EVENT_TDX_FATAL 2 weeks ago
tdx.c i386/tdx: Fix build on 32-bit host 4 days ago
tdx.h i386/tdx: Handle KVM_SYSTEM_EVENT_TDX_FATAL 2 weeks ago
trace-events i386/kvm: Add KVM_EXIT_HYPERCALL handling for KVM_HC_MAP_GPA_RANGE 1 year ago
trace.h
vmsr_energy.c cleanup: Drop pointless return at end of function 1 month ago
vmsr_energy.h Add support for RAPL MSRs in KVM/Qemu 11 months ago
xen-compat.h i386/xen: Implement HYPERVISOR_physdev_op 2 years ago
xen-emu.c exec/cpu-all: remove exec/target_page include 2 months ago
xen-emu.h hw/xen: Support HVM_PARAM_CALLBACK_TYPE_GSI callback 2 years ago