]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Validate PCI support for USB controllers
authorAndrea Bolognani <abologna@redhat.com>
Mon, 22 Sep 2025 16:00:41 +0000 (18:00 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 6 Oct 2025 09:16:06 +0000 (11:16 +0200)
commitdc6e5b676dc10bdefb73d025aca3c5c2c98ff657
treeabbd7d02b2954351da7104170a54efdfe9444a9f
parent2bbfcd20421e38aa31cb7eb1139312b56d4aae27
qemu: Validate PCI support for USB controllers

Attempting to use a USB controller that's a PCI device with
a machine type that doesn't support PCI should result in an
error.

Note that, while all USB controllers supported by the libvirt
QEMU driver today are PCI devices, QEMU itself implements
machine types that come with non-PCI USB controllers. Having
a separate helper with a switch/case statement ensures that
things will need to be updated accordingly if libvirt will
ever grow support for those USB controllers.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_command.c