diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-06-11 09:57:58 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-07-12 17:17:47 +0200 |
commit | 6e01b7601dfed61bcccd8c386c5084fc0d53d20b (patch) | |
tree | 89d18c832d4be497ceac0499e2406233cb507de6 /arch/x86/kvm/Kconfig | |
parent | KVM: x86/mmu: Make kvm_mmu_do_page_fault() return mapped level (diff) | |
download | linux-6e01b7601dfed61bcccd8c386c5084fc0d53d20b.tar.xz linux-6e01b7601dfed61bcccd8c386c5084fc0d53d20b.zip |
KVM: x86: Implement kvm_arch_vcpu_pre_fault_memory()
Wire KVM_PRE_FAULT_MEMORY ioctl to kvm_mmu_do_page_fault() to populate guest
memory. It can be called right after KVM_CREATE_VCPU creates a vCPU,
since at that point kvm_mmu_create() and kvm_init_mmu() are called and
the vCPU is ready to invoke the KVM page fault handler.
The helper function kvm_tdp_map_page() takes care of the logic to
process RET_PF_* return values and convert them to success or errno.
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
Message-ID: <9b866a0ae7147f96571c439e75429a03dcb659b6.1712785629.git.isaku.yamahata@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/Kconfig')
-rw-r--r-- | arch/x86/kvm/Kconfig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig index 80e5afde69f4..4287a8071a3a 100644 --- a/arch/x86/kvm/Kconfig +++ b/arch/x86/kvm/Kconfig @@ -44,6 +44,7 @@ config KVM select KVM_VFIO select HAVE_KVM_PM_NOTIFIER if PM select KVM_GENERIC_HARDWARE_ENABLING + select KVM_GENERIC_PRE_FAULT_MEMORY select KVM_WERROR if WERROR help Support hosting fully virtualized guest machines using hardware |