diff options
author | Avi Kivity <avi@redhat.com> | 2009-02-15 02:32:07 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-02-15 02:32:07 +0200 |
commit | 865d48188a04fc8fe93ff470d9dff7ca59737ce3 (patch) | |
tree | d8887ccbf50eb591bcdcd8dd90decd93d03ec86b | |
parent | 48aa74b80e1dbef32f756104a9f5a18f58429c25 (diff) |
KVM: VMX: Flush volatile msrs before emulating rdmsrkvm-84
Some msrs (notable MSR_KERNEL_GS_BASE) are held in the processor registers
and need to be flushed to the vcpu struture before they can be read.
This fixes cygwin longjmp() failure on Windows x64.
Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r-- | arch/x86/kvm/vmx.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 7507ce216cec..cb27ffccf466 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -910,6 +910,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; |