]> xenbits.xensource.com Git - xen.git/commit
x86emul: don't assume a memory operand
authorJan Beulich <jbeulich@suse.com>
Wed, 7 Dec 2016 13:39:08 +0000 (14:39 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 7 Dec 2016 13:39:08 +0000 (14:39 +0100)
commit216c2976563d6431de8dfc9db64462a98a100687
treebd96010bf5ff62dc5d0d3ece323703a63d5b0d17
parent7a95e0a2c572fbbc827722c6f61a12cc4af3ef8f
x86emul: don't assume a memory operand

Especially for x86_insn_operand_ea() to return dependable segment
information even when the caller didn't consider applicability, we
shouldn't have ea.type start out as OP_MEM. Make it OP_NONE instead,
and set it to OP_MEM when we actually encounter memory like operands.

This requires to eliminate the XSA-123 fix, which has been no longer
necessary since the elimination of the union in commit dd766684e7. That
in turn allows restricting the scope of override_seg to x86_decode().
At this occasion also make it have a proper type, instead of plain int.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/x86_emulate/x86_emulate.c