From: Luiz Capitulino <lcapitulino@redhat.com>
To: Wolfgang Mauerer <wolfgang.mauerer@siemens.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
armbru@redhat.com,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"paul@codesourcery.com" <paul@codesourcery.com>,
"Andreas Färber" <afaerber@suse.de>,
"Aurelien Jarno" <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [PATCH] Realview/Versatile: Export LED state
Date: Fri, 11 Jan 2013 18:22:04 -0200 [thread overview]
Message-ID: <20130111182204.019fe0d2@doriath.home> (raw)
In-Reply-To: <50F03371.2000602@siemens.com>
On Fri, 11 Jan 2013 16:44:49 +0100
Wolfgang Mauerer <wolfgang.mauerer@siemens.com> wrote:
> On 11/01/13 16:23, Andreas Färber wrote:
> > Am 11.01.2013 16:00, schrieb Peter Maydell:
> >> On 11 January 2013 13:42, Wolfgang Mauerer <wolfgang.mauerer@siemens.com> 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=leds,host=localhost,port=12345,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.
> >
> > Hm, mips_malta.c does use a CharDriverState... just a more "structured"
> > one using ASCII art.
>
> that's one of the reaons why I used a character device to export the
> status information.
>
> 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.
>
> 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).
prev parent reply other threads:[~2013-01-11 20:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-11 13:42 [Qemu-devel] [PATCH] Realview/Versatile: Export LED state Wolfgang Mauerer
2013-01-11 14:58 ` Andreas Färber
2013-01-11 15:46 ` Wolfgang Mauerer
2013-01-11 15:00 ` Peter Maydell
2013-01-11 15:23 ` Andreas Färber
2013-01-11 15:44 ` Wolfgang Mauerer
2013-01-11 20:22 ` Luiz Capitulino [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130111182204.019fe0d2@doriath.home \
--to=lcapitulino@redhat.com \
--cc=afaerber@suse.de \
--cc=armbru@redhat.com \
--cc=aurelien@aurel32.net \
--cc=paul@codesourcery.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=wolfgang.mauerer@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).