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:42:04 +0000 (16:42 +0200)
commitb02ba11e1ba0ad7fd16b1b0cf0ba556ac4e8ac62
tree48e1c9baad56315e15332b91e811abfed1d83960
parente089a83fbc55b8057f332c00f125acaa02b08ef7
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