提交 593639ff 编写于 作者: P Pino Toscano 提交者: Andrea Bolognani

qemu: add QEMU_CAPS_DEVICE_SCLPLMCONSOLE

Add a separate capability for the sclplmconsole device, and check it
specifically instead of using QEMU_CAPS_DEVICE_SCLPCONSOLE for that too.
Signed-off-by: NPino Toscano <ptoscano@redhat.com>
Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
上级 98b55862
......@@ -446,6 +446,9 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"machine.pseries.resize-hpt",
"vmcoreinfo",
"spapr-vty",
/* 275 */
"sclplmconsole",
);
......@@ -1675,6 +1678,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
{ "spapr-pci-host-bridge", QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE },
{ "vmcoreinfo", QEMU_CAPS_DEVICE_VMCOREINFO },
{ "spapr-vty", QEMU_CAPS_DEVICE_SPAPR_VTY },
{ "sclplmconsole", QEMU_CAPS_DEVICE_SCLPLMCONSOLE },
};
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioBalloon[] = {
......
......@@ -433,6 +433,9 @@ typedef enum {
QEMU_CAPS_DEVICE_VMCOREINFO, /* -device vmcoreinfo */
QEMU_CAPS_DEVICE_SPAPR_VTY, /* -device spapr-vty */
/* 275 */
QEMU_CAPS_DEVICE_SCLPLMCONSOLE, /* -device sclplmconsole */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
......
......@@ -9307,7 +9307,6 @@ qemuBuildConsoleCommandLine(virLogManagerPtr logManager,
switch (console->targetType) {
case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SCLP:
case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SCLPLM:
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_SCLPCONSOLE)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("sclpconsole is not supported in this QEMU binary"));
......@@ -9328,6 +9327,27 @@ qemuBuildConsoleCommandLine(virLogManagerPtr logManager,
return -1;
break;
case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SCLPLM:
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_SCLPLMCONSOLE)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("sclplmconsole is not supported in this QEMU binary"));
return -1;
}
if (!(devstr = qemuBuildChrChardevStr(logManager, cmd, cfg, def,
console->source,
console->info.alias,
qemuCaps, true,
chardevStdioLogd)))
return -1;
virCommandAddArg(cmd, "-chardev");
virCommandAddArg(cmd, devstr);
VIR_FREE(devstr);
if (qemuBuildChrDeviceCommandLine(cmd, def, console, qemuCaps) < 0)
return -1;
break;
case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_VIRTIO:
if (!(devstr = qemuBuildChrChardevStr(logManager, cmd, cfg, def,
console->source,
......
......@@ -141,6 +141,7 @@
<flag name='virtio-gpu.max_outputs'/>
<flag name='vxhs'/>
<flag name='virtio-blk.num-queues'/>
<flag name='sclplmconsole'/>
<version>2010000</version>
<kvmVersion>0</kvmVersion>
<package></package>
......
......@@ -135,6 +135,7 @@
<flag name='chardev-reconnect'/>
<flag name='virtio-gpu.max_outputs'/>
<flag name='virtio-blk.num-queues'/>
<flag name='sclplmconsole'/>
<version>2007000</version>
<kvmVersion>0</kvmVersion>
<package></package>
......
......@@ -137,6 +137,7 @@
<flag name='chardev-reconnect'/>
<flag name='virtio-gpu.max_outputs'/>
<flag name='virtio-blk.num-queues'/>
<flag name='sclplmconsole'/>
<version>2007093</version>
<kvmVersion>0</kvmVersion>
<package></package>
......
......@@ -138,6 +138,7 @@
<flag name='chardev-reconnect'/>
<flag name='virtio-gpu.max_outputs'/>
<flag name='virtio-blk.num-queues'/>
<flag name='sclplmconsole'/>
<version>2009000</version>
<kvmVersion>0</kvmVersion>
<package></package>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册