[libvirt] [Patch v2 2/3] qemu: Fix specifying char devs for PPC

Olivia Yin Hong-Hua.Yin at freescale.com
Tue May 27 05:44:14 UTC 2014


QEMU ppce500 board uses the legacy -serial option.

Other PPC boards don't give any way to explicitly wire in a -chardev
except pseries which uses -device spapr-vty with -chardev.

Signed-off-by: Olivia Yin <Hong-Hua.Yin at freescale.com>
---
 src/qemu/qemu_capabilities.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 03d8842..1b09a17 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -3467,7 +3467,14 @@ virQEMUCapsSupportsChardev(virDomainDefPtr def,
         return false;
 
     if ((def->os.arch != VIR_ARCH_ARMV7L) && (def->os.arch != VIR_ARCH_AARCH64))
-        return true;
+    {
+        if ((def->os.arch != VIR_ARCH_PPC) && (def->os.arch != VIR_ARCH_PPC64))
+            return true;
+        else
+            /* 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);
+    }
 
     /* This may not be true for all ARM machine types, but at least
      * the only supported non-virtio serial devices of vexpress and versatile
-- 
1.8.5




More information about the libvir-list mailing list