On 08/04/2010 05:44 AM, Mohammed Gamal wrote:
This adds support for int instructions to the emulator
@@ -2963,6 +3025,21 @@ special_insn:
if (rc != X86EMUL_CONTINUE)
goto done;
break;
+ case 0xcc: /* int3 */
+ irq = 3;
+ goto do_interrupt;
+ case 0xcd: /* int n */
+ irq = c->src.val;
+ do_interrupt:
+ rc = emulate_int(ctxt, ops, irq);
+ if (rc != X86EMUL_CONTINUE)
+ goto done;
+ break;
+ case 0xce: /* into */
+ if (ctxt->eflags& EFLG_OF) {
+ irq = 4;
+ goto do_interrupt;
+ }
If OF is clear, you fall through and emulate an IRET.
case 0xcf: /* iret */
rc = emulate_iret(ctxt, ops);
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html