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

[Xen-changelog] [xen-unstable] x86/hvm: put value of emulated register reads into trace records


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Tue, 15 May 2012 07:11:10 +0000
  • Delivery-date: Tue, 15 May 2012 07:11:20 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User David Vrabel <david.vrabel@xxxxxxxxxx>
# Date 1337010892 -3600
# Node ID 53144d27a9273008c8fcf20a345d13ba0d001edc
# Parent  a2e3b99a9bc4a0571e8631a6c0c2da181f0026b9
x86/hvm: put value of emulated register reads into trace records

The tracepoint for emulated MMIO and I/O port reads was always before
the emulated read or write was done.  This means that for reads the
register value in the trace record was always 0.

So for reads, move the tracepoint until the register value is
available.

Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx>
Committed-by: Keir Fraser <keir@xxxxxxx>
---


diff -r a2e3b99a9bc4 -r 53144d27a927 xen/arch/x86/hvm/emulate.c
--- a/xen/arch/x86/hvm/emulate.c        Mon May 14 16:34:29 2012 +0100
+++ b/xen/arch/x86/hvm/emulate.c        Mon May 14 16:54:52 2012 +0100
@@ -191,7 +191,8 @@ static int hvmemul_do_io(
     p->df = df;
     p->data = value;
 
-    hvmtrace_io_assist(is_mmio, p);
+    if ( dir == IOREQ_WRITE )
+        hvmtrace_io_assist(is_mmio, p);
 
     if ( is_mmio )
     {
@@ -232,6 +233,9 @@ static int hvmemul_do_io(
     }
 
  finish_access:
+    if ( dir == IOREQ_READ )
+        hvmtrace_io_assist(is_mmio, p);
+
     if ( p_data != NULL )
         memcpy(p_data, &vio->io_data, size);
 

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