]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Clean up and document nested #PF workaround
authorSean Christopherson <seanjc@google.com>
Fri, 4 Mar 2022 04:20:17 +0000 (20:20 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 29 Apr 2022 16:49:49 +0000 (12:49 -0400)
commit32b0980e03d783a34a3cbc661d05df8c137831ab
treeb374084b3096f02be7755060ce7cdd5debd3eefd
parent7a798940b9e50c504690a84093b092951d3008af
KVM: x86: Clean up and document nested #PF workaround

Replace the per-vendor hack-a-fix for KVM's #PF => #PF => #DF workaround
with an explicit, common workaround in kvm_inject_emulated_page_fault().
Aside from being a hack, the current approach is brittle and incomplete,
e.g. nSVM's KVM_SET_NESTED_STATE fails to set ->inject_page_fault(),
and nVMX fails to apply the workaround when VMX is intercepting #PF due
to allow_smaller_maxphyaddr=1.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm/nested.c
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/x86.c