[PATCH 0/6] Use more PCIe, less legacy PCI slots

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

 



These patches use three methods to get more of the PCI devices onto PCIe
slots on Q35 and aarch64/virt machinetypes:

1) When virtio devices can present themselves as PCIe if they're
   plugged into a PCIe controller, do that. (This capability is
   detected by looking for presence of the "disable-modern" option on
   the virtio-net device. If you have a better idea for how to detect
   it, please let me know.)

2) Any devices that aren't hotpluggable anyway will no longer request
   a hotplug-capable slot. This, along with a change to auto-assign
   legacy PCI devices to pcie-root (as long as they don't require
   hotplug) means the devices will now be assigned to pcie-root.

3) Also using the fact that devices that won't be hotplugged can be
   assigned to pcie-root, the devices that *do* support hotplug have a
   new optional subelement "<hotplug require='no'/>" (it defaults to
   "yes" for historical reasons). If hotplug require is set to 'no',
   even a PCI device can be auto-assigned to pcie-root.

I haven't yet removed the dmi-to-pci-bridge that is added by default,
and we still will only auto-add pci-bridge (so if you're adding a
virtio device without <hostplug require='no'/> then you will also need
to add a <controller type='pci' model='pcie-root-port'/> to plug it
into).

These 6 patches together resolve:

  https://bugzilla.redhat.com/show_bug.cgi?id=1330024

They need to be applied on top of the series I sent on Friday:

  https://www.redhat.com/archives/libvir-list/2016-August/msg00380.html


Laine Stump (6):
  conf: restrict what type of buses will accept a pci-bridge
  conf: permit auto-assignment of *non-hotpluggable* PCI devices to
    pcie-root
  qemu: add capabilities bit for virtio-net "disable-modern" option
  conf: new <hotplug require='yes|no'/> element for hotpluggable devices
  qemu: don't require a hotpluggable slot for devices that can't be
    hotplugged
  qemu: auto-assign virtio devices to PCIe slots when appropriate

 docs/formatdomain.html.in                          |  37 +++++++
 docs/schemas/domaincommon.rng                      |  17 +++
 src/conf/device_conf.h                             |  15 +++
 src/conf/domain_addr.c                             |  44 ++++++--
 src/conf/domain_addr.h                             |   4 +-
 src/conf/domain_conf.c                             |  28 +++++
 src/qemu/qemu_capabilities.c                       |   2 +
 src/qemu/qemu_capabilities.h                       |   1 +
 src/qemu/qemu_domain_address.c                     |  94 ++++++++++++++--
 tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml   |   1 +
 tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml   |   1 +
 .../caps_2.6.0-gicv2.aarch64.xml                   |   1 +
 .../caps_2.6.0-gicv3.aarch64.xml                   |   1 +
 tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml  |   1 +
 tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml   |   1 +
 tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml   |   1 +
 tests/qemuxml2argvdata/qemuxml2argv-autoindex.args |  22 ++--
 .../qemuxml2argv-bios-nvram-secure.args            |   2 +-
 .../qemuxml2argv-machine-smm-opt.args              |   2 +-
 .../qemuxml2argv-q35-hotpluggable.args             |  50 +++++++++
 .../qemuxml2argv-q35-hotpluggable.xml              |  62 +++++++++++
 .../qemuxml2argv-q35-pm-disable-fallback.args      |   3 +-
 .../qemuxml2argv-q35-pm-disable.args               |   3 +-
 .../qemuxml2argv-q35-usb2-multi.args               |  10 +-
 .../qemuxml2argv-q35-usb2-reorder.args             |  10 +-
 .../qemuxml2argv-q35-virtio-pcie.args              |  54 +++++++++
 .../qemuxml2argv-q35-virtio-pcie.xml               |  69 ++++++++++++
 tests/qemuxml2argvtest.c                           |  18 +++
 .../qemuxml2xmlout-autoindex.xml                   |  18 +--
 .../qemuxml2xmlout-q35-hotpluggable.xml            | 103 +++++++++++++++++
 .../qemuxml2xmlout-q35-usb2-multi.xml              |   8 +-
 .../qemuxml2xmlout-q35-usb2-reorder.xml            |   8 +-
 .../qemuxml2xmlout-q35-virtio-pcie.xml             | 123 +++++++++++++++++++++
 tests/qemuxml2xmltest.c                            |  15 +++
 34 files changed, 765 insertions(+), 64 deletions(-)
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-hotpluggable.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-hotpluggable.xml
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-virtio-pcie.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-virtio-pcie.xml
 create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-hotpluggable.xml
 create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virtio-pcie.xml

-- 
2.7.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]