aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2012-01-17 11:35:03 +0000
committerDavid Vrabel <david.vrabel@citrix.com>2012-01-17 11:35:03 +0000
commit7a9b8deeca5c8c5ccf7bb4656b01893b0913f4e7 (patch)
tree4c3d3c4cdf6a539f51c14b2aa9ac95f03057fcba
parentc3219b8d23a5e2c174e9c347cde9eb9ec50b0598 (diff)
downloadxen-7a9b8deeca5c8c5ccf7bb4656b01893b0913f4e7.tar.gz
xen-7a9b8deeca5c8c5ccf7bb4656b01893b0913f4e7.tar.bz2
xen-7a9b8deeca5c8c5ccf7bb4656b01893b0913f4e7.zip
x86: emulate lea with two register operands correctly
An lea instruction with two register operands should raise an undefined instruction exception. Skype does such a instruction and will crash when starting if it does not get the exception. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Signed-off-by: Keir Fraser <keir@xen.org> Committed-by: Keir Fraser <keir@xen.org> xen-unstable changeset: 24456:03781de56c31 xen-unstable date: Thu Jan 05 15:47:16 2012 +0000
-rw-r--r--xen/arch/x86/x86_emulate/x86_emulate.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index 1e5c41bdd1..aa491f1de4 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -2056,6 +2056,7 @@ x86_emulate(
}
case 0x8d: /* lea */
+ generate_exception_if(ea.type != OP_MEM, EXC_UD, -1);
dst.val = ea.mem.off;
break;