From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6pSb-0005CQ-01 for qemu-devel@nongnu.org; Wed, 29 Aug 2012 17:06:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T6pSZ-000375-UR for qemu-devel@nongnu.org; Wed, 29 Aug 2012 17:06:00 -0400 Received: from smtp.nfit.au.dk ([130.225.17.180]:60867 helo=nysmtp.nfit.au.dk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6pSZ-00033a-MP for qemu-devel@nongnu.org; Wed, 29 Aug 2012 17:05:59 -0400 From: sandmann@cs.au.dk (=?utf-8?Q?S=C3=B8ren?= Sandmann) References: <1346088041-17062-1-git-send-email-sandmann@cs.au.dk> <1346088041-17062-2-git-send-email-sandmann@cs.au.dk> <503C621D.80805@redhat.com> <503DAFEF.4040701@redhat.com> Date: Wed, 29 Aug 2012 23:05:57 +0200 In-Reply-To: <503DAFEF.4040701@redhat.com> (Gerd Hoffmann's message of "Wed, 29 Aug 2012 08:00:15 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] Add new client_present and client capabilities fields to QXLRom List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org, spice-devel@freedesktop.org, =?utf-8?Q?S?= =?utf-8?Q?=C3=B8ren?= Sandmann Pedersen Gerd Hoffmann writes: >> I don't know of a good way to deal with the situation where the new >> client is unable to handle existing surfaces. > > We need a sensible solution here. If we can't handle capability > downgrade at runtime the capability negotiation between guest and client > doesn't make sense in the first place. > > Failing that we can add a a8 switch to qxl. When enabled qemu asks > spice-server to enable a8, which in turn will raise the display channel > minor version, basically requiring an updated spice client to connect. > With a8 disabled old clients can connect too. I think the same scheme as for commands could be used: - When a new client connects, if it doesn't understand a8, then the server won't send it any a8 surfaces. - The guest driver is expected to not refer to any such surfaces once it sees the change in capability bits, and may want to delete them. The race condition is handled by the server processing all commands after changing the capability bits, but before forwarding any commands to the new client. If I don't hear any objections to the above, I'll update the patches as follows: - When a new client connects, the capability bits are changed, followed by a processing of all commands in the ring. At this point new commands may be forwarded. - Add ifdefs to allow qemu to compile against older versions of spice. - Use 4 for the PCI revision instead of 5 I'll drop the NUM_SURFACES change for now. The guest driver probably need the ability to swap pixmaps in and out of video memory in any case, since X clients sometimes leak pixmaps and since no fixed number of surfaces is likely to be enough for all cases. S=C3=B8ren