[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] Fix x86_emulate instruction check



FPU instruction check should be against modrm, not modrm_reg, which only
contains a small part of it (and not the needed part...)

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>

diff -r 50bc54fc91dd xen/arch/x86/x86_emulate.c
--- a/xen/arch/x86/x86_emulate.c        Mon Feb 25 12:08:05 2008 +0000
+++ b/xen/arch/x86/x86_emulate.c        Tue Feb 26 11:30:27 2008 +0000
@@ -2671,7 +2671,7 @@ x86_emulate(
         fail_if(ops->load_fpu_ctxt == NULL);
         ops->load_fpu_ctxt(ctxt);
         fail_if((modrm_reg & 7) != 7);
-        fail_if(modrm_reg >= 0xc0);
+        fail_if(modrm >= 0xc0);
         /* fnstcw m2byte */
         ea.bytes = 2;
         dst = ea;
@@ -2690,7 +2690,7 @@ x86_emulate(
         fail_if(ops->load_fpu_ctxt == NULL);
         ops->load_fpu_ctxt(ctxt);
         fail_if((modrm_reg & 7) != 7);
-        fail_if(modrm_reg >= 0xc0);
+        fail_if(modrm >= 0xc0);
         /* fnstsw m2byte */
         ea.bytes = 2;
         dst = ea;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.