KVM: x86 emulator: add new ->halt() callback

Instead of reaching into vcpu internals.

Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
Avi Kivity
2011-04-20 15:43:05 +03:00
parent 3cb16fe78c
commit 6c3287f7c5
3 changed files with 8 additions and 1 deletions

View File

@@ -3913,7 +3913,7 @@ special_insn:
c->dst.type = OP_NONE; /* Disable writeback. */
break;
case 0xf4: /* hlt */
ctxt->vcpu->arch.halt_request = 1;
ctxt->ops->halt(ctxt);
break;
case 0xf5: /* cmc */
/* complement carry flag from eflags reg */