mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-04 20:15:19 +00:00
Fix default USB controller for ppc64
Fix the default usb controller for pseries systems if none
specified.
Signed-off-by: Dipankar Sarma <dipankar@in.ibm.com>
(cherry picked from commit d1778b7148
)
This commit is contained in:
parent
91b4315b81
commit
340ab1c91c
1
AUTHORS
1
AUTHORS
@ -236,6 +236,7 @@ Patches have also been contributed by:
|
||||
Radu Caragea <dmns_serp@yahoo.com>
|
||||
Beat Jörg <Beat.Joerg@ssatr.ch>
|
||||
Gao feng <gaofeng@cn.fujitsu.com>
|
||||
Dipankar Sarma <dipankar@in.ibm.com>
|
||||
|
||||
[....send patches to get your name here....]
|
||||
|
||||
|
@ -2555,7 +2555,8 @@ qemuControllerModelUSBToCaps(int model)
|
||||
|
||||
|
||||
static int
|
||||
qemuBuildUSBControllerDevStr(virDomainControllerDefPtr def,
|
||||
qemuBuildUSBControllerDevStr(virDomainDefPtr domainDef,
|
||||
virDomainControllerDefPtr def,
|
||||
virBitmapPtr qemuCaps,
|
||||
virBuffer *buf)
|
||||
{
|
||||
@ -2564,8 +2565,12 @@ qemuBuildUSBControllerDevStr(virDomainControllerDefPtr def,
|
||||
|
||||
model = def->model;
|
||||
|
||||
if (model == -1)
|
||||
model = VIR_DOMAIN_CONTROLLER_MODEL_USB_PIIX3_UHCI;
|
||||
if (model == -1) {
|
||||
if (STREQ(domainDef->os.arch, "ppc64"))
|
||||
model = VIR_DOMAIN_CONTROLLER_MODEL_USB_PCI_OHCI;
|
||||
else
|
||||
model = VIR_DOMAIN_CONTROLLER_MODEL_USB_PIIX3_UHCI;
|
||||
}
|
||||
|
||||
smodel = qemuControllerModelUSBTypeToString(model);
|
||||
caps = qemuControllerModelUSBToCaps(model);
|
||||
@ -2651,7 +2656,7 @@ qemuBuildControllerDevStr(virDomainDefPtr domainDef,
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_CONTROLLER_TYPE_USB:
|
||||
if (qemuBuildUSBControllerDevStr(def, qemuCaps, &buf) == -1)
|
||||
if (qemuBuildUSBControllerDevStr(domainDef, def, qemuCaps, &buf) == -1)
|
||||
goto error;
|
||||
|
||||
if (nusbcontroller)
|
||||
|
Loading…
Reference in New Issue
Block a user