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:
parent
98b55862ef
commit
593639ffff
@ -446,6 +446,9 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
|
|||||||
"machine.pseries.resize-hpt",
|
"machine.pseries.resize-hpt",
|
||||||
"vmcoreinfo",
|
"vmcoreinfo",
|
||||||
"spapr-vty",
|
"spapr-vty",
|
||||||
|
|
||||||
|
/* 275 */
|
||||||
|
"sclplmconsole",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -1675,6 +1678,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
|
|||||||
{ "spapr-pci-host-bridge", QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE },
|
{ "spapr-pci-host-bridge", QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE },
|
||||||
{ "vmcoreinfo", QEMU_CAPS_DEVICE_VMCOREINFO },
|
{ "vmcoreinfo", QEMU_CAPS_DEVICE_VMCOREINFO },
|
||||||
{ "spapr-vty", QEMU_CAPS_DEVICE_SPAPR_VTY },
|
{ "spapr-vty", QEMU_CAPS_DEVICE_SPAPR_VTY },
|
||||||
|
{ "sclplmconsole", QEMU_CAPS_DEVICE_SCLPLMCONSOLE },
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioBalloon[] = {
|
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioBalloon[] = {
|
||||||
|
@ -433,6 +433,9 @@ typedef enum {
|
|||||||
QEMU_CAPS_DEVICE_VMCOREINFO, /* -device vmcoreinfo */
|
QEMU_CAPS_DEVICE_VMCOREINFO, /* -device vmcoreinfo */
|
||||||
QEMU_CAPS_DEVICE_SPAPR_VTY, /* -device spapr-vty */
|
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 */
|
QEMU_CAPS_LAST /* this must always be the last item */
|
||||||
} virQEMUCapsFlags;
|
} virQEMUCapsFlags;
|
||||||
|
|
||||||
|
@ -9307,7 +9307,6 @@ qemuBuildConsoleCommandLine(virLogManagerPtr logManager,
|
|||||||
|
|
||||||
switch (console->targetType) {
|
switch (console->targetType) {
|
||||||
case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SCLP:
|
case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SCLP:
|
||||||
case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SCLPLM:
|
|
||||||
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_SCLPCONSOLE)) {
|
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_SCLPCONSOLE)) {
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
_("sclpconsole is not supported in this QEMU binary"));
|
_("sclpconsole is not supported in this QEMU binary"));
|
||||||
@ -9328,6 +9327,27 @@ qemuBuildConsoleCommandLine(virLogManagerPtr logManager,
|
|||||||
return -1;
|
return -1;
|
||||||
break;
|
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:
|
case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_VIRTIO:
|
||||||
if (!(devstr = qemuBuildChrChardevStr(logManager, cmd, cfg, def,
|
if (!(devstr = qemuBuildChrChardevStr(logManager, cmd, cfg, def,
|
||||||
console->source,
|
console->source,
|
||||||
|
@ -141,6 +141,7 @@
|
|||||||
<flag name='virtio-gpu.max_outputs'/>
|
<flag name='virtio-gpu.max_outputs'/>
|
||||||
<flag name='vxhs'/>
|
<flag name='vxhs'/>
|
||||||
<flag name='virtio-blk.num-queues'/>
|
<flag name='virtio-blk.num-queues'/>
|
||||||
|
<flag name='sclplmconsole'/>
|
||||||
<version>2010000</version>
|
<version>2010000</version>
|
||||||
<kvmVersion>0</kvmVersion>
|
<kvmVersion>0</kvmVersion>
|
||||||
<package></package>
|
<package></package>
|
||||||
|
@ -135,6 +135,7 @@
|
|||||||
<flag name='chardev-reconnect'/>
|
<flag name='chardev-reconnect'/>
|
||||||
<flag name='virtio-gpu.max_outputs'/>
|
<flag name='virtio-gpu.max_outputs'/>
|
||||||
<flag name='virtio-blk.num-queues'/>
|
<flag name='virtio-blk.num-queues'/>
|
||||||
|
<flag name='sclplmconsole'/>
|
||||||
<version>2007000</version>
|
<version>2007000</version>
|
||||||
<kvmVersion>0</kvmVersion>
|
<kvmVersion>0</kvmVersion>
|
||||||
<package></package>
|
<package></package>
|
||||||
|
@ -137,6 +137,7 @@
|
|||||||
<flag name='chardev-reconnect'/>
|
<flag name='chardev-reconnect'/>
|
||||||
<flag name='virtio-gpu.max_outputs'/>
|
<flag name='virtio-gpu.max_outputs'/>
|
||||||
<flag name='virtio-blk.num-queues'/>
|
<flag name='virtio-blk.num-queues'/>
|
||||||
|
<flag name='sclplmconsole'/>
|
||||||
<version>2007093</version>
|
<version>2007093</version>
|
||||||
<kvmVersion>0</kvmVersion>
|
<kvmVersion>0</kvmVersion>
|
||||||
<package></package>
|
<package></package>
|
||||||
|
@ -138,6 +138,7 @@
|
|||||||
<flag name='chardev-reconnect'/>
|
<flag name='chardev-reconnect'/>
|
||||||
<flag name='virtio-gpu.max_outputs'/>
|
<flag name='virtio-gpu.max_outputs'/>
|
||||||
<flag name='virtio-blk.num-queues'/>
|
<flag name='virtio-blk.num-queues'/>
|
||||||
|
<flag name='sclplmconsole'/>
|
||||||
<version>2009000</version>
|
<version>2009000</version>
|
||||||
<kvmVersion>0</kvmVersion>
|
<kvmVersion>0</kvmVersion>
|
||||||
<package></package>
|
<package></package>
|
||||||
|
Loading…
Reference in New Issue
Block a user