diff options
author | Avi Kivity <avi@redhat.com> | 2010-01-21 08:31:47 -0500 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2010-03-01 10:36:04 -0500 |
commit | 6b52d18605f580bdffaffd48c8da228c3e848deb (patch) | |
tree | b2bf6e704dc5c0b44714d38c955460d70f76b913 /arch/x86/kvm/vmx.c | |
parent | e5bb40251a920cdd9d12c569c6aab0bdd0279e4e (diff) |
KVM: Activate fpu on clts
Assume that if the guest executes clts, it knows what it's doing, and load the
guest fpu to prevent an #NM exception.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-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 b7e812e9c299..fad871cbed19 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -3002,6 +3002,7 @@ static int handle_cr(struct kvm_vcpu *vcpu) | |||
3002 | vmx_set_cr0(vcpu, kvm_read_cr0_bits(vcpu, ~X86_CR0_TS)); | 3002 | vmx_set_cr0(vcpu, kvm_read_cr0_bits(vcpu, ~X86_CR0_TS)); |
3003 | trace_kvm_cr_write(0, kvm_read_cr0(vcpu)); | 3003 | trace_kvm_cr_write(0, kvm_read_cr0(vcpu)); |
3004 | skip_emulated_instruction(vcpu); | 3004 | skip_emulated_instruction(vcpu); |
3005 | vmx_fpu_activate(vcpu); | ||
3005 | return 1; | 3006 | return 1; |
3006 | case 1: /*mov from cr*/ | 3007 | case 1: /*mov from cr*/ |
3007 | switch (cr) { | 3008 | switch (cr) { |