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

[Xen-changelog] [xen-unstable] x86: hvm_*io_intercept() should only update p->count if X86EMUL_OKAY.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1238599230 -3600
# Node ID b5e7c26835c9fc2e9c26e27478a938e36f98d645
# Parent  e89f7c2b9e0d695645f86816da5fd05b340fa36e
x86: hvm_*io_intercept() should only update p->count if X86EMUL_OKAY.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/hvm/intercept.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff -r e89f7c2b9e0d -r b5e7c26835c9 xen/arch/x86/hvm/intercept.c
--- a/xen/arch/x86/hvm/intercept.c      Wed Apr 01 15:39:20 2009 +0100
+++ b/xen/arch/x86/hvm/intercept.c      Wed Apr 01 16:20:30 2009 +0100
@@ -100,8 +100,11 @@ static int hvm_mmio_access(struct vcpu *
         }
     }
 
-    if ( (p->count = i) != 0 )
+    if ( i != 0 )
+    {
+        p->count = i;
         rc = X86EMUL_OKAY;
+    }
 
     return rc;
 }
@@ -165,8 +168,11 @@ static int process_portio_intercept(port
         }
     }
 
-    if ( (p->count = i) != 0 )
+    if ( i != 0 )
+    {
+        p->count = i;
         rc = X86EMUL_OKAY;
+    }
 
     return rc;
 }

_______________________________________________
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®.