summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-02-15 01:32:07 +0100
committerAvi Kivity <avi@redhat.com>2009-02-15 01:47:39 +0100
commit516a1a7e9dc80358030fe01aabb3bedf882db9e2 (patch)
treef1bf5820a7784d2f6ca46b82aa104230df7a3e20 /arch/x86
parentKVM: Fix assigned devices circular locking dependency (diff)
downloadlinux-516a1a7e9dc80358030fe01aabb3bedf882db9e2.tar.xz
linux-516a1a7e9dc80358030fe01aabb3bedf882db9e2.zip
KVM: VMX: Flush volatile msrs before emulating rdmsr
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>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kvm/vmx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index b1fe1422afb1..7611af576829 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;