KVM/nSVM: properly map nested VMCB
authorVitaly Kuznetsov <vkuznets@redhat.com>
Tue, 4 Jun 2019 16:09:39 +0000 (18:09 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 4 Jun 2019 17:27:27 +0000 (19:27 +0200)
commit8f38302c0be2d2daf3b40f7d2142ec77e35d209e
treec6b4164bdf4b949489b517ed5e97b069bdb1f6e4
parentf3ecb59dd49f1742b97df6ba071aaa3d031154ac
KVM/nSVM: properly map nested VMCB

Commit 8c5fbf1a7231 ("KVM/nSVM: Use the new mapping API for mapping guest
memory") broke nested SVM completely: kvm_vcpu_map()'s second parameter is
GFN so vmcb_gpa needs to be converted with gpa_to_gfn(), not the other way
around.

Fixes: 8c5fbf1a7231 ("KVM/nSVM: Use the new mapping API for mapping guest memory")
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm.c