1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

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: Pino Toscano <ptoscano@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Pino Toscano 2017-11-15 18:08:44 +01:00 committed by Andrea Bolognani
parent 98b55862ef
commit 593639ffff
7 changed files with 32 additions and 1 deletions

View File

@ -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[] = {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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