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>
This commit is contained in:

committed by
Marcelo Tosatti

parent
e5bb40251a
commit
6b52d18605
@@ -3269,6 +3269,7 @@ int emulate_invlpg(struct kvm_vcpu *vcpu, gva_t address)
|
||||
int emulate_clts(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
kvm_x86_ops->set_cr0(vcpu, kvm_read_cr0_bits(vcpu, ~X86_CR0_TS));
|
||||
kvm_x86_ops->fpu_activate(vcpu);
|
||||
return X86EMUL_CONTINUE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user