From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBM66-0007CA-H9 for qemu-devel@nongnu.org; Tue, 11 Sep 2012 04:45:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TBM61-0007BB-WA for qemu-devel@nongnu.org; Tue, 11 Sep 2012 04:45:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBM61-0007B6-NQ for qemu-devel@nongnu.org; Tue, 11 Sep 2012 04:45:25 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8B8jO19027118 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 11 Sep 2012 04:45:24 -0400 Message-ID: <504EFA22.2060906@redhat.com> Date: Tue, 11 Sep 2012 10:45:22 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1347346570-2469-1-git-send-email-alevy@redhat.com> <1347346570-2469-3-git-send-email-alevy@redhat.com> In-Reply-To: <1347346570-2469-3-git-send-email-alevy@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/3] hw/qxl: support client monitor configuration via device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alon Levy Cc: qemu-devel@nongnu.org On 09/11/12 08:56, Alon Levy wrote: > Until now we used only the agent to change the monitor count and each > monitor resolution. This patch introduces the qemu part of using the > device as the mediator instead of the agent via virtio-serial. > > Spice (>=0.11.5) calls the new QXLInterface::client_monitors_config, > generating an interrupt QXL_INTERRUPT_CLIENT_MONITORS_CONFIG which the > client indicates handling of (after reading from > QXLRom::client_monitors_config) by QXL_IO_CLIENT_MONITORS_CONFIG_DONE. I don't think an explicit handshake via QXL_IO_CLIENT_MONITORS_CONFIG_DONE is a good idea. How about this update protocol: qemu: (1) set QXLRom::client_monitors_config_updating (2) fill QXLRom::client_monitors_config (3) raise QXL_INTERRUPT_CLIENT_MONITORS_CONFIG (4) clear QXLRom::client_monitors_config_updating guest: (1) clear QXL_INTERRUPT_CLIENT_MONITORS_CONFIG bit in irq status (2) wait until QXLRom::client_monitors_config_updating is clear (3) parse QXLRom::client_monitors_config (4) check QXL_INTERRUPT_CLIENT_MONITORS_CONFIG bit in irq status (a) when set, goto (1). (b) when clear we are done. While thinking about it: I think we also don't need the guest capabilities. With the handshake gone we can update QXLRom::client_monitors_config unconditionally. We might want to notify spice-server when the guest flips the QXL_INTERRUPT_CLIENT_MONITORS_CONFIG bit in the irq mask, so we can route the event accordingly. Or we just route it unconditionally both ways and let the guest sort it (i.e. make vdagent ignore monitors config when the qxl kms driver is active). cheers, Gerd