From 9fa032866daae68357d99abc725c18fe9ed4b61b Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 11 Oct 2013 22:39:59 +0200 Subject: spice: fix multihead support This patch fixes spice display initialization to handle multihead properly. spice-core now keeps track of which QemuConsole has a spice display channel attached to it and which has not. It also manages display channel ids. spice-display looks at all QemuConsoles and will pick up any graphic console not yet bound to a spice channel (which in practice are all non-qxl graphic devices). Result is that (a) you'll get a spice client window for each graphical device now (first only without this patch), and (b) mixing qxl and non-qxl vga cards works properly. Signed-off-by: Gerd Hoffmann --- hw/display/qxl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'hw/display') diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 074ed43e27..c2cea1ce88 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -2037,8 +2037,7 @@ static int qxl_init_common(PCIQXLDevice *qxl) qxl->vram32_size < qxl->vram_size ? "[region 4]" : "[unmapped]"); qxl->ssd.qxl.base.sif = &qxl_interface.base; - qxl->ssd.qxl.id = qxl->id; - if (qemu_spice_add_interface(&qxl->ssd.qxl.base) != 0) { + if (qemu_spice_add_display_interface(&qxl->ssd.qxl, qxl->vga.con) != 0) { error_report("qxl interface %d.%d not supported by spice-server", SPICE_INTERFACE_QXL_MAJOR, SPICE_INTERFACE_QXL_MINOR); return -1; -- cgit v1.2.1