[PATCHv3 1/5] qemu: introduce qemuDomainChrSerialTargetModel

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

 



Allow adding serial device models that deviate from the perceived
semantics of our model attributes blindly copying the
hypervisor-specific device name strings.

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 src/qemu/qemu_command.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 572d3bc20f..94de6b9061 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -185,6 +185,20 @@ VIR_ENUM_IMPL(qemuNumaPolicy, VIR_DOMAIN_NUMATUNE_MEM_LAST,
               "interleave",
 );
 
+VIR_ENUM_DECL(qemuDomainChrSerialTargetModel);
+VIR_ENUM_IMPL(qemuDomainChrSerialTargetModel,
+              VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_LAST,
+              "none",
+              "isa-serial",
+              "usb-serial",
+              "pci-serial",
+              "spapr-vty",
+              "", /* pl011 is not user-insantiable */
+              "sclpconsole",
+              "sclplmconsole",
+              "", /* 16550a is not user-instantiable */
+);
+
 
 /**
  * qemuBuildMasterKeyCommandLine:
@@ -10812,7 +10826,7 @@ qemuBuildSerialChrDeviceStr(char **deviceStr,
     }
 
     virBufferAsprintf(&cmd, "%s,chardev=char%s,id=%s",
-                      virDomainChrSerialTargetModelTypeToString(serial->targetModel),
+                      qemuDomainChrSerialTargetModelTypeToString(serial->targetModel),
                       serial->info.alias, serial->info.alias);
 
     if (qemuBuildDeviceAddressStr(&cmd, def, &serial->info, qemuCaps) < 0)
-- 
2.19.2


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

  Powered by Linux