[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] qemu: Pass the number of heads even with -vga qxl



On Wed, Jun 14, 2017 at 04:48:10PM +0200, Ján Tomko wrote:
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 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


I, actually think that patch should've not made it in, but I must've
missed that it was posted.  The setting merely updates the XML so that
it is visible whether or not the setting was applied.  It then also
works when migrating to a newer qemu, so that it doesn't reset the
limitation.  But I'll leave this to other time and will post a v2
without that.

Jan

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]