Messages in this thread Patch in this message | | | From | Andy Lutomirski <> | Subject | [PATCH] x86, kvm, vmx: Don't set LOAD_IA32_EFER when host and guest match | Date | Mon, 10 Nov 2014 11:19:15 -0800 |
| |
There's nothing to switch if the host and guest values are the same. I am unable to find evidence that this makes any difference whatsoever.
Signed-off-by: Andy Lutomirski <luto@amacapital.net> --- arch/x86/kvm/vmx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index e72b9660e51c..c430b01b012b 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -1670,7 +1670,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; } -- 1.9.3
| |