
On Tue, Aug 19, 2025 at 18:22:27 +0200, Andrea Bolognani via Devel wrote:
Right now we call qemuValidateDomainDeviceDefControllerUSB() quite late, just as we're generating the QEMU command line.
The original intention was likely to prevent configurations from being rejected, even though a default USB controller model could not be found, because using -usb could be used as a last resort.
As it turns out, this premise was always flawed: in order for -usb to work, the underlying device still needs to be compiled into QEMU, and if that was the case then the earlier code would have detected its presence and set the model name accordingly.
More recently, we have dropped the use of -usb altogether so there's simply no longer anything to fall back to.
With all this in mind, we can move the validation step much earlier, making for a better user experience as any issues will be reported when the domain is defined rather than when an attempt is made to start it.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> ---
[..] In general I agree with this patch but it will require modifications based on my prior review. Reviewed-by: Peter Krempa <pkrempa@redhat.com>