summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/smm.c
diff options
context:
space:
mode:
authorMichal Luczaj <mhal@rbox.co>2023-08-15 00:08:35 +0200
committerSean Christopherson <seanjc@google.com>2023-09-27 12:57:48 -0700
commit9dbb029b9c44a84968317d462eaa5a748317d8fb (patch)
tree8950643c9be5467d17eca00daf5b869188fabc1a /arch/x86/kvm/smm.c
parent5804c19b80bf625c6a9925317f845e497434d6d3 (diff)
KVM: x86: Remove redundant vcpu->arch.cr0 assignments
Drop the vcpu->arch.cr0 assignment after static_call(kvm_x86_set_cr0). CR0 was already set by {vmx,svm}_set_cr0(). Signed-off-by: Michal Luczaj <mhal@rbox.co> Link: https://lore.kernel.org/r/20230814222358.707877-2-mhal@rbox.co Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'arch/x86/kvm/smm.c')
-rw-r--r--arch/x86/kvm/smm.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/x86/kvm/smm.c b/arch/x86/kvm/smm.c
index b42111a24cc2..dc3d95fdca7d 100644
--- a/arch/x86/kvm/smm.c
+++ b/arch/x86/kvm/smm.c
@@ -324,7 +324,6 @@ void enter_smm(struct kvm_vcpu *vcpu)
cr0 = vcpu->arch.cr0 & ~(X86_CR0_PE | X86_CR0_EM | X86_CR0_TS | X86_CR0_PG);
static_call(kvm_x86_set_cr0)(vcpu, cr0);
- vcpu->arch.cr0 = cr0;
static_call(kvm_x86_set_cr4)(vcpu, 0);