KVM: SVM: Drop vcpu_svm.vmcb_pa
authorSean Christopherson <seanjc@google.com>
Tue, 6 Apr 2021 17:18:09 +0000 (10:18 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 20 Apr 2021 08:18:49 +0000 (04:18 -0400)
commitd1788191fdb03691059ab7aeed36206977f2d784
tree197947d4c29777031b5d7a4e8429cabe7eb99ffa
parent17e5e964eee05a3ee434cf0958ecce741a6874b1
KVM: SVM: Drop vcpu_svm.vmcb_pa

Remove vmcb_pa from vcpu_svm and simply read current_vmcb->pa directly in
the one path where it is consumed.  Unlike svm->vmcb, use of the current
vmcb's address is very limited, as evidenced by the fact that its use
can be trimmed to a single dereference.

Opportunistically add a comment about using vmcb01 for VMLOAD/VMSAVE, at
first glance using vmcb01 instead of vmcb_pa looks wrong.

No functional change intended.

Cc: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210406171811.4043363-3-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/svm.c
arch/x86/kvm/svm/svm.h