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

[Xen-changelog] [xen-unstable] x86_emulate: honor failure of in_longmode()



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1251708865 -3600
# Node ID f974a04432fc289cde79ca009df8ae92e8e7ceeb
# Parent  af2fbc4d5311d46d5c830ed8168a43764df08630
x86_emulate: honor failure of in_longmode()

Failure of in_longmode() shouldn't be treated the same as the function
returning 'true'.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/arch/x86/x86_emulate/x86_emulate.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff -r af2fbc4d5311 -r f974a04432fc xen/arch/x86/x86_emulate/x86_emulate.c
--- a/xen/arch/x86/x86_emulate/x86_emulate.c    Mon Aug 31 09:51:45 2009 +0100
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c    Mon Aug 31 09:54:25 2009 +0100
@@ -3605,7 +3605,10 @@ x86_emulate(
         ss.attr.bytes = 0xc93; /* G+DB+P+S+Data */
 
 #ifdef __x86_64__
-        if ( in_longmode(ctxt, ops) )
+        rc = in_longmode(ctxt, ops);
+        if ( rc < 0 )
+            goto cannot_emulate;
+        if ( rc )
         {
             cs.attr.fields.db = 0;
             cs.attr.fields.l = 1;
@@ -3777,7 +3780,10 @@ x86_emulate(
         ss.limit = ~0u;  /* 4GB limit */
         ss.attr.bytes = 0xc93; /* G+DB+P+S+Data */
 
-        if ( in_longmode(ctxt, ops) )
+        rc = in_longmode(ctxt, ops);
+        if ( rc < 0 )
+            goto cannot_emulate;
+        if ( rc )
         {
             cs.attr.fields.db = 0;
             cs.attr.fields.l = 1;

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


 


Rackspace

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