Received: from eggs.gnu.org ([208.118.235.92]:52474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T62xP-0000g4-2U for qemu-devel@nongnu.org; Mon, 27 Aug 2012 13:18:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T62xM-00085W-W3 for qemu-devel@nongnu.org; Mon, 27 Aug 2012 13:18:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59269) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T62xM-00085H-N6 for qemu-devel@nongnu.org; Mon, 27 Aug 2012 13:18:32 -0400 From: =?UTF-8?q?S=C3=B8ren=20Sandmann=20Pedersen?= Date: Mon, 27 Aug 2012 13:20:38 -0400 Message-Id: <1346088041-17062-2-git-send-email-sandmann@cs.au.dk> In-Reply-To: <1346088041-17062-1-git-send-email-sandmann@cs.au.dk> References: <1346088041-17062-1-git-send-email-sandmann@cs.au.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [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: spice-devel@freedesktop.org, qemu-devel@nongnu.org Cc: kraxel@redhat.com, =?UTF-8?q?S=C3=B8ren=20Sandmann=20Pedersen?= From: S=C3=B8ren Sandmann Pedersen 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. The client_capabilities[58] array contains 464 bits that indicate the capabilities of the client. Each bit corresponds to a SPICE_DISPLAY_CAP_* capability. In particular, if the client has capability C, then bit (C % 8) in byte (C / 8) is set. The capability bits only have a defined meaning when a client is connected, ie., when client_present is non-zero. The number 58 was chosen to fill out a cache line in QXLRom. A new QXL_INTERRUPT_CLIENT interrupt is defined, which will be raised whenever a client connects or disconnects. Finally, add a new QXL_REVISION_STABLE_V13 =3D 0x05 constant to indicate the presence of these new features. --- spice/qxl_dev.h | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h index 1292767..a19cc67 100644 --- a/spice/qxl_dev.h +++ b/spice/qxl_dev.h @@ -49,6 +49,7 @@ enum { QXL_REVISION_STABLE_V06=3D0x02, QXL_REVISION_STABLE_V10=3D0x03, QXL_REVISION_STABLE_V12=3D0x04, + QXL_REVISION_STABLE_V13=3D0x05, }; =20 #define QXL_DEVICE_ID_DEVEL 0x01ff @@ -148,7 +149,9 @@ typedef struct SPICE_ATTR_PACKED QXLRom { uint8_t slot_gen_bits; uint8_t slot_id_bits; uint8_t slot_generation; - uint8_t padding[3]; /* Padding to 32bit align */ + /* appended for qxl-5 */ + uint8_t client_present; + uint8_t client_capabilities[58]; } QXLRom; =20 /* qxl-1 compat: fixed */ @@ -231,6 +234,7 @@ SPICE_RING_DECLARE(QXLReleaseRing, uint64_t, QXL_RELE= ASE_RING_SIZE); #define QXL_INTERRUPT_CURSOR (1 << 1) #define QXL_INTERRUPT_IO_CMD (1 << 2) #define QXL_INTERRUPT_ERROR (1 << 3) +#define QXL_INTERRUPT_CLIENT (1 << 4) =20 /* qxl-1 compat: append only */ typedef struct SPICE_ATTR_PACKED QXLRam { --=20 1.7.4