qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 01/11] NVMe: Initial commit for NVM Express devi


From: Keith Busch
Subject: Re: [Qemu-devel] [PATCH 01/11] NVMe: Initial commit for NVM Express device
Date: Wed, 27 Feb 2013 14:09:53 -0700 (MST)
User-agent: Alpine 2.03 (LRH 1266 2009-07-14)

On Wed, 27 Feb 2013, Paolo Bonzini wrote:
Il 27/02/2013 10:30, Andreas Färber ha scritto:
+    id->vwc     = 1;
+    snprintf((char *)id->mn, sizeof(id->mn), "QEMU NVMe Ctrl");
+    snprintf((char *)id->fr, sizeof(id->fr), "1.0");
+    snprintf((char *)id->sn, sizeof(id->sn), "NVMeQx10%02x", n->instance);
Does this linear instance counting cope with hot-plug and hot-unplug as
expected?

No, it probably doesn't, but it's okay as a default.  Nevertheless, you
should add a -device property to allow customization of the serial
number.  See virtio-blk.c for an example and follow that (either here or
in patch 2).

Finally, and unrelated to the code above, we usually do not add new "if"
values.  It's enough to have access via if=none & -device.  In any case
it should be a separate patch, so it's easy to drop it if that's the
decision.

I can make a separate patch for this, no problem. The only reason I
added a new "if" was for hot add, as I don't see a way to do a storage
pci_add without a new "if".

reply via email to

[Prev in Thread] Current Thread [Next in Thread]