From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWOou-0004kg-8M for qemu-devel@nongnu.org; Mon, 21 May 2012 05:22:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWOon-0002Lt-UQ for qemu-devel@nongnu.org; Mon, 21 May 2012 05:22:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36167) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWOon-0002LG-MD for qemu-devel@nongnu.org; Mon, 21 May 2012 05:22:21 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q4L9MJuF030631 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 21 May 2012 05:22:20 -0400 Message-ID: <4FBA0948.60002@redhat.com> Date: Mon, 21 May 2012 11:22:16 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1337591088-18667-1-git-send-email-alevy@redhat.com> <1337591088-18667-2-git-send-email-alevy@redhat.com> In-Reply-To: <1337591088-18667-2-git-send-email-alevy@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC 2/2] hmp/qxl: info spice: add qxl0_mode & qxl0_guest_bug List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alon Levy Cc: qemu-devel@nongnu.org Hi, > + if (info->qxl0_guest_bug != -1 && info->qxl0_mode != -1) { > + monitor_printf(mon, " qxl0\n"); > + monitor_printf(mon, " guest_bug: %"PRIu64"d\n", info->qxl0_guest_bug); > + monitor_printf(mon, " mode: %s\n", > + SpiceQueryQXLMode_lookup[info->qxl0_mode]); > + } Anything else we might want export while being at it? For example whenever guest drivers use sync or async io commands? What about secondary displays? > +/* helpers for spice_info. only show first device */ > +int qxl0_guest_bug(void) > +{ > + if (!qxl0) { > + return -1; > + } > + return qxl0->guest_bug; > +} > + > +int qxl0_mode(void) > +{ > + if (!qxl0) { > + return -1; > + } > + return qxl0->mode; > +} Hmm, that is a bit hackish. qxl0 exists only for the reason that displaychangelisteners don't support passing through a opaque pointer (or other way to get the state). I'd prefer to get rid of it, not add more uses, although I can see that it is convenient ... cheers, Gerd