x86/emul: Correct the behaviour of pop %ss and interrupt shadowing
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 29 Nov 2016 18:35:46 +0000 (18:35 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 2 Dec 2016 17:23:01 +0000 (17:23 +0000)
commit8d246db03eaa339c88e04ba5bea356164ea26d2a
treedcab72c6b6705b940ae8977b242f41b921d5db34
parentda1d7f6da6227ae2a5139e6674f1c0f8930a188b
x86/emul: Correct the behaviour of pop %ss and interrupt shadowing

The mov_ss retire flag should only be set once load_seg() has returned
success.  In particular, it should not be set if an exception occured when
trying to load %ss.

_hvm_emulate_one(), currently the sole user of mov_ss, only consideres it in
the case that x86_emulate() returns X86EMUL_OKAY, so this bug isn't actually
exposed to guests.

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