From 7824ece26e1cce33d5834d1bd7a0a605747e0392 Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Tue, 6 Jul 2010 16:54:19 +0800 Subject: [PATCH] --- yaml --- r: 202395 b: refs/heads/master c: 07cbc6c185aee2c0479776845988242a040c7c93 h: refs/heads/master i: 202393: 50f389e4c85fb23a70a240de4557862e1d882f3d 202391: 252f4e096dcbc88b9c31803afe85b202495f141d v: v3 --- [refs] | 2 +- trunk/arch/x86/kvm/emulate.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 46f58defaea7..618eaa93c42b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b16b2b7bb5a78afceb7fe22f2a04476cd70182b7 +refs/heads/master: 07cbc6c185aee2c0479776845988242a040c7c93 diff --git a/trunk/arch/x86/kvm/emulate.c b/trunk/arch/x86/kvm/emulate.c index 8337567a0f44..286572a5675b 100644 --- a/trunk/arch/x86/kvm/emulate.c +++ b/trunk/arch/x86/kvm/emulate.c @@ -2979,17 +2979,19 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) c->dst.type = OP_NONE; /* Disable writeback. */ break; case 0xfa: /* cli */ - if (emulator_bad_iopl(ctxt, ops)) + if (emulator_bad_iopl(ctxt, ops)) { emulate_gp(ctxt, 0); - else { + goto done; + } else { ctxt->eflags &= ~X86_EFLAGS_IF; c->dst.type = OP_NONE; /* Disable writeback. */ } break; case 0xfb: /* sti */ - if (emulator_bad_iopl(ctxt, ops)) + if (emulator_bad_iopl(ctxt, ops)) { emulate_gp(ctxt, 0); - else { + goto done; + } else { ctxt->interruptibility = KVM_X86_SHADOW_INT_STI; ctxt->eflags |= X86_EFLAGS_IF; c->dst.type = OP_NONE; /* Disable writeback. */