
On Tue, Aug 19, 2025 at 18:22:15 +0200, Andrea Bolognani via Devel wrote:
Only the -eb variants of the realview board support PCI devices, so those are the only ones that should automatically get a USB controller (addDefaultUSB).
You don't mention what the consequence of the originally bad choice is. Did the VM fail to start if the OHCI controller was used on the board/machine type without PCI? While the chance for people to hit regressions are low as not many people use these we still ought to keep our compat promise.
Additionally, they should get a PCI controller added automatically (addPCIRoot) too, same as versatilepb.
Finally, qemuDomainSupportsPCI() should correctly report the fact that these machine types support PCI.
As a consequence of these fixes, the USB controllers now correctly get assigned PCI addresses across the board.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- src/qemu/qemu_domain.c | 3 ++- src/qemu/qemu_postparse.c | 10 ++++------ ...h64-realview-minimal.aarch64-latest.abi-update.args | 2 +- ...ch64-realview-minimal.aarch64-latest.abi-update.xml | 5 ++++- .../aarch64-realview-minimal.aarch64-latest.args | 2 +- .../aarch64-realview-minimal.aarch64-latest.xml | 5 ++++- ...b-controller-automatic-realview.aarch64-latest.args | 2 +- ...sb-controller-automatic-realview.aarch64-latest.xml | 5 ++++- ...r-automatic-unavailable-realview.aarch64-latest.xml | 5 ++++- ...oller-default-fallback-realview.aarch64-latest.args | 2 +- ...roller-default-fallback-realview.aarch64-latest.xml | 5 ++++- ...usb-controller-default-realview.aarch64-latest.args | 2 +- .../usb-controller-default-realview.aarch64-latest.xml | 5 ++++- ...ler-default-unavailable-realview.aarch64-latest.xml | 5 ++++- 14 files changed, 39 insertions(+), 19 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index e45757ccd5..81a8ca906d 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -7688,7 +7688,8 @@ qemuDomainSupportsPCI(const virDomainDef *def) * machine types support PCI */ if (ARCH_IS_ARM(def->os.arch)) { if (qemuDomainIsARMVirt(def) || - STREQ(def->os.machine, "versatilepb")) { + STREQ(def->os.machine, "versatilepb") || + STRPREFIX(def->os.machine, "realview-eb")) { return true; } return false; diff --git a/src/qemu/qemu_postparse.c b/src/qemu/qemu_postparse.c index 5f59b79d56..3c481ead5e 100644 --- a/src/qemu/qemu_postparse.c +++ b/src/qemu/qemu_postparse.c @@ -1291,13 +1291,11 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver, case VIR_ARCH_ARMV7L: case VIR_ARCH_ARMV7B: case VIR_ARCH_AARCH64: - if (STREQ(def->os.machine, "versatilepb")) - addPCIRoot = true; - - /* Add default USB for the two machine types which historically - * supported -usb */ + /* Add default PCI and USB for the two machine types which + * historically supported -usb */ if (STREQ(def->os.machine, "versatilepb") || - STRPREFIX(def->os.machine, "realview")) { + STRPREFIX(def->os.machine, "realview-eb")) { + addPCIRoot = true; addDefaultUSB = true; if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_PCI_OHCI)) usbModel = VIR_DOMAIN_CONTROLLER_MODEL_USB_PCI_OHCI;
So if 'realview' machine with default USB worked before I don't think you should remove it here. If it didn't work please update the commit message and use: Reviewed-by: Peter Krempa <pkrempa@redhat.com>