Skip to contentSkip to conversation

qapi: better document NVMe blockdev @device parameter

PATCH Applied Daniel P. Berrangé 4 participants 5 messages Dec 6, 2019 – Dec 10, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qapi: better document NVMe blockdev @device parameter

Mention that this is a PCI device address & give the format it is expected it. Also mention that it must be first unbound from any host kernel driver.

---
 qapi/block-core.json | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
qapi/block-core.json +5 -1
index 0cf68fea14..fcb52ec24f 100644
@@ -2963,9 +2963,13 @@
 #
 # Driver specific block device options for the NVMe backend.
 #
-# @device:    controller address of the NVMe device.
+# @device:    PCI controller address of the NVMe device in
+#             format hhhh:bb:ss.f (host:bus:slot.function)
 # @namespace: namespace number of the device, starting from 1.
 #
+# Note that the PCI @device must have been unbound from any host
+# kernel driver before instructing QEMU to add the blockdev.
+#
 # Since: 2.12
 ##
 { 'struct': 'BlockdevOptionsNVMe',
Signature · 1 line
2.23.0
Reviewed-by on v1 1/1
#2 lore raw
In reply to Daniel P. Berrangé
Quoted 2 lines · Daniel P. Berrangé

Mention that this is a PCI device address & give the format it is expected it. Also mention that it must be first unbound from any

maybe s/expected it/expecting/

Quoted 13 lines

host kernel driver.

---
  qapi/block-core.json | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
qapi/block-core.json +0 -0
index 0cf68fea14..fcb52ec24f 100644
@@ -2963,9 +2963,13 @@
  #

qapi/block-core.json line 2972

Quoted 10 lines
qapi/block-core.json +5 -1
  # Driver specific block device options for the NVMe backend.
  #
-# @device:    controller address of the NVMe device.
+# @device:    PCI controller address of the NVMe device in
+#             format hhhh:bb:ss.f (host:bus:slot.function)
  # @namespace: namespace number of the device, starting from 1.
  #
+# Note that the PCI @device must have been unbound from any host
+# kernel driver before instructing QEMU to add the blockdev.
+#

Doesn't affect code, but similarly no reason to hurry this into 4.2. 5.0 and qemu-stable (cc'd) is good enough.

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org
#3 lore raw
Quoted 5 lines · Eric Blake
Quoted 2 lines · Daniel P. Berrangé

Mention that this is a PCI device address & give the format it is expected it. Also mention that it must be first unbound from any

maybe s/expected it/expecting/

It was supposed to be "in" rather than "it", but your suggestion is fine too.

Quoted 27 lines
Quoted 14 lines

host kernel driver.

---
  qapi/block-core.json | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
qapi/block-core.json +0 -0
index 0cf68fea14..fcb52ec24f 100644
@@ -2963,9 +2963,13 @@
  #

qapi/block-core.json line 2972

Quoted 10 lines
qapi/block-core.json +5 -1
  # Driver specific block device options for the NVMe backend.
  #
-# @device:    controller address of the NVMe device.
+# @device:    PCI controller address of the NVMe device in
+#             format hhhh:bb:ss.f (host:bus:slot.function)
  # @namespace: namespace number of the device, starting from 1.
  #
+# Note that the PCI @device must have been unbound from any host
+# kernel driver before instructing QEMU to add the blockdev.
+#
Quoted 7 lines

Doesn't affect code, but similarly no reason to hurry this into 4.2. 5.0 and qemu-stable (cc'd) is good enough.

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|