Received: from eggs.gnu.org ([208.118.235.92]:43008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6Wbr-0003qy-5l for qemu-devel@nongnu.org; Tue, 28 Aug 2012 20:58:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T6Wbq-0002M9-35 for qemu-devel@nongnu.org; Tue, 28 Aug 2012 20:58:19 -0400 Received: from smtp.nfit.au.dk ([130.225.17.180]:44519 helo=nysmtp.nfit.au.dk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6Wbp-0002Ls-RX for qemu-devel@nongnu.org; Tue, 28 Aug 2012 20:58:18 -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> Date: Wed, 29 Aug 2012 02:58:14 +0200 In-Reply-To: <503C621D.80805@redhat.com> (Gerd Hoffmann's message of "Tue, 28 Aug 2012 08:15:57 +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: > On 08/27/12 19:20, S=C3=B8ren Sandmann Pedersen wrote: >> From: S=C3=B8ren Sandmann Pedersen >>=20 >> The client_present field is a byte that is set of non-zero when a >> client is connected and to zero when no client is connected. >>=20 >> The client_capabilities[58] array contains 464 bits that indicate the >> capabilities of the client. > > What is supposed to happen in case multiple clients are connected? Is this case supported at all? If it is, I'd say that the guest should not be aware of it and the bits advertise should be interpreted as "these are the capabilities that spice-server will marshall on to the clients that are connected". Presumably spice-server would then set the bit vector to the intersection of all the clients. > How do you handle the race conditions, especially on capability > downgrade? There might be not-yet processed commands in the command > queue which the client is unable to handle, or existing surfaces using > formats the client doesn't understand ... Good question.=20 I don't know of a good way to deal with the situation where the new client is unable to handle existing surfaces. I suppose in principle spice-server could emulate their existence, sending them as images, but I'm not familiar enough with spice-server to say whether that is feasible. For commands, would it work for spice-server to just process everything in the command ring after changing the capability bits (ie., in possibly brief moment before a new client connects)? It seems that would be a good thing to do even without capability bits. S=C3=B8ren