]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: command: add support for acpi-bridge-hotplug feature
authorAni Sinha <ani@anisinha.ca>
Fri, 8 Oct 2021 06:42:14 +0000 (12:12 +0530)
committerLaine Stump <laine@redhat.com>
Sun, 10 Oct 2021 17:21:04 +0000 (13:21 -0400)
commitbef0f0d8be6baa1d9359be208b53d6b8a37ddc95
tree4fdba3b2f7b7a216e5e7f995b055417b36f059b4
parent7300ccc9b3eddb38306868534e7fc2d505a0a13c
qemu: command: add support for acpi-bridge-hotplug feature

This change adds backend qemu command line support for new libvirt
global feature 'acpi-bridge-hotplug'. This option can be used as
following:

<feature>
  <pci>
    <acpi-bridge-hotplug state='off|on'/>
  </pci>
</feature>

The '<pci>' sub-element under '<feature>' is also newly introduced.

'acpi-bridge-hotplug' turns on the following command line option to
qemu for x86 guests:

(pc): -global PIIX4_PM.acpi-pci-hotplug-with-bridge-support=<off|on>

(q35): -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=<off|on>

This change also adds the required qemuxml2argv unit tests in order to
test correct qemu arguments. Unit tests have also been added to test
qemu capability validation checks as well as checks for using this
option with the right architecture.

Signed-off-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Laine Stump <laine@redhat.com>
src/qemu/qemu_command.c
tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.err [new file with mode: 0644]
tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.args [new file with mode: 0644]
tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.err [new file with mode: 0644]
tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.args [new file with mode: 0644]
tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.err [new file with mode: 0644]
tests/qemuxml2argvtest.c