aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/emulate.c
diff options
context:
space:
mode:
authorMohammed Gamal <m.gamal005@gmail.com>2010-08-05 08:42:49 -0400
committerAvi Kivity <avi@redhat.com>2010-10-24 04:51:01 -0400
commit8744aa9aad56be756a58126b429f176898631c3f (patch)
treeb8a51e851a3a20abae829a7e04228c722a2021a5 /arch/x86/kvm/emulate.c
parentc034da8b927dc682fe7944895d67f99f07e3740f (diff)
KVM: x86 emulator: Add stc instruction (opcode 0xf9)
Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r--arch/x86/kvm/emulate.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index d711d6aa8165..175b41690d6f 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -2269,7 +2269,7 @@ static struct opcode opcode_table[256] = {
2269 N, N, N, N, 2269 N, N, N, N,
2270 D(ImplicitOps | Priv), D(ImplicitOps), G(ByteOp, group3), G(0, group3), 2270 D(ImplicitOps | Priv), D(ImplicitOps), G(ByteOp, group3), G(0, group3),
2271 /* 0xF8 - 0xFF */ 2271 /* 0xF8 - 0xFF */
2272 D(ImplicitOps), N, D(ImplicitOps), D(ImplicitOps), 2272 D(ImplicitOps), D(ImplicitOps), D(ImplicitOps), D(ImplicitOps),
2273 D(ImplicitOps), D(ImplicitOps), G(0, group4), G(0, group5), 2273 D(ImplicitOps), D(ImplicitOps), G(0, group4), G(0, group5),
2274}; 2274};
2275 2275
@@ -3124,6 +3124,9 @@ special_insn:
3124 case 0xf8: /* clc */ 3124 case 0xf8: /* clc */
3125 ctxt->eflags &= ~EFLG_CF; 3125 ctxt->eflags &= ~EFLG_CF;
3126 break; 3126 break;
3127 case 0xf9: /* stc */
3128 ctxt->eflags |= EFLG_CF;
3129 break;
3127 case 0xfa: /* cli */ 3130 case 0xfa: /* cli */
3128 if (emulator_bad_iopl(ctxt, ops)) { 3131 if (emulator_bad_iopl(ctxt, ops)) {
3129 emulate_gp(ctxt, 0); 3132 emulate_gp(ctxt, 0);