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:
Jan Beulich committed 2019-09-30 15:45:16 +02:00
1 parent d5b7d10cb4
commit 7cc2fe0ddc
1 file changed
+2 -1
+2 -1
View File
@@ -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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.