]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: Make virtio-9p-ccw the default for s390-ccw-virtio machines
authorBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Tue, 7 Jul 2015 15:30:42 +0000 (17:30 +0200)
committerJán Tomko <jtomko@redhat.com>
Wed, 15 Jul 2015 12:37:30 +0000 (14:37 +0200)
For s390-ccw-virtio machines the default bus type is set to ccw.
Specifing an address element allows to override the default.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: Jason J. Herne <jjherne@us.ibm.com>
Reviewed-by: Stefan Zimmermann <stzi@linux.vnet.ibm.com>
src/qemu/qemu_command.c

index d21375a62a70711ae0220ce3fd48c496adbde0b4..42906a898b36a770107e73dd64ce133bc146c4ac 100644 (file)
@@ -1273,6 +1273,7 @@ qemuDomainPrimeVirtioDeviceAddresses(virDomainDefPtr def,
        declare address-less virtio devices to be of address type 'type'
        disks, networks, consoles, controllers, memballoon and rng in this
        order
+       if type is ccw filesystem devices are declared to be of address type ccw
     */
     size_t i;
 
@@ -1309,6 +1310,13 @@ qemuDomainPrimeVirtioDeviceAddresses(virDomainDefPtr def,
             def->rngs[i]->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE)
             def->rngs[i]->info.type = type;
     }
+
+    if (type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) {
+        for (i = 0; i < def->nfss; i++) {
+            if (def->fss[i]->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE)
+                def->fss[i]->info.type = type;
+        }
+    }
 }