On Wed, Jun 14, 2017 at 03:56:15PM +0200, Martin Kletzander wrote:
When added in multiple previous commits, it was used only with
-device
qxl(-vga), but for some QEMUs (< 1.6) we need to add this
functionality when using -vga qxl as well.
Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=1283207
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/qemu/qemu_command.c | 8 ++++
.../qemuxml2argv-video-vga-qxl-heads.args | 30 ++++++++++++++
.../qemuxml2argv-video-vga-qxl-heads.xml | 47 ++++++++++++++++++++++
tests/qemuxml2argvtest.c | 3 ++
4 files changed, 88 insertions(+)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-vga-qxl-heads.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-vga-qxl-heads.xml
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 3e1552a1b593..9687d367a6d4 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -4613,6 +4613,14 @@ qemuBuildVgaVideoCommand(virCommandPtr cmd,
virCommandAddArgFormat(cmd, "%s.vgamem_mb=%u",
dev, vgamem / 1024);
}
+
+ if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_QXL_MAX_OUTPUTS))
+ video->heads = 0;
I would expect a qemuBuild.*Command function to build the command line,
not alter the domain definition.
Also, this goes against commit ef11e770
qemu_command: don't modify heads for graphics device
Jan