x86_emulate: properly do IP updates and other side effects on success
authorJan Beulich <jbeulich@suse.com>
Fri, 8 Aug 2014 07:34:03 +0000 (09:34 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 8 Aug 2014 07:34:03 +0000 (09:34 +0200)
commit3af450fd2d9403f208d3ac6459716f027b8597ad
tree9632c6b78b654342abc854ca4512d7fdca67a03e
parentbf28eecf7b681366ecfbdf250c3c5015ff21fdee
x86_emulate: properly do IP updates and other side effects on success

The two MMX/SSE/AVX code blocks failed to update IP properly, and these
as well as get_reg_refix(), which "manually" updated IP so far, failed
to do the TF and RF processing needed at the end of successfully
emulated instructions.

Fix the test utility at once to check IP is properly getting updated,
and while at it macroize the respective code quite a bit, hopefully
making it easier to add further tests when the need arises.

Reported-by: Andrei LUTAS <vlutas@bitdefender.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Reviewed-by: Andrew Cooper <andrew.cooper@citrix.com>
tools/tests/x86_emulator/test_x86_emulator.c
xen/arch/x86/x86_emulate/x86_emulate.c