mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
x86emul: move ARPL #UD check
The #UD for being outside of protected mode gets raised for ARPL only after having read the memory operand - correct this by moving up the respective construct. Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Release-acked-by: Juergen Gross <jgross@suse.com>
This commit is contained in:
1 parent
d5b7d10cb4
commit
7cc2fe0ddc
1 file changed
+2
-1
@@ -4061,6 +4061,8 @@ x86_emulate(
|
||||
/* arpl */
|
||||
unsigned int src_rpl = dst.val & 3;
|
||||
|
||||
generate_exception_if(!in_protmode(ctxt, ops), EXC_UD);
|
||||
|
||||
dst = ea;
|
||||
dst.bytes = 2;
|
||||
if ( dst.type == OP_REG )
|
||||
@@ -4078,7 +4080,6 @@ x86_emulate(
|
||||
_regs.eflags &= ~X86_EFLAGS_ZF;
|
||||
dst.type = OP_NONE;
|
||||
}
|
||||
generate_exception_if(!in_protmode(ctxt, ops), EXC_UD);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||