From: Paolo Bonzini <pbonzini@redhat.com>
To: "Richard W.M. Jones" <rjones@redhat.com>, qemu-devel@nongnu.org
Cc: crosthwaite.peter@gmail.com, stefanha@redhat.com, rth@twiddle.net
Subject: Re: [Qemu-devel] [PATCH] exec: Rename and fix trace events for tracing I/O port access.
Date: Wed, 30 Mar 2016 15:30:30 +0200 [thread overview]
Message-ID: <56FBD4F6.7050904@redhat.com> (raw)
In-Reply-To: <1459263745-1035-1-git-send-email-rjones@redhat.com>
On 29/03/2016 17:02, Richard W.M. Jones wrote:
> Back in the day you used to be able to set DEBUG_IOPORT in ioport.c
> and get qemu to dump what (x86) I/O ports were being accessed by the
> guest. This was rather useful for finding out what closed source
> device drivers were up to.
>
> Now you're supposed to use cpu_in/cpu_out tracepoints instead.
> However for the majority of guests these tracepoints will never be
> called.
For what it's worth, the breakage dated to way before DEBUG_IOPORT was
converted to tracepoints. (This is why putting tracing code behind #if
0 is bad).
It happened when I/O ports stopped being special snowflakes, and started
being just like any other MMIO target (except they live in another
address space).
> It turns out this is still not particularly useful for debugging
> because (a) it creates massive amounts of log messages and (b) there's
> no way to select a range of addresses or a device of interest. For
> example, if you have a serial port, everything else gets swamped by
> I/O access to the serial port.
Am I wrong that this is not any better/worse than "-d ioport" used to be?
> Maybe using a different tracing backend (eg. stap) would help?
You are actually logging every memory write (except stuff that it's
DMA'd from/to block devices directly by passing a guest memory pointer
to preadv/pwritev). That's way more than just I/O ports.
However I understand that it's useful to treat them as special
snowflakes for the purpose of tracing. To fix the problem with your
patch, I suggest to:
- consolidate the six tracepoints in 2 (cpu_in and cpu_out) that take
the size as an extra argument
- keep the existing calls to the tracepoints, and add more calls in
kvm_handle_io and in the helpers in target-i386/misc_helper.c.
Paolo
next prev parent reply other threads:[~2016-03-30 13:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-29 15:02 [Qemu-devel] [PATCH] exec: Rename and fix trace events for tracing I/O port access Richard W.M. Jones
2016-03-29 15:02 ` Richard W.M. Jones
2016-03-29 15:09 ` Daniel P. Berrange
2016-03-30 13:30 ` Paolo Bonzini [this message]
2016-03-31 10:08 ` Stefan Hajnoczi
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=56FBD4F6.7050904@redhat.com \
--to=pbonzini@redhat.com \
--cc=crosthwaite.peter@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=rjones@redhat.com \
--cc=rth@twiddle.net \
--cc=stefanha@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.