diff options
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r-- | arch/x86/kvm/emulate.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 6a512532866..2b903a32609 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -2579,6 +2579,16 @@ static int em_invlpg(struct x86_emulate_ctxt *ctxt) | |||
2579 | return X86EMUL_CONTINUE; | 2579 | return X86EMUL_CONTINUE; |
2580 | } | 2580 | } |
2581 | 2581 | ||
2582 | static int em_clts(struct x86_emulate_ctxt *ctxt) | ||
2583 | { | ||
2584 | ulong cr0; | ||
2585 | |||
2586 | cr0 = ctxt->ops->get_cr(ctxt, 0); | ||
2587 | cr0 &= ~X86_CR0_TS; | ||
2588 | ctxt->ops->set_cr(ctxt, 0, cr0); | ||
2589 | return X86EMUL_CONTINUE; | ||
2590 | } | ||
2591 | |||
2582 | static bool valid_cr(int nr) | 2592 | static bool valid_cr(int nr) |
2583 | { | 2593 | { |
2584 | switch (nr) { | 2594 | switch (nr) { |
@@ -4079,7 +4089,7 @@ twobyte_insn: | |||
4079 | rc = emulate_syscall(ctxt, ops); | 4089 | rc = emulate_syscall(ctxt, ops); |
4080 | break; | 4090 | break; |
4081 | case 0x06: | 4091 | case 0x06: |
4082 | emulate_clts(ctxt->vcpu); | 4092 | rc = em_clts(ctxt); |
4083 | break; | 4093 | break; |
4084 | case 0x09: /* wbinvd */ | 4094 | case 0x09: /* wbinvd */ |
4085 | kvm_emulate_wbinvd(ctxt->vcpu); | 4095 | kvm_emulate_wbinvd(ctxt->vcpu); |