KVM: VMX: Flush volatile msrs before emulating rdmsr
Changes
1 files changed · +1 −0
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| arch/x86/kvm/vmx.c | modified | +1 | −0 | View file |
arch/x86/kvm/vmx.c
View filediff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index b1fe142..7611af5 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -903,6 +903,7 @@ static int vmx_get_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 *pdata)
data = vmcs_readl(GUEST_SYSENTER_ESP);
break;
default:
+ vmx_load_host_state(to_vmx(vcpu));
msr = find_msr_entry(to_vmx(vcpu), msr_index);
if (msr) {
data = msr->data;