On a Tuesday in 2024, Peter Krempa wrote:
Currently all machine types which do honour '-usb' are already covered by code which will either select a proper controller model or would select the same one which '-usb' would use.Thus all of the legacy -usb controller code can be removed. Signed-off-by: Peter Krempa <[email protected]> --- src/qemu/qemu_command.c | 88 ++----------------- .../sparc-minimal.sparc-latest.args | 1 - 2 files changed, 8 insertions(+), 81 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 2d6f930756..b163322191 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3055,29 +2999,16 @@ qemuBuildControllersByTypeCommandLine(virCommand *cmd, if (qemuBuildSkipController(cont, def)) continue;
qemuBuildSkipController claims: * Returns true if this controller can be skipped for command line * generation or device validation. but it is declared as static and only called from here. Consider moving the USB controller skipping there too.
- /* skip USB controllers with type none.*/
- if (cont->type == VIR_DOMAIN_CONTROLLER_TYPE_USB &&
- cont->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_NONE) {
- continue;
- }
+ if (cont->type == VIR_DOMAIN_CONTROLLER_TYPE_USB) {
- if (cont->type == VIR_DOMAIN_CONTROLLER_TYPE_USB &&
- cont->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_DEFAULT &&
- !qemuBuildDomainForbidLegacyUSBController(def)) {
+ /* skip USB controllers with type none*/
I don't think this comment is worth keeping.
+ if (cont->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_NONE) + continue; - /* An appropriate default USB controller model should already - * have been selected in qemuDomainDeviceDefPostParse(); if - * we still have no model by now, we have to fall back to the - * legacy USB controller. - * - * Note that we *don't* want to end up with the legacy USB - * controller for q35 and virt machines, so we go ahead and - * fail in qemuBuildControllerDevProps(); on the other hand, - * for s390 machines we want to ignore any USB controller - * (see 548ba43028 for the full story), so we skip
However the reference to commit 548ba43028 might be.
- * qemuBuildControllerDevProps() but we don't ultimately end
- * up adding the legacy USB controller */
- continue;
+ /* skip 'default' controllers on s390 for legacy reasons */
+ if (ARCH_IS_S390(def->os.arch) &&
+ cont->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_DEFAULT)
+ continue;
}
For the whole series: Reviewed-by: Ján Tomko <[email protected]> Jano
signature.asc
Description: PGP signature
_______________________________________________ Devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
