[libvirt] [PATCHv3 1/5] qemu: introduce qemuDomainChrSerialTargetModel
Nikolay Shirokovskiy
nshirokovskiy at virtuozzo.com
Thu Apr 4 11:33:22 UTC 2019
On 14.02.2019 14:32, Ján Tomko wrote:
> 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 at redhat.com>
> ---
> 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)
>
Reviewed-by: Nikolay Shirokovskiy <nshirokovskiy at virtuozzo.com>
More information about the libvir-list
mailing list