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

[Xen-changelog] [xen master] x86/hvm: remove extraneous parameter from hvmtrace_io_assist()



commit 65bb47fb732265f704d4ec6616076ec74771a6eb
Author:     Paul Durrant <paul.durrant@xxxxxxxxxx>
AuthorDate: Tue Jun 23 18:08:32 2015 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Jun 23 18:08:32 2015 +0200

    x86/hvm: remove extraneous parameter from hvmtrace_io_assist()
    
    The is_mmio parameter can be inferred from the ioreq type.
    
    Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
    
    Constify its other parameter. Avoid introducing local variable is_mmio.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/arch/x86/hvm/emulate.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c
index b412302..fe5661d 100644
--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -23,7 +23,7 @@
 #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(const ioreq_t *p)
 {
     unsigned int size, event;
     unsigned char buffer[12];
@@ -31,7 +31,7 @@ static void hvmtrace_io_assist(int is_mmio, ioreq_t *p)
     if ( likely(!tb_init_done) )
         return;
 
-    if ( is_mmio )
+    if ( p->type == IOREQ_TYPE_COPY )
         event = p->dir ? TRC_HVM_IOMEM_READ : TRC_HVM_IOMEM_WRITE;
     else
         event = p->dir ? TRC_HVM_IOPORT_READ : TRC_HVM_IOPORT_WRITE;
@@ -139,7 +139,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 +200,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);
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.