diff options
author | Avi Kivity <avi@qumranet.com> | 2007-10-26 08:16:56 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-11-08 03:42:04 -0500 |
commit | 1e35d3c4a7a9682256c887a1388cf3faefdf53df (patch) | |
tree | 999da37bbcd4cc782ffc73a5f80268e915204e48 | |
parent | dbeeb816e805091e7cfc03baf36dc40b4adb2bbd (diff) |
KVM: x86 emulator: fix 'push imm8' emulation
'push imm8' found itself in the wrong switch somehow, so it is never executed.
This fixes Windows 2003 installation.
Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r-- | drivers/kvm/x86_emulate.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c index a6ace302e0cd..da0cdd521da9 100644 --- a/drivers/kvm/x86_emulate.c +++ b/drivers/kvm/x86_emulate.c | |||
@@ -980,17 +980,6 @@ done_prefixes: | |||
980 | goto cannot_emulate; | 980 | goto cannot_emulate; |
981 | dst.val = (s32) src.val; | 981 | dst.val = (s32) src.val; |
982 | break; | 982 | break; |
983 | case 0x6a: /* push imm8 */ | ||
984 | src.val = 0L; | ||
985 | src.val = insn_fetch(s8, 1, _eip); | ||
986 | push: | ||
987 | dst.type = OP_MEM; | ||
988 | dst.bytes = op_bytes; | ||
989 | dst.val = src.val; | ||
990 | register_address_increment(_regs[VCPU_REGS_RSP], -op_bytes); | ||
991 | dst.ptr = (void *) register_address(ctxt->ss_base, | ||
992 | _regs[VCPU_REGS_RSP]); | ||
993 | break; | ||
994 | case 0x80 ... 0x83: /* Grp1 */ | 983 | case 0x80 ... 0x83: /* Grp1 */ |
995 | switch (modrm_reg) { | 984 | switch (modrm_reg) { |
996 | case 0: | 985 | case 0: |
@@ -1243,6 +1232,17 @@ special_insn: | |||
1243 | register_address_increment(_regs[VCPU_REGS_RSP], op_bytes); | 1232 | register_address_increment(_regs[VCPU_REGS_RSP], op_bytes); |
1244 | no_wb = 1; /* Disable writeback. */ | 1233 | no_wb = 1; /* Disable writeback. */ |
1245 | break; | 1234 | break; |
1235 | case 0x6a: /* push imm8 */ | ||
1236 | src.val = 0L; | ||
1237 | src.val = insn_fetch(s8, 1, _eip); | ||
1238 | push: | ||
1239 | dst.type = OP_MEM; | ||
1240 | dst.bytes = op_bytes; | ||
1241 | dst.val = src.val; | ||
1242 | register_address_increment(_regs[VCPU_REGS_RSP], -op_bytes); | ||
1243 | dst.ptr = (void *) register_address(ctxt->ss_base, | ||
1244 | _regs[VCPU_REGS_RSP]); | ||
1245 | break; | ||
1246 | case 0x6c: /* insb */ | 1246 | case 0x6c: /* insb */ |
1247 | case 0x6d: /* insw/insd */ | 1247 | case 0x6d: /* insw/insd */ |
1248 | if (kvm_emulate_pio_string(ctxt->vcpu, NULL, | 1248 | if (kvm_emulate_pio_string(ctxt->vcpu, NULL, |