diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 0d25fc16d98bb505a1328ece7c5ab74be3db9bc7..330a08aa0291e12ecc9e872abcb70997a71bb0ab 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -1673,7 +1673,9 @@ static bool update_transition_efer(struct vcpu_vmx *vmx, int efer_offset) guest_efer = vmx->vcpu.arch.efer; if (!(guest_efer & EFER_LMA)) guest_efer &= ~EFER_LME; - add_atomic_switch_msr(vmx, MSR_EFER, guest_efer, host_efer); + if (guest_efer != host_efer) + add_atomic_switch_msr(vmx, MSR_EFER, + guest_efer, host_efer); return false; }