[IA64] Fix MMIO readb operation
authorAlex Williamson <alex.williamson@hp.com>
Mon, 22 Oct 2007 18:30:17 +0000 (12:30 -0600)
committerAlex Williamson <alex.williamson@hp.com>
Mon, 22 Oct 2007 18:30:17 +0000 (12:30 -0600)
We should do clean before read operation.  Otherwise, read one byte
data may get garbage data sometimes.

Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
xen/arch/ia64/vmx/mmio.c

index 17d3a6ee3d9b8b132f9f8a620035bc96e5f57544..c6fc8ac215d574ba93899863703269dd0024062e 100644 (file)
@@ -120,6 +120,8 @@ static void low_mmio_access(VCPU *vcpu, u64 pa, u64 *val, size_t s, int dir)
     p->dir = dir;
     if (dir==IOREQ_WRITE)     // write;
         p->data = *val;
+    else if (dir == IOREQ_READ)
+        p->data = 0;          // clear all bits
     p->data_is_ptr = 0;
     p->type = 1;
     p->df = 0;