Re: [PATCH 9/9] qemu: Support virtio-mmio transport for virtio on ARM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 31, 2013 at 10:14:39PM -0400, Cole Robinson wrote:
> Starting with qemu 1.6, the qemu-system-arm vexpress-a9 model has a
> hardcoded virtio-mmio transport which enables attaching all virtio
> devices.
> 
> On the command line, we have to use virtio-XXX-device rather than
> virtio-XXX-pci, thankfully s390 already set the precedent here so
> it's fairly straight forward.
> 
> At the XML level, this adds a new device address type virtio-mmio.
> The controller and addressing don't have any subelements at the
> moment because we they aren't needed for this usecase, but could
> be added later if needed.
> 
> Add a test case for an ARM guest with one of every virtio device
> enabled.


> @@ -2814,17 +2816,19 @@ virQEMUCapsUsedQMP(virQEMUCapsPtr qemuCaps)
>  bool
>  virQEMUCapsSupportsChardev(virDomainDefPtr def,
>                             virQEMUCapsPtr qemuCaps,
> -                           virDomainChrDefPtr chr ATTRIBUTE_UNUSED)
> +                           virDomainChrDefPtr chr)
>  {
>      if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_CHARDEV) ||
>          !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE))
>          return false;
>  
> -    /* This may not be true for all machine types, but at least
> -     * the only supported serial devices of vexpress-a9 and versatilepb
> -     * don't have the chardev property wired up */
>      if (def->os.arch != VIR_ARCH_ARMV7L)
> -        return false;
> +        return true;
>  
> -    return true;
> +    /* This may not be true for all ARM machine types, but at least
> +     * the non-virtio serial devices of vexpress-a9 and versatilepb
> +     * don't have the chardev property wired up */
> +    return (chr->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_MMIO ||
> +            (chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_CONSOLE &&
> +             chr->targetType == VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_VIRTIO));
>  }

Urgh. Now I see why you didn't just clear the CHARDEV capability
for ARM - it isn't a simple as blacklisting the whole architecture.
This is one of those times I really hate QEMU :-)

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]