public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
To: Ulrich Obergfell <uobergfe@redhat.com>, kvm@vger.kernel.org
Cc: pbonzini@redhat.com
Subject: Re: [PATCH 0/1] KVM: x86: improve the usability of the 'kvm_pio' tracepoint
Date: Mon, 05 May 2014 15:10:19 +0800	[thread overview]
Message-ID: <5367395B.6070100@linux.vnet.ibm.com> (raw)
In-Reply-To: <1399046267-4677-1-git-send-email-uobergfe@redhat.com>

On 05/02/2014 11:57 PM, Ulrich Obergfell wrote:
> The current implementation of the 'kvm_pio' tracepoint in emulator_pio_in_out()
> only tells us that 'something' has been read from or written to an I/O port. To
> improve the usability of the tracepoint, I propose to include the value/content
> that has been read or written in the trace output. The proposed patch aims at
> the more common case where a single 8-bit or 16-bit or 32-bit value has been
> read or written -- it does not fully cover the case where 'count' is greater
> than one.
> 
> This is an example of what the patch can do (trace of PCI config space access).
> 
>  - on the host
> 
>    # trace-cmd record -e kvm:kvm_pio -f "(port >= 0xcf8) && (port <= 0xcff)"
>    /sys/kernel/debug/tracing/events/kvm/kvm_pio/filter
>    Hit Ctrl^C to stop recording
> 
>  - in a Linux guest
> 
>    # dd if=/sys/bus/pci/devices/0000:00:06.0/config bs=2 count=4 | hexdump
>    4+0 records in
>    4+0 records out
>    8 bytes (8 B) copied, 0.000114056 s, 70.1 kB/s
>    0000000 1af4 1001 0507 0010                    
>    0000008
> 
>  - on the host
> 
>    # trace-cmd report
>    ...
>            qemu-kvm-23216 [001] 15211.994089: kvm_pio:              pio_write
>    at 0xcf8 size 4 count 1 val 0x80003000 
>            qemu-kvm-23216 [001] 15211.994108: kvm_pio:              pio_read
>    at 0xcfc size 2 count 1 val 0x1af4 
>            qemu-kvm-23216 [001] 15211.994129: kvm_pio:              pio_write
>    at 0xcf8 size 4 count 1 val 0x80003000 
>            qemu-kvm-23216 [001] 15211.994136: kvm_pio:              pio_read
>    at 0xcfe size 2 count 1 val 0x1001 
>            qemu-kvm-23216 [001] 15211.994143: kvm_pio:              pio_write
>    at 0xcf8 size 4 count 1 val 0x80003004 
>            qemu-kvm-23216 [001] 15211.994150: kvm_pio:              pio_read
>    at 0xcfc size 2 count 1 val 0x507 
>            qemu-kvm-23216 [001] 15211.994155: kvm_pio:              pio_write
>    at 0xcf8 size 4 count 1 val 0x80003004 
>            qemu-kvm-23216 [001] 15211.994161: kvm_pio:              pio_read
>    at 0xcfe size 2 count 1 val 0x10 
> 

Nice.

Could please check "perf kvm stat" to see if "--event=ioport"
can work after your patch?

Reviewed-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>


  parent reply	other threads:[~2014-05-05  7:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-02 15:57 [PATCH 0/1] KVM: x86: improve the usability of the 'kvm_pio' tracepoint Ulrich Obergfell
2014-05-02 15:57 ` [PATCH 1/1] " Ulrich Obergfell
2014-05-05 20:41   ` Paolo Bonzini
2014-05-05  7:10 ` Xiao Guangrong [this message]
2014-05-05 17:11   ` [PATCH 0/1] " Ulrich Obergfell

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=5367395B.6070100@linux.vnet.ibm.com \
    --to=xiaoguangrong@linux.vnet.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=uobergfe@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox