diff options
author | Avi Kivity <avi@redhat.com> | 2011-04-20 15:32:49 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-05-22 08:39:14 -0400 |
commit | 2d04a05bd7e93c13f13a82ac40de4065a99d069b (patch) | |
tree | 6fc122171050ca4b0a6aca5ab5aeb8d94add0108 /arch/x86/kvm/x86.c | |
parent | fd72c4192220d0086fb24356ac6ff9c3b1e067d9 (diff) | |
download | linux-3.10-2d04a05bd7e93c13f13a82ac40de4065a99d069b.tar.gz linux-3.10-2d04a05bd7e93c13f13a82ac40de4065a99d069b.tar.bz2 linux-3.10-2d04a05bd7e93c13f13a82ac40de4065a99d069b.zip |
KVM: x86 emulator: emulate CLTS internally
Avoid using ctxt->vcpu; we can do everything with ->get_cr() and ->set_cr().
A side effect is that we no longer activate the fpu on emulated CLTS; but that
should be very rare.
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 7cd3a3b491d..a9e83862feb 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4153,13 +4153,6 @@ int kvm_emulate_wbinvd(struct kvm_vcpu *vcpu) } EXPORT_SYMBOL_GPL(kvm_emulate_wbinvd); -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; -} - int emulator_get_dr(struct x86_emulate_ctxt *ctxt, int dr, unsigned long *dest) { return _kvm_get_dr(emul_to_vcpu(ctxt), dr, dest); |