diff mbox series

[2/2] KVM: nVMX: remove unnecessary CR4_READ_SHADOW write

Message ID 20240416123558.212040-2-julian.stecklina@cyberus-technology.de (mailing list archive)
State New, archived
Headers show
Series [1/2] KVM: nVMX: fix CR4_READ_SHADOW when L0 updates CR4 during a signal | expand

Commit Message

Julian Stecklina April 16, 2024, 12:35 p.m. UTC
From: Thomas Prescher <thomas.prescher@cyberus-technology.de>

This explicit change of CR4_READ_SHADOW is no longer necessary because
it is now handled in vmx_set_cr4.

Signed-off-by: Julian Stecklina <julian.stecklina@cyberus-technology.de>
Signed-off-by: Thomas Prescher <thomas.prescher@cyberus-technology.de>
---
 arch/x86/kvm/vmx/nested.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
index d05ddf751491..e191bf5d4831 100644
--- a/arch/x86/kvm/vmx/nested.c
+++ b/arch/x86/kvm/vmx/nested.c
@@ -2639,7 +2639,6 @@  static int prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12,
 	vmcs_writel(CR0_READ_SHADOW, nested_read_cr0(vmcs12));
 
 	vmx_set_cr4(vcpu, vmcs12->guest_cr4);
-	vmcs_writel(CR4_READ_SHADOW, nested_read_cr4(vmcs12));
 
 	vcpu->arch.efer = nested_vmx_calc_efer(vmx, vmcs12);
 	/* Note: may modify VM_ENTRY/EXIT_CONTROLS and GUEST/HOST_IA32_EFER */