From: Don Slutz <dslutz@verizon.com>
To: Don Slutz <dslutz@verizon.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: [Qemu-devel] Ping [PATCH 1/1] xen-hvm: Add trace to ioreq
Date: Wed, 13 May 2015 13:07:45 -0400 [thread overview]
Message-ID: <555384E1.1000702@one.verizon.com> (raw)
In-Reply-To: <1430418429-9426-1-git-send-email-dslutz@verizon.com>
On 04/30/15 14:27, Don Slutz wrote:
> Signed-off-by: Don Slutz <dslutz@verizon.com>
> (cherry picked from commit b72adbe7510d0a30053d32334665ee887bec9e43)
> ---
> trace-events | 7 +++++++
> xen-hvm.c | 21 +++++++++++++++++++++
> 2 files changed, 28 insertions(+)
>
> diff --git a/trace-events b/trace-events
> index 30eba92..4666dad 100644
> --- a/trace-events
> +++ b/trace-events
> @@ -932,6 +932,13 @@ xen_map_portio_range(uint32_t id, uint64_t start_addr, uint64_t end_addr) "id: %
> xen_unmap_portio_range(uint32_t id, uint64_t start_addr, uint64_t end_addr) "id: %u start: %#"PRIx64" end: %#"PRIx64
> xen_map_pcidev(uint32_t id, uint8_t bus, uint8_t dev, uint8_t func) "id: %u bdf: %02x.%02x.%02x"
> xen_unmap_pcidev(uint32_t id, uint8_t bus, uint8_t dev, uint8_t func) "id: %u bdf: %02x.%02x.%02x"
> +handle_ioreq(void *req, uint32_t type, uint32_t dir, uint32_t df, uint32_t data_is_ptr, uint64_t addr, uint64_t data, uint32_t count, uint32_t size) "I/O=%p type=%d dir=%d df=%d ptr=%d port=%#"PRIx64" data=%#"PRIx64" count=%d size=%d"
> +handle_ioreq_read(void *req, uint32_t type, uint32_t df, uint32_t data_is_ptr, uint64_t addr, uint64_t data, uint32_t count, uint32_t size) "I/O=%p read type=%d df=%d ptr=%d port=%#"PRIx64" data=%#"PRIx64" count=%d size=%d"
> +handle_ioreq_write(void *req, uint32_t type, uint32_t df, uint32_t data_is_ptr, uint64_t addr, uint64_t data, uint32_t count, uint32_t size) "I/O=%p write type=%d df=%d ptr=%d port=%#"PRIx64" data=%#"PRIx64" count=%d size=%d"
> +cpu_ioreq_pio(void *req, uint32_t dir, uint32_t df, uint32_t data_is_ptr, uint64_t addr, uint64_t data, uint32_t count, uint32_t size) "I/O=%p pio dir=%d df=%d ptr=%d port=%#"PRIx64" data=%#"PRIx64" count=%d size=%d"
> +cpu_ioreq_pio_read_reg(void *req, uint64_t data, uint64_t addr, uint32_t size) "I/O=%p pio read reg data=%#"PRIx64" port=%#"PRIx64" size=%d"
> +cpu_ioreq_pio_write_reg(void *req, uint64_t data, uint64_t addr, uint32_t size) "I/O=%p pio write reg data=%#"PRIx64" port=%#"PRIx64" size=%d"
> +cpu_ioreq_move(void *req, uint32_t dir, uint32_t df, uint32_t data_is_ptr, uint64_t addr, uint64_t data, uint32_t count, uint32_t size) "I/O=%p copy dir=%d df=%d ptr=%d port=%#"PRIx64" data=%#"PRIx64" count=%d size=%d"
>
> # xen-mapcache.c
> xen_map_cache(uint64_t phys_addr) "want %#"PRIx64
> diff --git a/xen-hvm.c b/xen-hvm.c
> index 315864c..6fdba98 100644
> --- a/xen-hvm.c
> +++ b/xen-hvm.c
> @@ -832,9 +832,14 @@ static void cpu_ioreq_pio(ioreq_t *req)
> {
> uint32_t i;
>
> + trace_cpu_ioreq_pio(req, req->dir, req->df, req->data_is_ptr, req->addr,
> + req->data, req->count, req->size);
> +
> if (req->dir == IOREQ_READ) {
> if (!req->data_is_ptr) {
> req->data = do_inp(req->addr, req->size);
> + trace_cpu_ioreq_pio_read_reg(req, req->data, req->addr,
> + req->size);
> } else {
> uint32_t tmp;
>
> @@ -845,6 +850,8 @@ static void cpu_ioreq_pio(ioreq_t *req)
> }
> } else if (req->dir == IOREQ_WRITE) {
> if (!req->data_is_ptr) {
> + trace_cpu_ioreq_pio_write_reg(req, req->data, req->addr,
> + req->size);
> do_outp(req->addr, req->size, req->data);
> } else {
> for (i = 0; i < req->count; i++) {
> @@ -861,6 +868,9 @@ static void cpu_ioreq_move(ioreq_t *req)
> {
> uint32_t i;
>
> + trace_cpu_ioreq_move(req, req->dir, req->df, req->data_is_ptr, req->addr,
> + req->data, req->count, req->size);
> +
> if (!req->data_is_ptr) {
> if (req->dir == IOREQ_READ) {
> for (i = 0; i < req->count; i++) {
> @@ -933,11 +943,18 @@ static void handle_vmport_ioreq(XenIOState *state, ioreq_t *req)
>
> static void handle_ioreq(XenIOState *state, ioreq_t *req)
> {
> + trace_handle_ioreq(req, req->type, req->dir, req->df, req->data_is_ptr,
> + req->addr, req->data, req->count, req->size);
> +
> if (!req->data_is_ptr && (req->dir == IOREQ_WRITE) &&
> (req->size < sizeof (target_ulong))) {
> req->data &= ((target_ulong) 1 << (8 * req->size)) - 1;
> }
>
> + if (req->dir == IOREQ_WRITE)
> + trace_handle_ioreq_write(req, req->type, req->df, req->data_is_ptr,
> + req->addr, req->data, req->count, req->size);
> +
> switch (req->type) {
> case IOREQ_TYPE_PIO:
> cpu_ioreq_pio(req);
> @@ -977,6 +994,10 @@ static void handle_ioreq(XenIOState *state, ioreq_t *req)
> default:
> hw_error("Invalid ioreq type 0x%x\n", req->type);
> }
> + if (req->dir == IOREQ_READ) {
> + trace_handle_ioreq_read(req, req->type, req->df, req->data_is_ptr,
> + req->addr, req->data, req->count, req->size);
> + }
> }
>
> static int handle_buffered_iopage(XenIOState *state)
>
WARNING: multiple messages have this Message-ID (diff)
From: Don Slutz <dslutz@verizon.com>
To: Don Slutz <dslutz@verizon.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Ping [PATCH 1/1] xen-hvm: Add trace to ioreq
Date: Wed, 13 May 2015 13:07:45 -0400 [thread overview]
Message-ID: <555384E1.1000702@one.verizon.com> (raw)
In-Reply-To: <1430418429-9426-1-git-send-email-dslutz@verizon.com>
On 04/30/15 14:27, Don Slutz wrote:
> Signed-off-by: Don Slutz <dslutz@verizon.com>
> (cherry picked from commit b72adbe7510d0a30053d32334665ee887bec9e43)
> ---
> trace-events | 7 +++++++
> xen-hvm.c | 21 +++++++++++++++++++++
> 2 files changed, 28 insertions(+)
>
> diff --git a/trace-events b/trace-events
> index 30eba92..4666dad 100644
> --- a/trace-events
> +++ b/trace-events
> @@ -932,6 +932,13 @@ xen_map_portio_range(uint32_t id, uint64_t start_addr, uint64_t end_addr) "id: %
> xen_unmap_portio_range(uint32_t id, uint64_t start_addr, uint64_t end_addr) "id: %u start: %#"PRIx64" end: %#"PRIx64
> xen_map_pcidev(uint32_t id, uint8_t bus, uint8_t dev, uint8_t func) "id: %u bdf: %02x.%02x.%02x"
> xen_unmap_pcidev(uint32_t id, uint8_t bus, uint8_t dev, uint8_t func) "id: %u bdf: %02x.%02x.%02x"
> +handle_ioreq(void *req, uint32_t type, uint32_t dir, uint32_t df, uint32_t data_is_ptr, uint64_t addr, uint64_t data, uint32_t count, uint32_t size) "I/O=%p type=%d dir=%d df=%d ptr=%d port=%#"PRIx64" data=%#"PRIx64" count=%d size=%d"
> +handle_ioreq_read(void *req, uint32_t type, uint32_t df, uint32_t data_is_ptr, uint64_t addr, uint64_t data, uint32_t count, uint32_t size) "I/O=%p read type=%d df=%d ptr=%d port=%#"PRIx64" data=%#"PRIx64" count=%d size=%d"
> +handle_ioreq_write(void *req, uint32_t type, uint32_t df, uint32_t data_is_ptr, uint64_t addr, uint64_t data, uint32_t count, uint32_t size) "I/O=%p write type=%d df=%d ptr=%d port=%#"PRIx64" data=%#"PRIx64" count=%d size=%d"
> +cpu_ioreq_pio(void *req, uint32_t dir, uint32_t df, uint32_t data_is_ptr, uint64_t addr, uint64_t data, uint32_t count, uint32_t size) "I/O=%p pio dir=%d df=%d ptr=%d port=%#"PRIx64" data=%#"PRIx64" count=%d size=%d"
> +cpu_ioreq_pio_read_reg(void *req, uint64_t data, uint64_t addr, uint32_t size) "I/O=%p pio read reg data=%#"PRIx64" port=%#"PRIx64" size=%d"
> +cpu_ioreq_pio_write_reg(void *req, uint64_t data, uint64_t addr, uint32_t size) "I/O=%p pio write reg data=%#"PRIx64" port=%#"PRIx64" size=%d"
> +cpu_ioreq_move(void *req, uint32_t dir, uint32_t df, uint32_t data_is_ptr, uint64_t addr, uint64_t data, uint32_t count, uint32_t size) "I/O=%p copy dir=%d df=%d ptr=%d port=%#"PRIx64" data=%#"PRIx64" count=%d size=%d"
>
> # xen-mapcache.c
> xen_map_cache(uint64_t phys_addr) "want %#"PRIx64
> diff --git a/xen-hvm.c b/xen-hvm.c
> index 315864c..6fdba98 100644
> --- a/xen-hvm.c
> +++ b/xen-hvm.c
> @@ -832,9 +832,14 @@ static void cpu_ioreq_pio(ioreq_t *req)
> {
> uint32_t i;
>
> + trace_cpu_ioreq_pio(req, req->dir, req->df, req->data_is_ptr, req->addr,
> + req->data, req->count, req->size);
> +
> if (req->dir == IOREQ_READ) {
> if (!req->data_is_ptr) {
> req->data = do_inp(req->addr, req->size);
> + trace_cpu_ioreq_pio_read_reg(req, req->data, req->addr,
> + req->size);
> } else {
> uint32_t tmp;
>
> @@ -845,6 +850,8 @@ static void cpu_ioreq_pio(ioreq_t *req)
> }
> } else if (req->dir == IOREQ_WRITE) {
> if (!req->data_is_ptr) {
> + trace_cpu_ioreq_pio_write_reg(req, req->data, req->addr,
> + req->size);
> do_outp(req->addr, req->size, req->data);
> } else {
> for (i = 0; i < req->count; i++) {
> @@ -861,6 +868,9 @@ static void cpu_ioreq_move(ioreq_t *req)
> {
> uint32_t i;
>
> + trace_cpu_ioreq_move(req, req->dir, req->df, req->data_is_ptr, req->addr,
> + req->data, req->count, req->size);
> +
> if (!req->data_is_ptr) {
> if (req->dir == IOREQ_READ) {
> for (i = 0; i < req->count; i++) {
> @@ -933,11 +943,18 @@ static void handle_vmport_ioreq(XenIOState *state, ioreq_t *req)
>
> static void handle_ioreq(XenIOState *state, ioreq_t *req)
> {
> + trace_handle_ioreq(req, req->type, req->dir, req->df, req->data_is_ptr,
> + req->addr, req->data, req->count, req->size);
> +
> if (!req->data_is_ptr && (req->dir == IOREQ_WRITE) &&
> (req->size < sizeof (target_ulong))) {
> req->data &= ((target_ulong) 1 << (8 * req->size)) - 1;
> }
>
> + if (req->dir == IOREQ_WRITE)
> + trace_handle_ioreq_write(req, req->type, req->df, req->data_is_ptr,
> + req->addr, req->data, req->count, req->size);
> +
> switch (req->type) {
> case IOREQ_TYPE_PIO:
> cpu_ioreq_pio(req);
> @@ -977,6 +994,10 @@ static void handle_ioreq(XenIOState *state, ioreq_t *req)
> default:
> hw_error("Invalid ioreq type 0x%x\n", req->type);
> }
> + if (req->dir == IOREQ_READ) {
> + trace_handle_ioreq_read(req, req->type, req->df, req->data_is_ptr,
> + req->addr, req->data, req->count, req->size);
> + }
> }
>
> static int handle_buffered_iopage(XenIOState *state)
>
next prev parent reply other threads:[~2015-05-13 17:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-30 18:27 [Qemu-devel] [PATCH 1/1] xen-hvm: Add trace to ioreq Don Slutz
2015-04-30 18:27 ` Don Slutz
2015-05-13 17:07 ` Don Slutz [this message]
2015-05-13 17:07 ` Ping " Don Slutz
2015-06-22 16:01 ` [Qemu-devel] " Stefano Stabellini
2015-06-22 16:01 ` Stefano Stabellini
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=555384E1.1000702@one.verizon.com \
--to=dslutz@verizon.com \
--cc=qemu-devel@nongnu.org \
--cc=stefano.stabellini@eu.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 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.