From: Jan Beulich Date: Fri, 12 Aug 2016 14:55:48 +0000 (+0200) Subject: x86emul: all push flavors are data moves X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~562 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3c71d160677fa4f4b769f33fe201ecd9219ab234;p=xen.git x86emul: all push flavors are data moves Make all paths leading to the "push" label have the Mov flag set, and ASSERT() that to be the case. For the opcode FF group the adjustment is benign for the paths not leading to "push", as they all set dst.type to OP_NONE Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c index 2cdcbd4488..101fb62093 100644 --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -122,7 +122,7 @@ static uint8_t opcode_table[256] = { ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps, /* 0x98 - 0x9F */ ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps, - ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps, + ImplicitOps|Mov, ImplicitOps|Mov, ImplicitOps, ImplicitOps, /* 0xA0 - 0xA7 */ ByteOp|ImplicitOps|Mov, ImplicitOps|Mov, ByteOp|ImplicitOps|Mov, ImplicitOps|Mov, @@ -1902,7 +1902,7 @@ x86_emulate( /* fall through */ case 3: /* call (far, absolute indirect) */ case 5: /* jmp (far, absolute indirect) */ - d = DstNone|SrcMem|ModRM; + d = DstNone | SrcMem | ModRM | Mov; break; } break; @@ -2346,7 +2346,7 @@ x86_emulate( case 0x68: /* push imm{16,32,64} */ case 0x6a: /* push imm8 */ push: - d |= Mov; /* force writeback */ + ASSERT(d & Mov); /* writeback needed */ dst.type = OP_MEM; dst.bytes = mode_64bit() && (op_bytes == 4) ? 8 : op_bytes; dst.val = src.val;