Prevent default creation of usb controller on s390 and s390x

Since s390 does not support usb the default creation of a usb controller
for a domain should not occur.

Also adjust s390 test cases by removing usb device instances since
usb devices are no longer created by default for s390 the s390
test cases need to be adjusted.

Signed-off-by: Stefan Zimmermann <stzi@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
This commit is contained in:
Stefan Zimmermann 2015-02-18 16:44:17 +01:00 committed by John Ferlan
parent 6776a26e5c
commit 09ab9dcc85
5 changed files with 11 additions and 4 deletions

View File

@ -9006,7 +9006,9 @@ qemuBuildCommandLine(virConnectPtr conn,
}
}
if (usbcontroller == 0 && !qemuDomainMachineIsQ35(def))
if (usbcontroller == 0 &&
!qemuDomainMachineIsQ35(def) &&
!ARCH_IS_S390(def->os.arch))
virCommandAddArg(cmd, "-usb");
for (i = 0; i < def->nhubs; i++) {

View File

@ -979,6 +979,12 @@ qemuDomainDefPostParse(virDomainDefPtr def,
case VIR_ARCH_SH4EB:
addPCIRoot = true;
break;
case VIR_ARCH_S390:
addDefaultUSB = false;
break;
case VIR_ARCH_S390X:
addDefaultUSB = false;
break;
default:
break;
}

View File

@ -2,5 +2,5 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
/usr/bin/qemu \
-name QEMUGuest1 -S -M s390-virtio -m 214 -smp 1 -nographic \
-monitor unix:/tmp/test-monitor,server,nowait -no-acpi \
-boot c -usb -hda /dev/HostVG/QEMUGuest1 -net none -serial \
-boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial \
none -parallel none

View File

@ -3,7 +3,7 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
-nodefconfig -nodefaults \
-chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait \
-mon chardev=charmonitor,id=monitor,mode=readline -no-acpi \
-device virtio-serial-s390,id=virtio-serial0 -usb -drive \
-device virtio-serial-s390,id=virtio-serial0 -drive \
file=/dev/HostVG/QEMUGuest1,if=none,id=drive-virtio-disk0 \
-device virtio-blk-s390,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-chardev pty,id=charconsole0 \

View File

@ -14,7 +14,6 @@
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<controller type='usb' index='0' model='none'/>
<controller type='virtio-serial' index='0'/>
<console type='pty'>
<target type='virtio' port='0'/>