Re: [PATCH] QEMU: Fix virtio-serial device support on PPC.

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

 



Should we add a flag like QEMU_CAPS_VIRTIO_SERIAL and a test case to verify -device virtio-serial*?

Best Regards,
Olivia

> -----Original Message-----
> From: Olivia Yin [mailto:Hong-Hua.Yin@xxxxxxxxxxxxx]
> Sent: Wednesday, June 25, 2014 6:32 PM
> To: libvir-list@xxxxxxxxxx
> Cc: Yin Olivia-R63875
> Subject: [PATCH] QEMU: Fix virtio-serial device support on PPC.
> 
> Patch fd0f22ed414e114664f4140306834bedd19f52c9 discard virtio-serial device
> support on PPC machine.
> 
> Most PPC boards don't use -chardev with non-virtio serial device except
> pseries which uses -device spapr-vty with -chardev.
> 
> Signed-off-by: Olivia Yin <Hong-Hua.Yin@xxxxxxxxxxxxx>
> ---
>  src/qemu/qemu_capabilities.c | 15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
> 
> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index 8e0a550..4541f52 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -3493,19 +3493,18 @@ virQEMUCapsSupportsChardev(virDomainDefPtr def,
>          !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE))
>          return false;
> 
> -    if ((def->os.arch == VIR_ARCH_PPC) || (def->os.arch == VIR_ARCH_PPC64))
> {
> -        /* only pseries need -device spapr-vty with -chardev */
> -        return (chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL &&
> -                chr->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO);
> -    }
> -
> -    if ((def->os.arch != VIR_ARCH_ARMV7L) && (def->os.arch !=
> VIR_ARCH_AARCH64))
> +    if ((def->os.arch != VIR_ARCH_ARMV7L) && (def->os.arch !=
> VIR_ARCH_AARCH64) &&
> +        (def->os.arch != VIR_ARCH_PPC) && (def->os.arch !=
> + VIR_ARCH_PPC64))
>          return true;
> 
>      /* This may not be true for all ARM machine types, but at least
>       * the only supported non-virtio serial devices of vexpress and
> versatile
>       * don't have the -chardev property wired up. */
> +    /* Currently PPC boards don't use -chardev for non-virtio serial
> device
> +     * except pseries which uses -device spapr-vty with -chardev. */
>      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));
> +             chr->targetType == VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_VIRTIO)
> ||
> +            (chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL &&
> +             chr->info.type ==
> + VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO));
>  }
> --
> 1.8.5


--
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]