|
|
c1c534 |
From c77b3a25ee9f277359018a1b65ea73fefd9d4c4e Mon Sep 17 00:00:00 2001
|
|
|
c1c534 |
Message-Id: <c77b3a25ee9f277359018a1b65ea73fefd9d4c4e@dist-git>
|
|
|
c1c534 |
From: Pino Toscano <ptoscano@redhat.com>
|
|
|
c1c534 |
Date: Wed, 29 Nov 2017 16:22:53 +0100
|
|
|
c1c534 |
Subject: [PATCH] qemu: add QEMU_CAPS_DEVICE_SCLPLMCONSOLE
|
|
|
c1c534 |
|
|
|
c1c534 |
Add a separate capability for the sclplmconsole device, and check it
|
|
|
c1c534 |
specifically instead of using QEMU_CAPS_DEVICE_SCLPCONSOLE for that too.
|
|
|
c1c534 |
|
|
|
c1c534 |
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
|
|
|
c1c534 |
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
|
|
|
c1c534 |
(cherry picked from commit 593639ffffa43f52aae53038bc8bd75ec700b12f)
|
|
|
c1c534 |
|
|
|
c1c534 |
Conflicts:
|
|
|
c1c534 |
src/qemu/qemu_capabilities.c
|
|
|
c1c534 |
src/qemu/qemu_capabilities.h
|
|
|
c1c534 |
tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
|
|
|
c1c534 |
tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml
|
|
|
c1c534 |
|
|
|
c1c534 |
Insert the new capability in the right place, both in the
|
|
|
c1c534 |
declaration and in caps.
|
|
|
c1c534 |
|
|
|
c1c534 |
https://bugzilla.redhat.com/show_bug.cgi?id=1449265
|
|
|
c1c534 |
https://bugzilla.redhat.com/show_bug.cgi?id=1511421
|
|
|
c1c534 |
https://bugzilla.redhat.com/show_bug.cgi?id=1512929
|
|
|
c1c534 |
https://bugzilla.redhat.com/show_bug.cgi?id=1512934
|
|
|
c1c534 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
c1c534 |
---
|
|
|
c1c534 |
src/qemu/qemu_capabilities.c | 3 ++-
|
|
|
c1c534 |
src/qemu/qemu_capabilities.h | 2 +-
|
|
|
c1c534 |
src/qemu/qemu_command.c | 22 +++++++++++++++++++++-
|
|
|
c1c534 |
tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 1 +
|
|
|
c1c534 |
tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml | 1 +
|
|
|
c1c534 |
tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 1 +
|
|
|
c1c534 |
tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml | 1 +
|
|
|
c1c534 |
7 files changed, 28 insertions(+), 3 deletions(-)
|
|
|
c1c534 |
|
|
|
c1c534 |
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
|
|
|
c1c534 |
index 374a2e79a7..322e0423d6 100644
|
|
|
c1c534 |
--- a/src/qemu/qemu_capabilities.c
|
|
|
c1c534 |
+++ b/src/qemu/qemu_capabilities.c
|
|
|
c1c534 |
@@ -448,7 +448,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
|
|
|
c1c534 |
"spapr-vty",
|
|
|
c1c534 |
|
|
|
c1c534 |
/* 275 */
|
|
|
c1c534 |
-
|
|
|
c1c534 |
+ "sclplmconsole",
|
|
|
c1c534 |
|
|
|
c1c534 |
"disk-share-rw",
|
|
|
c1c534 |
);
|
|
|
c1c534 |
@@ -1680,6 +1680,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
|
|
|
c1c534 |
{ "qemu-xhci", QEMU_CAPS_DEVICE_QEMU_XHCI },
|
|
|
c1c534 |
{ "spapr-pci-host-bridge", QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE },
|
|
|
c1c534 |
{ "spapr-vty", QEMU_CAPS_DEVICE_SPAPR_VTY },
|
|
|
c1c534 |
+ { "sclplmconsole", QEMU_CAPS_DEVICE_SCLPLMCONSOLE },
|
|
|
c1c534 |
};
|
|
|
c1c534 |
|
|
|
c1c534 |
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioBalloon[] = {
|
|
|
c1c534 |
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
|
|
|
c1c534 |
index f115738b6b..c3a15948cf 100644
|
|
|
c1c534 |
--- a/src/qemu/qemu_capabilities.h
|
|
|
c1c534 |
+++ b/src/qemu/qemu_capabilities.h
|
|
|
c1c534 |
@@ -434,7 +434,7 @@ typedef enum {
|
|
|
c1c534 |
QEMU_CAPS_DEVICE_SPAPR_VTY, /* -device spapr-vty */
|
|
|
c1c534 |
|
|
|
c1c534 |
/* 275 */
|
|
|
c1c534 |
-
|
|
|
c1c534 |
+ QEMU_CAPS_DEVICE_SCLPLMCONSOLE, /* -device sclplmconsole */
|
|
|
c1c534 |
|
|
|
c1c534 |
QEMU_CAPS_DISK_SHARE_RW, /* share-rw=on for concurrent disk access */
|
|
|
c1c534 |
|
|
|
c1c534 |
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
|
|
|
c1c534 |
index 092d820b1d..19a819a3aa 100644
|
|
|
c1c534 |
--- a/src/qemu/qemu_command.c
|
|
|
c1c534 |
+++ b/src/qemu/qemu_command.c
|
|
|
c1c534 |
@@ -9419,7 +9419,6 @@ qemuBuildConsoleCommandLine(virLogManagerPtr logManager,
|
|
|
c1c534 |
|
|
|
c1c534 |
switch (console->targetType) {
|
|
|
c1c534 |
case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SCLP:
|
|
|
c1c534 |
- case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SCLPLM:
|
|
|
c1c534 |
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_SCLPCONSOLE)) {
|
|
|
c1c534 |
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
|
|
c1c534 |
_("sclpconsole is not supported in this QEMU binary"));
|
|
|
c1c534 |
@@ -9440,6 +9439,27 @@ qemuBuildConsoleCommandLine(virLogManagerPtr logManager,
|
|
|
c1c534 |
return -1;
|
|
|
c1c534 |
break;
|
|
|
c1c534 |
|
|
|
c1c534 |
+ case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SCLPLM:
|
|
|
c1c534 |
+ if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_SCLPLMCONSOLE)) {
|
|
|
c1c534 |
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
|
|
c1c534 |
+ _("sclplmconsole is not supported in this QEMU binary"));
|
|
|
c1c534 |
+ return -1;
|
|
|
c1c534 |
+ }
|
|
|
c1c534 |
+
|
|
|
c1c534 |
+ if (!(devstr = qemuBuildChrChardevStr(logManager, cmd, cfg, def,
|
|
|
c1c534 |
+ console->source,
|
|
|
c1c534 |
+ console->info.alias,
|
|
|
c1c534 |
+ qemuCaps, true,
|
|
|
c1c534 |
+ chardevStdioLogd)))
|
|
|
c1c534 |
+ return -1;
|
|
|
c1c534 |
+ virCommandAddArg(cmd, "-chardev");
|
|
|
c1c534 |
+ virCommandAddArg(cmd, devstr);
|
|
|
c1c534 |
+ VIR_FREE(devstr);
|
|
|
c1c534 |
+
|
|
|
c1c534 |
+ if (qemuBuildChrDeviceCommandLine(cmd, def, console, qemuCaps) < 0)
|
|
|
c1c534 |
+ return -1;
|
|
|
c1c534 |
+ break;
|
|
|
c1c534 |
+
|
|
|
c1c534 |
case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_VIRTIO:
|
|
|
c1c534 |
if (!(devstr = qemuBuildChrChardevStr(logManager, cmd, cfg, def,
|
|
|
c1c534 |
console->source,
|
|
|
c1c534 |
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
|
|
|
c1c534 |
index a6900bf1ef..463c30c77a 100644
|
|
|
c1c534 |
--- a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
|
|
|
c1c534 |
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
|
|
|
c1c534 |
@@ -141,6 +141,7 @@
|
|
|
c1c534 |
<flag name='virtio-gpu.max_outputs'/>
|
|
|
c1c534 |
<flag name='vxhs'/>
|
|
|
c1c534 |
<flag name='virtio-blk.num-queues'/>
|
|
|
c1c534 |
+ <flag name='sclplmconsole'/>
|
|
|
c1c534 |
<flag name='disk-share-rw'/>
|
|
|
c1c534 |
<version>2010000</version>
|
|
|
c1c534 |
<kvmVersion>0</kvmVersion>
|
|
|
c1c534 |
diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
|
|
|
c1c534 |
index c5dfa2a9d0..c2f310cd46 100644
|
|
|
c1c534 |
--- a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
|
|
|
c1c534 |
+++ b/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
|
|
|
c1c534 |
@@ -135,6 +135,7 @@
|
|
|
c1c534 |
<flag name='chardev-reconnect'/>
|
|
|
c1c534 |
<flag name='virtio-gpu.max_outputs'/>
|
|
|
c1c534 |
<flag name='virtio-blk.num-queues'/>
|
|
|
c1c534 |
+ <flag name='sclplmconsole'/>
|
|
|
c1c534 |
<version>2007000</version>
|
|
|
c1c534 |
<kvmVersion>0</kvmVersion>
|
|
|
c1c534 |
<package></package>
|
|
|
c1c534 |
diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
|
|
|
c1c534 |
index 6d26896ef9..f6e024dc61 100644
|
|
|
c1c534 |
--- a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
|
|
|
c1c534 |
+++ b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
|
|
|
c1c534 |
@@ -137,6 +137,7 @@
|
|
|
c1c534 |
<flag name='chardev-reconnect'/>
|
|
|
c1c534 |
<flag name='virtio-gpu.max_outputs'/>
|
|
|
c1c534 |
<flag name='virtio-blk.num-queues'/>
|
|
|
c1c534 |
+ <flag name='sclplmconsole'/>
|
|
|
c1c534 |
<version>2007093</version>
|
|
|
c1c534 |
<kvmVersion>0</kvmVersion>
|
|
|
c1c534 |
<package></package>
|
|
|
c1c534 |
diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml
|
|
|
c1c534 |
index 4150b8eee7..5c4a02c8b1 100644
|
|
|
c1c534 |
--- a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml
|
|
|
c1c534 |
+++ b/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml
|
|
|
c1c534 |
@@ -138,6 +138,7 @@
|
|
|
c1c534 |
<flag name='chardev-reconnect'/>
|
|
|
c1c534 |
<flag name='virtio-gpu.max_outputs'/>
|
|
|
c1c534 |
<flag name='virtio-blk.num-queues'/>
|
|
|
c1c534 |
+ <flag name='sclplmconsole'/>
|
|
|
c1c534 |
<flag name='disk-share-rw'/>
|
|
|
c1c534 |
<version>2009000</version>
|
|
|
c1c534 |
<kvmVersion>0</kvmVersion>
|
|
|
c1c534 |
--
|
|
|
c1c534 |
2.15.1
|
|
|
c1c534 |
|