|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86_emulate: Do not push an error code onto a #UD exception stack
# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1332535908 0
# Node ID 4bd752a4cdf323c41c50f8cd6286f566d67adeae
# Parent 2e45b26bc412099a2b8f009bcf111e4b6c23847b
x86_emulate: Do not push an error code onto a #UD exception stack
Signed-off-by: Keir Fraser <keir@xxxxxxx>
---
diff -r 2e45b26bc412 -r 4bd752a4cdf3 xen/arch/x86/x86_emulate/x86_emulate.c
--- a/xen/arch/x86/x86_emulate/x86_emulate.c Fri Mar 23 20:45:16 2012 +0000
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c Fri Mar 23 20:51:48 2012 +0000
@@ -1429,7 +1429,7 @@
}
/* Lock prefix is allowed only on RMW instructions. */
- generate_exception_if((d & Mov) && lock_prefix, EXC_UD, 0);
+ generate_exception_if((d & Mov) && lock_prefix, EXC_UD, -1);
/* ModRM and SIB bytes. */
if ( d & ModRM )
@@ -1712,12 +1712,12 @@
lock_prefix &&
((b < 0x20) || (b > 0x23)) && /* MOV CRn/DRn */
(b != 0xc7), /* CMPXCHG{8,16}B */
- EXC_UD, 0);
+ EXC_UD, -1);
dst.type = OP_NONE;
break;
case DstReg:
- generate_exception_if(lock_prefix, EXC_UD, 0);
+ generate_exception_if(lock_prefix, EXC_UD, -1);
dst.type = OP_REG;
if ( d & ByteOp )
{
@@ -1773,7 +1773,7 @@
dst = ea;
if ( dst.type == OP_REG )
{
- generate_exception_if(lock_prefix, EXC_UD, 0);
+ generate_exception_if(lock_prefix, EXC_UD, -1);
switch ( dst.bytes )
{
case 1: dst.val = *(uint8_t *)dst.reg; break;
@@ -3785,14 +3785,14 @@
struct segment_register cs = { 0 }, ss = { 0 };
int rc;
- generate_exception_if(in_realmode(ctxt, ops), EXC_UD, 0);
- generate_exception_if(!in_protmode(ctxt, ops), EXC_UD, 0);
+ generate_exception_if(in_realmode(ctxt, ops), EXC_UD, -1);
+ generate_exception_if(!in_protmode(ctxt, ops), EXC_UD, -1);
/* Inject #UD if syscall/sysret are disabled. */
fail_if(ops->read_msr == NULL);
if ( (rc = ops->read_msr(MSR_EFER, &msr_content, ctxt)) != 0 )
goto done;
- generate_exception_if((msr_content & EFER_SCE) == 0, EXC_UD, 0);
+ generate_exception_if((msr_content & EFER_SCE) == 0, EXC_UD, -1);
if ( (rc = ops->read_msr(MSR_STAR, &msr_content, ctxt)) != 0 )
goto done;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |