aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kvm/vmx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index f482100eff87..cc6e00a9f724 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -1007,9 +1007,9 @@ static int vmx_get_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 *pdata)
1007 data = vmcs_readl(GUEST_SYSENTER_ESP); 1007 data = vmcs_readl(GUEST_SYSENTER_ESP);
1008 break; 1008 break;
1009 default: 1009 default:
1010 vmx_load_host_state(to_vmx(vcpu));
1011 msr = find_msr_entry(to_vmx(vcpu), msr_index); 1010 msr = find_msr_entry(to_vmx(vcpu), msr_index);
1012 if (msr) { 1011 if (msr) {
1012 vmx_load_host_state(to_vmx(vcpu));
1013 data = msr->data; 1013 data = msr->data;
1014 break; 1014 break;
1015 } 1015 }
@@ -1066,9 +1066,9 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data)
1066 } 1066 }
1067 /* Otherwise falls through to kvm_set_msr_common */ 1067 /* Otherwise falls through to kvm_set_msr_common */
1068 default: 1068 default:
1069 vmx_load_host_state(vmx);
1070 msr = find_msr_entry(vmx, msr_index); 1069 msr = find_msr_entry(vmx, msr_index);
1071 if (msr) { 1070 if (msr) {
1071 vmx_load_host_state(vmx);
1072 msr->data = data; 1072 msr->data = data;
1073 break; 1073 break;
1074 } 1074 }