]> xenbits.xensource.com Git - libvirt.git/commitdiff
Prevent default creation of usb controller on s390 and s390x
authorStefan Zimmermann <stzi@linux.vnet.ibm.com>
Wed, 18 Feb 2015 15:44:17 +0000 (16:44 +0100)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 23 Feb 2015 19:50:15 +0000 (14:50 -0500)
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>
src/qemu/qemu_command.c
src/qemu/qemu_domain.c
tests/qemuxml2argvdata/qemuxml2argv-minimal-s390.args
tests/qemuxml2argvdata/qemuxml2argv-s390-piix-controllers.args
tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-defaultconsole.xml

index 7853125c08395cd960bfc4302f20593644ae678b..fb3d5ab25929f6191a7596d26f21ca94a930b75e 100644 (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++) {
index 99c46d484f5dbb6d0f6ee819bd5e4190e2502ce2..bd9d4f26ec99fa4f14899dd9f379c268ecf8ad8a 100644 (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;
     }
index 6aee214c4142f77b97854692e2dc97a2b3f7dd07..4ea75de9291413eca86e0691129a2769cbeee3e1 100644 (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
index 10aecea58ee770c77bf27d495aaef04646aee0a5..e939be45f467c6c86601e7622b5202fc7bdea9b2 100644 (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 \
index 9a609f8666fd38a418ef88bcf2ca227e292705fd..54bb364ee2a9c6c0a6da47b8544568255bec927d 100644 (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'/>