qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [Qemu-block][RFC PATCH] hw/block/nvme: add optional parameter num_queues for nvme device
@ 2018-06-26  1:44 Weiping Zhang
  2018-06-26  1:56 ` Keith Busch
  0 siblings, 1 reply; 3+ messages in thread
From: Weiping Zhang @ 2018-06-26  1:44 UTC (permalink / raw)
  To: keith.busch; +Cc: qemu-block, qemu-devel

Add an optional paramter num_queues for device, and set it
to 64 by default.

Signed-off-by: Weiping Zhang <zhangweiping@didichuxing.com>
---
 hw/block/nvme.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index d5bf95b79b..156ecf3c41 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -18,7 +18,8 @@
  * Usage: add options:
  *      -drive file=<file>,if=none,id=<drive_id>
  *      -device nvme,drive=<drive_id>,serial=<serial>,id=<id[optional]>, \
- *              cmb_size_mb=<cmb_size_mb[optional]>
+ *              cmb_size_mb=<cmb_size_mb[optional]>, \
+ *              num_queues=<N[optional]>
  *
  * Note cmb_size_mb denotes size of CMB in MB. CMB is assumed to be at
  * offset 0 in BAR2 and supports only WDS, RDS and SQS for now.
@@ -1232,7 +1233,6 @@ static void nvme_realize(PCIDevice *pci_dev, Error **errp)
     pcie_endpoint_cap_init(&n->parent_obj, 0x80);
 
     n->num_namespaces = 1;
-    n->num_queues = 64;
     n->reg_size = pow2ceil(0x1004 + 2 * (n->num_queues + 1) * 4);
     n->ns_size = bs_size / (uint64_t)n->num_namespaces;
 
@@ -1341,6 +1341,7 @@ static Property nvme_props[] = {
     DEFINE_BLOCK_PROPERTIES(NvmeCtrl, conf),
     DEFINE_PROP_STRING("serial", NvmeCtrl, serial),
     DEFINE_PROP_UINT32("cmb_size_mb", NvmeCtrl, cmb_size_mb, 0),
+    DEFINE_PROP_UINT32("num_queues", NvmeCtrl, num_queues, 64),
     DEFINE_PROP_END_OF_LIST(),
 };
 
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [Qemu-block][RFC PATCH] hw/block/nvme: add optional parameter num_queues for nvme device
  2018-06-26  1:44 [Qemu-devel] [Qemu-block][RFC PATCH] hw/block/nvme: add optional parameter num_queues for nvme device Weiping Zhang
@ 2018-06-26  1:56 ` Keith Busch
  2018-06-26 14:36   ` [Qemu-devel] [Qemu-block] [RFC " Kevin Wolf
  0 siblings, 1 reply; 3+ messages in thread
From: Keith Busch @ 2018-06-26  1:56 UTC (permalink / raw)
  To: Weiping Zhang; +Cc: qemu-block, qemu-devel

On Tue, Jun 26, 2018 at 09:44:56AM +0800, Weiping Zhang wrote:
> Add an optional paramter num_queues for device, and set it
> to 64 by default.
> 
> Signed-off-by: Weiping Zhang <zhangweiping@didichuxing.com>

Looks good to me.

Acked-by: Keith Busch <keith.busch@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [Qemu-block] [RFC PATCH] hw/block/nvme: add optional parameter num_queues for nvme device
  2018-06-26  1:56 ` Keith Busch
@ 2018-06-26 14:36   ` Kevin Wolf
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Wolf @ 2018-06-26 14:36 UTC (permalink / raw)
  To: Keith Busch; +Cc: Weiping Zhang, qemu-devel, qemu-block

Am 26.06.2018 um 03:56 hat Keith Busch geschrieben:
> On Tue, Jun 26, 2018 at 09:44:56AM +0800, Weiping Zhang wrote:
> > Add an optional paramter num_queues for device, and set it
> > to 64 by default.
> > 
> > Signed-off-by: Weiping Zhang <zhangweiping@didichuxing.com>
> 
> Looks good to me.
> 
> Acked-by: Keith Busch <keith.busch@intel.com>

Thanks, applied to the block branch.

Kevin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-06-26 14:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-26  1:44 [Qemu-devel] [Qemu-block][RFC PATCH] hw/block/nvme: add optional parameter num_queues for nvme device Weiping Zhang
2018-06-26  1:56 ` Keith Busch
2018-06-26 14:36   ` [Qemu-devel] [Qemu-block] [RFC " Kevin Wolf

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).