[libvirt] [PATCH] Ignore virtio-mmio disks in qemuAssignDevicePCISlots()

Martin Kletzander mkletzan at redhat.com
Tue Sep 8 13:27:57 UTC 2015


[Please don't Cc random people when they did not request it, all
 developers are subscribed to the list]

On Tue, Sep 08, 2015 at 03:23:27PM +0300, Pavel Fedin wrote:
>Fixes the following error when attempting to add a disk with bus='virtio':
>
>virtio only support device address type 'PCI'
>

How did you manage to do that?  I think we are not handlind
virtio-mmio addressing properly as we won't add some controller qemu
will then be missing.  Shouldn't that be fixed as well?  And isn't
virtio-mmio only supported on some platforms?

Otherwise the change makes sense.

>Signed-off-by: Pavel Fedin <p.fedin at samsung.com>
>---
> src/qemu/qemu_command.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
>diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
>index 38104da..408b249 100644
>--- a/src/qemu/qemu_command.c
>+++ b/src/qemu/qemu_command.c
>@@ -2189,12 +2189,14 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
>         if (def->disks[i]->bus != VIR_DOMAIN_DISK_BUS_VIRTIO)
>             continue;
>
>-        /* don't touch s390 devices */
>+        /* don't touch s390 and virtio-mmio devices */
>         if (def->disks[i]->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI ||
>             def->disks[i]->info.type ==
>             VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_S390 ||
>             def->disks[i]->info.type ==
>-            VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW)
>+            VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW ||
>+            def->disks[i]->info.type ==
>+            VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_MMIO)
>             continue;
>
>         if (def->disks[i]->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
>--
>1.9.5.msysgit.0
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150908/44ef2f9c/attachment-0001.sig>


More information about the libvir-list mailing list