On 6. 4. 2020 15:51, Laine Stump wrote: > This series enables use of QEMU 5.0's new "hotplug=off" setting for > pcie-root-ports and pcie-switch-downstream-ports. When set (in the > <target> subelement of the <controller> config), the emulated > controller will report to the guest OS that devices cannot be > hotplugged into or, maybe more importantly, out of the port. The > result is that when a device is plugged into such a port at boot time, > "certain guest OSes" won't show a menu to all users listing all PCIe > devices as available to "Safely Remove". > > I had to hand-edit several capabilities results files in patch 1, > since the pcie-root-port device has been present in QEMU for a long > time, but we previously had not been gathering the list of options for > that device. If someone has a setup to regenerate *actual* results for > all those versions of QEMU, I would be very appreciative and gladly > use that instead (Hi Kyle Two!) > > NB: the last 3 patches are each trivial, and I'd be happy to squash > them, but had already committed them separately, and thought it helped > in explaining. > > > This resolves https://bugzilla.redhat.com/1802592 > > Laine Stump (10): > qemu: new capabilities flag pcie-root-port.hotplug > conf: new attribute "hotplug" for pci controllers > qemu: hook up pcie-root-port hotplug='off' option > docs: mention hotplug='off' in news.xml > conf: add new PCI_CONNECT flag AUTOASSIGN > conf/qemu: s/VIR_PCI_CONNECT_HOTPLUGGABLE/VIR_PCI_CONNECT_AUTOASSIGN/g > conf: simplify logic when checking for AUTOASSIGN PCI addresses > qemu/conf: set HOTPLUGGABLE connect flag during PCI address set init > conf: check HOTPLUGGABLE connect flag when validating a PCI address > conf: during PCI hotplug, require that the controller support hotplug > > docs/formatdomain.html.in | 11 ++ > docs/news.xml | 12 ++ > docs/schemas/domaincommon.rng | 5 + > src/conf/domain_addr.c | 85 ++++---- > src/conf/domain_addr.h | 44 +++-- > src/conf/domain_conf.c | 20 +- > src/conf/domain_conf.h | 1 + > src/qemu/qemu_capabilities.c | 8 + > src/qemu/qemu_capabilities.h | 1 + > src/qemu/qemu_command.c | 4 + > src/qemu/qemu_domain_address.c | 24 ++- > src/qemu/qemu_validate.c | 31 +++ > .../caps_2.10.0.aarch64.replies | 142 ++++++++++++-- > .../caps_2.10.0.x86_64.replies | 154 ++++++++++++--- > .../caps_2.11.0.x86_64.replies | 154 ++++++++++++--- > .../caps_2.12.0.aarch64.replies | 158 ++++++++++++--- > .../caps_2.12.0.x86_64.replies | 170 +++++++++++++--- > .../caps_2.9.0.x86_64.replies | 154 ++++++++++++--- > .../caps_3.0.0.x86_64.replies | 170 +++++++++++++--- > .../caps_3.1.0.x86_64.replies | 170 +++++++++++++--- > .../caps_4.0.0.aarch64.replies | 158 ++++++++++++--- > .../caps_4.0.0.ppc64.replies | 150 +++++++++++++-- > .../caps_4.0.0.riscv32.replies | 150 +++++++++++++-- > .../caps_4.0.0.riscv64.replies | 150 +++++++++++++-- > .../caps_4.0.0.x86_64.replies | 170 +++++++++++++--- > .../caps_4.1.0.x86_64.replies | 162 +++++++++++++--- > .../caps_4.2.0.aarch64.replies | 166 +++++++++++++--- > .../caps_4.2.0.ppc64.replies | 150 +++++++++++++-- > .../caps_4.2.0.x86_64.replies | 162 +++++++++++++--- > .../caps_5.0.0.aarch64.replies | 166 +++++++++++++--- > .../caps_5.0.0.ppc64.replies | 150 +++++++++++++-- > .../caps_5.0.0.x86_64.replies | 181 +++++++++++++++--- > .../caps_5.0.0.x86_64.xml | 1 + > .../pcie-root-port-nohotplug.args | 39 ++++ > .../pcie-root-port-nohotplug.xml | 35 ++++ > tests/qemuxml2argvtest.c | 7 + > .../pcie-root-port-nohotplug.xml | 64 +++++++ > tests/qemuxml2xmltest.c | 7 + > 38 files changed, 3038 insertions(+), 548 deletions(-) > create mode 100644 tests/qemuxml2argvdata/pcie-root-port-nohotplug.args > create mode 100644 tests/qemuxml2argvdata/pcie-root-port-nohotplug.xml > create mode 100644 tests/qemuxml2xmloutdata/pcie-root-port-nohotplug.xml > Reviewed-by: Michal Privoznik <mprivozn@xxxxxxxxxx> Michal