From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ttl7S-0008AE-5j for qemu-devel@nongnu.org; Fri, 11 Jan 2013 15:22:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ttl7P-0004ld-Hf for qemu-devel@nongnu.org; Fri, 11 Jan 2013 15:22:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50930) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ttl7P-0004lV-Ad for qemu-devel@nongnu.org; Fri, 11 Jan 2013 15:22:23 -0500 Date: Fri, 11 Jan 2013 18:22:04 -0200 From: Luiz Capitulino Message-ID: <20130111182204.019fe0d2@doriath.home> In-Reply-To: <50F03371.2000602@siemens.com> References: <1357911723-12688-1-git-send-email-wolfgang.mauerer@siemens.com> <50F02E67.4080804@suse.de> <50F03371.2000602@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] Realview/Versatile: Export LED state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wolfgang Mauerer Cc: Peter Maydell , armbru@redhat.com, "qemu-devel@nongnu.org" , "paul@codesourcery.com" , Andreas =?ISO-8859-1?B?RuRyYmVy?= , Aurelien Jarno On Fri, 11 Jan 2013 16:44:49 +0100 Wolfgang Mauerer wrote: > On 11/01/13 16:23, Andreas F=E4rber wrote: > > Am 11.01.2013 16:00, schrieb Peter Maydell: > >> On 11 January 2013 13:42, Wolfgang Mauerer wrote: > >>> The configuration register for the onboard LEDs is > >>> emulated, but the state is not exported, which makes > >>> the feature not particularly useful. Create a character > >>> device to make status changes accessible to the host. > >>> > >>> For example, use the command line argument > >>> > >>> -chardev socket,id=3Dleds,host=3Dlocalhost,port=3D12345,server,nowait > >>> > >>> to observe status changes via a socket. > >> > >> This isn't the only board we emulate which has LEDs. I'd > >> rather see this problem tackled with a general plan for "this > >> is how we handle LEDs in QEMU boards" rather than a > >> versatile board specific patch. > >=20 > > Hm, mips_malta.c does use a CharDriverState... just a more "structured" > > one using ASCII art. >=20 > that's one of the reaons why I used a character device to export the > status information. >=20 > However, a simple custom protocol (or maybe the same information in > JSON) seemed more appripriate since I assume that graphical frontends > will eventually visualise the LED status. Having to parse some ASCII > art output for this seems suboptimal. >=20 > Exporting a binary QOM property (as you suggested in another email) > might be an option, although I'm not really sure if LED status changes > should be communicated this way -- to me, using a chardev feels nicer. > Do the QMP maintainers have an opinion? I'm not completely sure I understand the problem here, but if this is some kind of status to be queried then exporting it through a QOM property seems the right thing to do. If you go for a custom protocol, then using QMP syntax might be a good idea, as you can use our infra and clients which already know QMP will also appreciate this (this is what qemu-ga did, btw).