Skip to contentSkip to conversation

Enable QEMU_CAPS_PCI_MULTIBUS capability for QEMU2.0 forward.

PATCH Eric Blake 1 participant 1 message Apr 9, 2014 3 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

Eric Blake

author
#3 lore raw

[adding qemu]

Quoted 27 lines · Li Zhang
Quoted 12 lines · Eric Blake
Quoted 11 lines · Li Zhang

From: Li Zhang <[email protected]>

For QEMU2.0 forward version, it supports PCI multiBUS. Currently, libvirt still disables it which causes an error "Bus 'pci' not found".

---
  src/qemu/qemu_capabilities.c | 3 +++
  1 file changed, 3 insertions(+)
Quoted 14 lines

src/qemu/qemu_capabilities.c virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps, · line 3023

Quoted 10 lines
src/qemu/qemu_capabilities.c +2 -0
index 2c8ec10..b49398f 100644
@@ -3019,6 +3019,9 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,
      if (qemuCaps->version >= 1006000)
          virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
  +    if (qemuCaps->version >= 2000000)
+        virQEMUCapsSet(qemuCaps, QEMU_CAPS_PCI_MULTIBUS);
+

This is a version number check, which is bad. Is there a QMP command we can issue that gives a more reliable answer of whether the feature is present?

Quoted 4 lines

Hi Eric,

I can't find any QMP command for MULTIBUS in QEMU.
There is only one "query-pci" to list PCI bus and devices information.

Maybe it's my fault for not being more vocal when the bus rename was being proposed on the qemu list, but libvirt really does want a way to probe via QMP whether the 'pci.0' (multibus) vs. 'pci' naming should be used for a given machine. Is there an existing command we can use, or is this something that we need to fix early on in qemu 2.1 and backport to 2.0-stable?

Signature · 2 lines
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org