[libvirt] [PATCH v3 27/28] qemu: Limit isa-serial usage to x86 guests

Andrea Bolognani abologna at redhat.com
Sun Nov 26 22:25:48 UTC 2017


The ISA bus is x86 specific, so we should limit usage of isa-serial
to x86 guests only, just like we already do eg. with sclpconsole and
s390x guests.

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 src/qemu/qemu_domain.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index d1e391f48..cf4af14dd 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -3611,6 +3611,12 @@ qemuDomainChrDefValidate(const virDomainChrDef *dev,
     if (dev->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL) {
         bool isCompatible = true;
 
+        if (!ARCH_IS_X86(def->os.arch) &&
+            (dev->targetType == VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA ||
+             dev->targetModel == VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_ISA_SERIAL)) {
+            isCompatible = false;
+        }
+
         if (!qemuDomainIsPSeries(def) &&
             (dev->targetType == VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SPAPR_VIO ||
              dev->targetModel == VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SPAPR_VTY)) {
-- 
2.14.3




More information about the libvir-list mailing list