All of lore.kernel.org
 help / color / mirror / Atom feed
From: Minwoo Im <minwoo.im.dev@gmail.com>
To: Klaus Jensen <its@irrelevant.dk>
Cc: Fam Zheng <fam@euphon.net>, Kevin Wolf <kwolf@redhat.com>,
	qemu-block@nongnu.org, Klaus Jensen <k.jensen@samsung.com>,
	qemu-devel@nongnu.org, Maxim Levitsky <mlevitsk@redhat.com>,
	Andrzej Jakowski <andrzej.jakowski@linux.intel.com>,
	Keith Busch <kbusch@kernel.org>, Max Reitz <mreitz@redhat.com>
Subject: Re: [PATCH v2 07/16] hw/block/nvme: add tracing to nvme_map_prp
Date: Thu, 30 Jul 2020 19:17:41 +0900	[thread overview]
Message-ID: <CAA7jztdvr5=vUPioq_iPXoV_0Ch-kOFRC8OxvQDPe0qEQiNjxQ@mail.gmail.com> (raw)
In-Reply-To: <20200729220638.344477-8-its@irrelevant.dk>

On Thu, Jul 30, 2020 at 7:06 AM Klaus Jensen <its@irrelevant.dk> wrote:
>
> From: Klaus Jensen <k.jensen@samsung.com>
>
> Add tracing to nvme_map_prp.
>
> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
> ---
>  hw/block/nvme.c       | 2 ++
>  hw/block/trace-events | 1 +
>  2 files changed, 3 insertions(+)
>
> diff --git a/hw/block/nvme.c b/hw/block/nvme.c
> index 571635ebe9f9..952afbb05175 100644
> --- a/hw/block/nvme.c
> +++ b/hw/block/nvme.c
> @@ -274,6 +274,8 @@ static uint16_t nvme_map_prp(QEMUSGList *qsg, QEMUIOVector *iov, uint64_t prp1,
>      int num_prps = (len >> n->page_bits) + 1;
>      uint16_t status;
>
> +    trace_pci_nvme_map_prp(trans_len, len, prp1, prp2, num_prps);

Hmm.. Okay with this.  But once QEMUSGList and QEMUIOVector instances are coming
into the NvmeRequest, we just can pass the NvmeRequest instance here
and print the cid as well
later :)

Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com>

Thanks!

> +
>      if (unlikely(!prp1)) {
>          trace_pci_nvme_err_invalid_prp();
>          return NVME_INVALID_FIELD | NVME_DNR;
> diff --git a/hw/block/trace-events b/hw/block/trace-events
> index f3b2d004e078..f20c59a4b542 100644
> --- a/hw/block/trace-events
> +++ b/hw/block/trace-events
> @@ -35,6 +35,7 @@ pci_nvme_irq_masked(void) "IRQ is masked"
>  pci_nvme_dma_read(uint64_t prp1, uint64_t prp2) "DMA read, prp1=0x%"PRIx64" prp2=0x%"PRIx64""
>  pci_nvme_map_addr(uint64_t addr, uint64_t len) "addr 0x%"PRIx64" len %"PRIu64""
>  pci_nvme_map_addr_cmb(uint64_t addr, uint64_t len) "addr 0x%"PRIx64" len %"PRIu64""
> +pci_nvme_map_prp(uint64_t trans_len, uint32_t len, uint64_t prp1, uint64_t prp2, int num_prps) "trans_len %"PRIu64" len %"PRIu32" prp1 0x%"PRIx64" prp2 0x%"PRIx64" num_prps %d"
>  pci_nvme_io_cmd(uint16_t cid, uint32_t nsid, uint16_t sqid, uint8_t opcode) "cid %"PRIu16" nsid %"PRIu32" sqid %"PRIu16" opc 0x%"PRIx8""
>  pci_nvme_admin_cmd(uint16_t cid, uint16_t sqid, uint8_t opcode) "cid %"PRIu16" sqid %"PRIu16" opc 0x%"PRIx8""
>  pci_nvme_rw(const char *verb, uint32_t blk_count, uint64_t byte_count, uint64_t lba) "%s %"PRIu32" blocks (%"PRIu64" bytes) from LBA %"PRIu64""
> --
> 2.27.0
>


  reply	other threads:[~2020-07-30 10:18 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29 22:06 [PATCH v2 00/16] hw/block/nvme: dma handling and address mapping cleanup Klaus Jensen
2020-07-29 22:06 ` [PATCH v2 01/16] hw/block/nvme: memset preallocated requests structures Klaus Jensen
2020-07-30 10:14   ` Minwoo Im
2020-07-29 22:06 ` [PATCH v2 02/16] hw/block/nvme: add mapping helpers Klaus Jensen
2020-07-29 22:06 ` [PATCH v2 03/16] hw/block/nvme: replace dma_acct with blk_acct equivalent Klaus Jensen
2020-07-29 22:06 ` [PATCH v2 04/16] hw/block/nvme: remove redundant has_sg member Klaus Jensen
2020-07-30 10:15   ` Minwoo Im
2020-07-30 10:43   ` Maxim Levitsky
2020-07-29 22:06 ` [PATCH v2 05/16] hw/block/nvme: destroy request iov before reuse Klaus Jensen
2020-07-30 10:16   ` Minwoo Im
2020-07-30 10:43   ` Maxim Levitsky
2020-07-29 22:06 ` [PATCH v2 06/16] hw/block/nvme: refactor dma read/write Klaus Jensen
2020-07-29 22:06 ` [PATCH v2 07/16] hw/block/nvme: add tracing to nvme_map_prp Klaus Jensen
2020-07-30 10:17   ` Minwoo Im [this message]
2020-07-30 10:45   ` Maxim Levitsky
2020-07-29 22:06 ` [PATCH v2 08/16] hw/block/nvme: add request mapping helper Klaus Jensen
2020-07-30 10:19   ` Minwoo Im
2020-07-29 22:06 ` [PATCH v2 09/16] hw/block/nvme: verify validity of prp lists in the cmb Klaus Jensen
2020-07-29 22:06 ` [PATCH v2 10/16] hw/block/nvme: refactor request bounds checking Klaus Jensen
2020-07-29 22:06 ` [PATCH v2 11/16] hw/block/nvme: add check for mdts Klaus Jensen
2020-07-29 22:06 ` [PATCH v2 12/16] hw/block/nvme: be consistent about zeros vs zeroes Klaus Jensen
2020-07-29 22:06 ` [PATCH v2 13/16] hw/block/nvme: add ns/cmd references in NvmeRequest Klaus Jensen
2020-07-29 22:06 ` [PATCH v2 14/16] hw/block/nvme: consolidate qsg/iov clearing Klaus Jensen
2020-07-30 10:31   ` Minwoo Im
2020-07-30 11:02     ` Maxim Levitsky
2020-07-30 11:09     ` Klaus Jensen
2020-07-30 12:26       ` Minwoo Im
2020-07-29 22:06 ` [PATCH v2 15/16] hw/block/nvme: use preallocated qsg/iov in nvme_dma_prp Klaus Jensen
2020-07-30 10:29   ` Minwoo Im
2020-07-29 22:06 ` [PATCH v2 16/16] hw/block/nvme: remove explicit qsg/iov parameters Klaus Jensen
2020-07-30 10:30   ` Minwoo Im
2020-07-30 11:03   ` Maxim Levitsky
2020-08-17  6:45 ` [PATCH v2 00/16] hw/block/nvme: dma handling and address mapping cleanup Klaus Jensen

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='CAA7jztdvr5=vUPioq_iPXoV_0Ch-kOFRC8OxvQDPe0qEQiNjxQ@mail.gmail.com' \
    --to=minwoo.im.dev@gmail.com \
    --cc=andrzej.jakowski@linux.intel.com \
    --cc=fam@euphon.net \
    --cc=its@irrelevant.dk \
    --cc=k.jensen@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=kwolf@redhat.com \
    --cc=mlevitsk@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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.