KVM: SVM: Add a comment to clarify what vcpu_svm.vmcb points at
authorSean Christopherson <seanjc@google.com>
Tue, 6 Apr 2021 17:18:10 +0000 (10:18 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 20 Apr 2021 08:18:49 +0000 (04:18 -0400)
Add a comment above the declaration of vcpu_svm.vmcb to call out that it
is simply a shorthand for current_vmcb->ptr.  The myriad accesses to
svm->vmcb are quite confusing without this crucial detail.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210406171811.4043363-4-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/svm.h

index 04e21ff..c4a0eab 100644 (file)
@@ -110,6 +110,7 @@ struct svm_nested_state {
 
 struct vcpu_svm {
        struct kvm_vcpu vcpu;
+       /* vmcb always points at current_vmcb->ptr, it's purely a shorthand. */
        struct vmcb *vmcb;
        struct kvm_vmcb_info vmcb01;
        struct kvm_vmcb_info *current_vmcb;