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

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

 



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@xxxxxxxxxxxxx>
---
 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

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