diff options
author | Amit Shah <amit.shah@qumranet.com> | 2007-11-19 10:57:35 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-11-27 08:38:18 -0500 |
commit | 404fb881b82cf0cf6981832f8d31a7484e4dee81 (patch) | |
tree | 5da55ec34573b2f691f66f3a0b35a1698393a06f | |
parent | 8d379a7c069179a98616c9cac6bb2a06a500de49 (diff) |
KVM: SVM: Fix FPU leak while emulating clts
The clts code didn't use set_cr0 properly, so our lazy FPU
processing wasn't being done by the clts instruction at all.
(this isn't called on Intel as the hardware does the decode for us)
Signed-off-by: Amit Shah <amit.shah@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r-- | drivers/kvm/kvm_main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index 07ae280e8fe5..47c10b8f89b3 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c | |||
@@ -1188,8 +1188,7 @@ int emulate_invlpg(struct kvm_vcpu *vcpu, gva_t address) | |||
1188 | 1188 | ||
1189 | int emulate_clts(struct kvm_vcpu *vcpu) | 1189 | int emulate_clts(struct kvm_vcpu *vcpu) |
1190 | { | 1190 | { |
1191 | vcpu->cr0 &= ~X86_CR0_TS; | 1191 | kvm_x86_ops->set_cr0(vcpu, vcpu->cr0 & ~X86_CR0_TS); |
1192 | kvm_x86_ops->set_cr0(vcpu, vcpu->cr0); | ||
1193 | return X86EMUL_CONTINUE; | 1192 | return X86EMUL_CONTINUE; |
1194 | } | 1193 | } |
1195 | 1194 | ||