KVM: nSVM: fix condition for filtering async PF
authorPaolo Bonzini <pbonzini@redhat.com>
Sat, 16 May 2020 13:19:06 +0000 (09:19 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Jun 2020 14:40:34 +0000 (16:40 +0200)
commit3c0bee0c0757161cde31240ed7ca625877147516
tree5e6862e11c2b0840f7a1fa8dfabc91d148ec810c
parent64b8f33b2e1e687d465b5cb382e7bec495f1e026
KVM: nSVM: fix condition for filtering async PF

commit a3535be731c2a343912578465021f50937f7b099 upstream.

Async page faults have to be trapped in the host (L1 in this case),
since the APF reason was passed from L0 to L1 and stored in the L1 APF
data page.  This was completely reversed: the page faults were passed
to the guest, a L2 hypervisor.

Cc: stable@vger.kernel.org
Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/svm.c