mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
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>
This commit is contained in:
parent
8d379a7c06
commit
404fb881b8
1 changed files with 1 additions and 2 deletions
|
|
@ -1188,8 +1188,7 @@ int emulate_invlpg(struct kvm_vcpu *vcpu, gva_t address)
|
||||||
|
|
||||||
int emulate_clts(struct kvm_vcpu *vcpu)
|
int emulate_clts(struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
vcpu->cr0 &= ~X86_CR0_TS;
|
kvm_x86_ops->set_cr0(vcpu, vcpu->cr0 & ~X86_CR0_TS);
|
||||||
kvm_x86_ops->set_cr0(vcpu, vcpu->cr0);
|
|
||||||
return X86EMUL_CONTINUE;
|
return X86EMUL_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue