On Thu, Sep 25, 2025 at 20:07:02 +0200, Andrea Bolognani via Devel wrote: > At the moment, we check whether the machine type supports PCI > before attempting to allocate PCI addresses, and if it does > not, we simply skip the step entirely. > > This means that an attempt to use a PCI device with a machine > type that has no PCI support won't be rejected by libvirt, and > only once the QEMU process is started the problem will be made > apparent. > > Validate things ahead of time instead, rejecting any such > configurations. > > Note that we only do this for new domains, because otherwise > existing domains that are configured incorrectly would disappear > and we generally try really hard to avoid that. > > A few tests start failing after this change, demonstrating that > things are now working as desired. > > Signed-off-by: Andrea Bolognani <[email protected]> > Reviewed-by: Michal Privoznik <[email protected]> > --- > src/qemu/qemu_domain_address.c | 18 ++++++++--- > ...default-fallback-nousb.aarch64-latest.args | 32 ------------------- > ...-default-fallback-nousb.aarch64-latest.xml | 22 ------------- > .../usb-controller-default-fallback-nousb.xml | 1 - > ...efault-nousb.aarch64-latest.abi-update.err | 1 + > ...ntroller-default-nousb.aarch64-latest.args | 32 ------------------- > ...ontroller-default-nousb.aarch64-latest.err | 1 + > ...fault-unavailable-nousb.aarch64-latest.err | 1 - > ...fault-unavailable-nousb.aarch64-latest.xml | 22 ------------- > ...b-controller-default-unavailable-nousb.xml | 1 - > tests/qemuxmlconftest.c | 14 ++------ > 11 files changed, 17 insertions(+), 128 deletions(-) > delete mode 100644 > tests/qemuxmlconfdata/usb-controller-default-fallback-nousb.aarch64-latest.args > delete mode 100644 > tests/qemuxmlconfdata/usb-controller-default-fallback-nousb.aarch64-latest.xml > delete mode 120000 > tests/qemuxmlconfdata/usb-controller-default-fallback-nousb.xml > create mode 100644 > tests/qemuxmlconfdata/usb-controller-default-nousb.aarch64-latest.abi-update.err > delete mode 100644 > tests/qemuxmlconfdata/usb-controller-default-nousb.aarch64-latest.args > create mode 100644 > tests/qemuxmlconfdata/usb-controller-default-nousb.aarch64-latest.err > delete mode 100644 > tests/qemuxmlconfdata/usb-controller-default-unavailable-nousb.aarch64-latest.err > delete mode 100644 > tests/qemuxmlconfdata/usb-controller-default-unavailable-nousb.aarch64-latest.xml > delete mode 120000 > tests/qemuxmlconfdata/usb-controller-default-unavailable-nousb.xml
Reviewed-by: Peter Krempa <[email protected]>
