qemuDomainControllerDefPostParse: Use proper enum value for default USB controller model

Assign VIR_DOMAIN_CONTROLLER_MODEL_USB_DEFAULT rather than -1.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Peter Krempa 2024-02-27 13:18:06 +01:00
parent 1dd0744b29
commit d885d39f10

View File

@ -5658,7 +5658,7 @@ qemuDomainControllerDefPostParse(virDomainControllerDef *cont,
cont->model = VIR_DOMAIN_CONTROLLER_MODEL_USB_PCI_OHCI; cont->model = VIR_DOMAIN_CONTROLLER_MODEL_USB_PCI_OHCI;
} else { } else {
/* Explicitly fallback to legacy USB controller for PPC64. */ /* Explicitly fallback to legacy USB controller for PPC64. */
cont->model = -1; cont->model = VIR_DOMAIN_CONTROLLER_MODEL_USB_DEFAULT;
} }
} else if (def->os.arch == VIR_ARCH_AARCH64) { } else if (def->os.arch == VIR_ARCH_AARCH64) {
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_QEMU_XHCI)) if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_QEMU_XHCI))