]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: introduce option to enable/disable pci hotplug on pci-root controller
authorAni Sinha <ani@anisinha.ca>
Fri, 1 Oct 2021 09:29:46 +0000 (14:59 +0530)
committerLaine Stump <laine@redhat.com>
Fri, 1 Oct 2021 18:19:44 +0000 (14:19 -0400)
commit8eadf82fb59604a97c1473ddd1e41860dcde0410
tree4d315521ba9d8f4021d0c51982d499cf83c3a32b
parentfdec09b00a5e1b6824fbba0df68b56e170a3274b
conf: introduce option to enable/disable pci hotplug on pci-root controller

This change introduces libvirt xml support to enable/disable hotplug on the
pci-root controller. It adds a 'target' subelement for the pci-root controller
with a 'hotplug' property. This property can be used to enable or disable
hotplug for the pci-root controller. For example, in order to disable hotplug
on the pci-root controller, one has to use set '<target hotplug='off'>' as
shown below:

<controller type='pci' model='pci-root'>
  <target hotplug='off'/>
</controller>

'<target hotplug='on'>' option would enable hotplug for pci-root controller.
This is also the default value. This option is only available for pc machine
types and is applicable for qemu/kvm accelerator only.This feature was
introduced from qemu version 5.2 with the following change in qemu repository:

3d7e78aa7777f ("Introduce a new flag for i440fx to disable PCI hotplug on the root bus")

The above qemu commit describes some reasons why users might to disable hotplug
on PCI root buses.

Related unit tests to exercise the new conf option has also been added.

Signed-off-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
docs/formatdomain.rst
src/qemu/qemu_validate.c
tests/qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-disable.xml [new file with mode: 0644]
tests/qemuxml2argvdata/pc-i440fx-acpi-root-hotplug-enable.xml [new file with mode: 0644]
tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-disable.xml [new symlink]
tests/qemuxml2xmloutdata/pc-i440fx-acpi-root-hotplug-enable.xml [new symlink]
tests/qemuxml2xmltest.c