mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03:00
Set legacy USB option with default for ppc64.
Currently, -device xxx still doesn't work well for ppc64 platform. It's better use legacy USB option with default for ppc64. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
4327df7eee
commit
88c6159ca7
@ -6471,7 +6471,8 @@ qemuBuildCommandLine(virConnectPtr conn,
|
||||
}
|
||||
} else if (cont->type == VIR_DOMAIN_CONTROLLER_TYPE_USB &&
|
||||
cont->model == -1 &&
|
||||
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_PIIX3_USB_UHCI)) {
|
||||
(!virQEMUCapsGet(qemuCaps, QEMU_CAPS_PIIX3_USB_UHCI) ||
|
||||
def->os.arch == VIR_ARCH_PPC64)) {
|
||||
if (usblegacy) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("Multiple legacy USB controllers are "
|
||||
|
@ -0,0 +1,7 @@
|
||||
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \
|
||||
/usr/bin/qemu-system-ppc64 -S -M pseries -m 512 -smp 1 \
|
||||
-nographic -nodefconfig -nodefaults \
|
||||
-chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait \
|
||||
-mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c \
|
||||
-usb -chardev pty,id=charserial0 \
|
||||
-device spapr-vty,chardev=charserial0,reg=0x30000000
|
17
tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-default.xml
Normal file
17
tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-default.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<domain type='qemu'>
|
||||
<name>QEMUGuest1</name>
|
||||
<uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
|
||||
<memory unit='KiB'>524288</memory>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='ppc64' machine='pseries'>hvm</type>
|
||||
</os>
|
||||
<clock offset='utc'/>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-ppc64</emulator>
|
||||
<console type='pty'>
|
||||
<address type="spapr-vio"/>
|
||||
</console>
|
||||
<memballoon model="none"/>
|
||||
</devices>
|
||||
</domain>
|
@ -0,0 +1,8 @@
|
||||
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \
|
||||
/usr/bin/qemu-system-ppc64 -S -M pseries -m 512 -smp 1 \
|
||||
-nographic -nodefconfig -nodefaults -chardev \
|
||||
socket,id=charmonitor,path=/tmp/test-monitor,server,nowait \
|
||||
-mon chardev=charmonitor,id=monitor,mode=readline -no-acpi \
|
||||
-boot c -device piix3-usb-uhci,id=usb,bus=pci,addr=0x1.0x2 \
|
||||
-device pci-ohci,id=usb1,bus=pci,addr=0x3 -chardev \
|
||||
pty,id=charserial0 -device spapr-vty,chardev=charserial0,reg=0x30000000
|
19
tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-multi.xml
Normal file
19
tests/qemuxml2argvdata/qemuxml2argv-pseries-usb-multi.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<domain type='qemu'>
|
||||
<name>QEMUGuest1</name>
|
||||
<uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
|
||||
<memory unit='KiB'>524288</memory>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='ppc64' machine='pseries'>hvm</type>
|
||||
</os>
|
||||
<clock offset='utc'/>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-ppc64</emulator>
|
||||
<console type='pty'>
|
||||
<address type="spapr-vio"/>
|
||||
</console>
|
||||
<controller type='usb' index='0' model='piix3-uhci'/>
|
||||
<controller type='usb' index='1' model='pci-ohci'/>
|
||||
<memballoon model="none"/>
|
||||
</devices>
|
||||
</domain>
|
@ -903,6 +903,14 @@ mymain(void)
|
||||
QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG);
|
||||
DO_TEST("pseries-vio", QEMU_CAPS_DRIVE,
|
||||
QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG);
|
||||
DO_TEST("pseries-usb-default", QEMU_CAPS_DRIVE,
|
||||
QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE,
|
||||
QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_PIIX3_USB_UHCI,
|
||||
QEMU_CAPS_PCI_OHCI, QEMU_CAPS_PCI_MULTIFUNCTION);
|
||||
DO_TEST("pseries-usb-multi", QEMU_CAPS_DRIVE,
|
||||
QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE,
|
||||
QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_PIIX3_USB_UHCI,
|
||||
QEMU_CAPS_PCI_OHCI, QEMU_CAPS_PCI_MULTIFUNCTION);
|
||||
DO_TEST("pseries-vio-user-assigned", QEMU_CAPS_DRIVE,
|
||||
QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG);
|
||||
DO_TEST_ERROR("pseries-vio-address-clash", QEMU_CAPS_DRIVE,
|
||||
|
Loading…
Reference in New Issue
Block a user