From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Klaus Jensen <its@irrelevant.dk>, qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Beata Michalska <beata.michalska@linaro.org>,
Klaus Jensen <k.jensen@samsung.com>,
qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
Keith Busch <kbusch@kernel.org>,
Javier Gonzalez <javier.gonz@samsung.com>,
Maxim Levitsky <mlevitsk@redhat.com>
Subject: Re: [PATCH v3 15/16] nvme: factor out cmb/pmr setup
Date: Wed, 22 Apr 2020 10:09:37 +0200 [thread overview]
Message-ID: <b07e9238-40a5-e806-5523-74b084ee198a@redhat.com> (raw)
In-Reply-To: <20200422070927.373048-16-its@irrelevant.dk>
On 4/22/20 9:09 AM, Klaus Jensen wrote:
> From: Klaus Jensen <k.jensen@samsung.com>
>
> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
> ---
> hw/block/nvme.c | 146 ++++++++++++++++++++++++++----------------------
> 1 file changed, 79 insertions(+), 67 deletions(-)
>
> diff --git a/hw/block/nvme.c b/hw/block/nvme.c
> index 5dddb97a7394..bc4f6b20045b 100644
> --- a/hw/block/nvme.c
> +++ b/hw/block/nvme.c
> @@ -57,6 +57,7 @@
>
> #define NVME_REG_SIZE 0x1000
> #define NVME_DB_SIZE 4
> +#define NVME_CMB_BIR 2
>
> #define NVME_GUEST_ERR(trace, fmt, ...) \
> do { \
> @@ -1436,6 +1437,78 @@ static void nvme_init_namespace(NvmeCtrl *n, NvmeNamespace *ns, Error **errp)
> id_ns->nuse = id_ns->ncap;
> }
[...]
> static void nvme_init_pci(NvmeCtrl *n, PCIDevice *pci_dev)
> {
> uint8_t *pci_conf = pci_dev->config;
> @@ -1450,6 +1523,12 @@ static void nvme_init_pci(NvmeCtrl *n, PCIDevice *pci_dev)
> pci_register_bar(pci_dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY |
> PCI_BASE_ADDRESS_MEM_TYPE_64, &n->iomem);
> msix_init_exclusive_bar(pci_dev, n->params.max_ioqpairs + 1, 4, NULL);
> +
> + if (n->params.cmb_size_mb) {
> + nvme_init_cmb(n, pci_dev);
> + } else if (n->pmrdev) {
> + nvme_init_pmr(n, pci_dev);
Why not splitting this in 2 trivial patches? The easiest a patch is to
review, the less likely bug can be missed. Here I'm scrolling over 2
different blocks so to feel confident I'm not missing something I'd have
to manually edit and re-do your patch.
> + }
> }
>
[...]
next prev parent reply other threads:[~2020-04-22 8:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-22 7:09 [PATCH v3 00/16] nvme: refactoring and cleanups Klaus Jensen
2020-04-22 7:09 ` [PATCH v3 01/16] nvme: fix pci doorbell size calculation Klaus Jensen
2020-04-22 7:09 ` [PATCH v3 02/16] nvme: rename trace events to pci_nvme Klaus Jensen
2020-04-22 7:09 ` [PATCH v3 03/16] nvme: remove superfluous breaks Klaus Jensen
2020-04-22 7:09 ` [PATCH v3 04/16] nvme: move device parameters to separate struct Klaus Jensen
2020-04-22 8:03 ` Philippe Mathieu-Daudé
2020-04-22 8:14 ` Maxim Levitsky
2020-04-22 7:09 ` [PATCH v3 05/16] nvme: use constants in identify Klaus Jensen
2020-04-22 7:09 ` [PATCH v3 06/16] nvme: refactor nvme_addr_read Klaus Jensen
2020-04-22 7:09 ` [PATCH v3 07/16] nvme: add max_ioqpairs device parameter Klaus Jensen
2020-04-22 7:09 ` [PATCH v3 08/16] nvme: remove redundant cmbloc/cmbsz members Klaus Jensen
2020-04-22 7:09 ` [PATCH v3 09/16] nvme: factor out property/constraint checks Klaus Jensen
2020-04-22 7:09 ` [PATCH v3 10/16] nvme: factor out device state setup Klaus Jensen
2020-04-22 7:09 ` [PATCH v3 11/16] nvme: factor out block backend setup Klaus Jensen
2020-04-22 7:09 ` [PATCH v3 12/16] nvme: add namespace helpers Klaus Jensen
2020-04-22 8:16 ` Maxim Levitsky
2020-04-22 7:09 ` [PATCH v3 13/16] nvme: factor out namespace setup Klaus Jensen
2020-04-22 7:09 ` [PATCH v3 14/16] nvme: factor out pci setup Klaus Jensen
2020-04-22 7:09 ` [PATCH v3 15/16] nvme: factor out cmb/pmr setup Klaus Jensen
2020-04-22 8:09 ` Philippe Mathieu-Daudé [this message]
2020-04-22 7:09 ` [PATCH v3 16/16] nvme: factor out controller identify setup 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=b07e9238-40a5-e806-5523-74b084ee198a@redhat.com \
--to=philmd@redhat.com \
--cc=beata.michalska@linaro.org \
--cc=its@irrelevant.dk \
--cc=javier.gonz@samsung.com \
--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 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).