]> 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)
commitc2e83ff9698fed09be92aa6d48873579027f0b92
treeb374084b3096f02be7755060ce7cdd5debd3eefd
parentf1bc0e0bbd65061f2acfc8f27abf33f6442e501f
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