OSDN Git Service

KVM: SVM: Drop redundant writes to vmcb->save.cr4 at RESET/INIT
authorSean Christopherson <seanjc@google.com>
Tue, 13 Jul 2021 16:33:09 +0000 (09:33 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 2 Aug 2021 15:01:56 +0000 (11:01 -0400)
commit6cfe7b83acdcdd4d4ea9354f007a88bc0ccb16b9
tree8884bb508f27b018cc87537c15dd6044695a5902
parentef8a0fa59be78e7b80bdf35c3391d60c061c7b24
KVM: SVM: Drop redundant writes to vmcb->save.cr4 at RESET/INIT

Drop direct writes to vmcb->save.cr4 during vCPU RESET/INIT, as the
values being written are fully redundant with respect to
svm_set_cr4(vcpu, 0) a few lines earlier.  Note, svm_set_cr4() also
correctly forces X86_CR4_PAE when NPT is disabled.

No functional change intended.

Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210713163324.627647-32-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/svm.c