From: David Vrabel <david.vrabel@citrix.com>
To: xen-devel@lists.xensource.com
Cc: David Vrabel <david.vrabel@citrix.com>,
George Dunlap <george.dunlap@citrix.com>
Subject: [PATCH] x86/hvm: put value of emulated register reads into trace records
Date: Thu, 10 May 2012 15:59:19 +0100 [thread overview]
Message-ID: <1336661959-13259-1-git-send-email-david.vrabel@citrix.com> (raw)
From: David Vrabel <david.vrabel@citrix.com>
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@citrix.com>
Cc: George Dunlap <george.dunlap@citrix.com>
---
A candidate for 4.0 and 4.1?
---
xen/arch/x86/hvm/emulate.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c
index 82efd1a..3a7fe95 100644
--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -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);
--
1.7.2.5
reply other threads:[~2012-05-10 14:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1336661959-13259-1-git-send-email-david.vrabel@citrix.com \
--to=david.vrabel@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).