The is_mmio parameter can be inferred from the ioreq type.

Signed-off-by: Paul Durrant <paul.durr...@citrix.com>
Cc: Keir Fraser <k...@xen.org>
Cc: Jan Beulich <jbeul...@suse.com>
Cc: Andrew Cooper <andrew.coop...@citrix.com>
---
 xen/arch/x86/hvm/emulate.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c
index b412302..935eab3 100644
--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -23,8 +23,9 @@
 #include <asm/hvm/support.h>
 #include <asm/hvm/svm/svm.h>
 
-static void hvmtrace_io_assist(int is_mmio, ioreq_t *p)
+static void hvmtrace_io_assist(ioreq_t *p)
 {
+    bool_t is_mmio = (p->type == IOREQ_TYPE_COPY);
     unsigned int size, event;
     unsigned char buffer[12];
 
@@ -139,7 +140,7 @@ static int hvmemul_do_io(
         if ( !data_is_addr )
             memcpy(&p.data, p_data, size);
 
-        hvmtrace_io_assist(is_mmio, &p);
+        hvmtrace_io_assist(&p);
     }
 
     if ( is_mmio )
@@ -200,7 +201,7 @@ static int hvmemul_do_io(
  finish_access:
     if ( dir == IOREQ_READ )
     {
-        hvmtrace_io_assist(is_mmio, &p);
+        hvmtrace_io_assist(&p);
 
         if ( !data_is_addr )
             memcpy(p_data, &vio->io_data, size);
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to