aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorMohammed Gamal <m.gamal005@gmail.com>2008-07-06 09:51:26 -0400
committerAvi Kivity <avi@qumranet.com>2008-07-20 05:42:38 -0400
commit19fdfa0d133ae216e9d1c69a8333fe63fcf8e584 (patch)
tree57264290c1b85a6b44e6d15814236f2c32051aed /arch/x86/kvm
parentac9f6dc0db0b5582ebf8bb720d7c41c3d2159013 (diff)
KVM: x86 emulator: Fix HLT instruction
This patch fixes issue encountered with HLT instruction under FreeDOS's HIMEM XMS Driver. The HLT instruction jumped directly to the done label and skips updating the EIP value, therefore causing the guest to spin endlessly on the same instruction. The patch changes the instruction so that it writes back the updated EIP value. Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/x86_emulate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c
index 18ca25c2d4a4..8bc63f62fbbd 100644
--- a/arch/x86/kvm/x86_emulate.c
+++ b/arch/x86/kvm/x86_emulate.c
@@ -1731,7 +1731,7 @@ special_insn:
1731 break; 1731 break;
1732 case 0xf4: /* hlt */ 1732 case 0xf4: /* hlt */
1733 ctxt->vcpu->arch.halt_request = 1; 1733 ctxt->vcpu->arch.halt_request = 1;
1734 goto done; 1734 break;
1735 case 0xf5: /* cmc */ 1735 case 0xf5: /* cmc */
1736 /* complement carry flag from eflags reg */ 1736 /* complement carry flag from eflags reg */
1737 ctxt->eflags ^= EFLG_CF; 1737 ctxt->eflags ^= EFLG_CF;