Re: [libvirt] [PATCH] QEMU: Fix virtio-serial device support on PPC.
On Wed, Jun 25, 2014 at 06:31:43PM +0800, Olivia Yin wrote: > 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 > --- > src/qemu/qemu_capabilities.c | 15 +++ > 1 file changed, 7 insertions(+), 8 deletions(-) Can you provide 2 test cases for tests/qemuxml2argvtest for this - one to test pseries required config and one to test non-pseries configs - so we can ensure we don't have a regression again. Regards, 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@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] QEMU: Fix virtio-serial device support on PPC.
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@freescale.com] > Sent: Wednesday, June 25, 2014 6:32 PM > To: libvir-list@redhat.com > 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 > --- > 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@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [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 --- 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@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list