From: Anthony Liguori <aliguori@us.ibm.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
qemu-devel@nongnu.org, "Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH 0/5]: Improve machine type functions
Date: Fri, 24 Feb 2012 09:44:56 -0600 [thread overview]
Message-ID: <4F47B078.9070509@us.ibm.com> (raw)
In-Reply-To: <20120224132034.5573c4fc@doriath.home>
On 02/24/2012 09:20 AM, Luiz Capitulino wrote:
> On Fri, 24 Feb 2012 08:58:55 -0600
> Anthony Liguori<aliguori@us.ibm.com> wrote:
>
>> On 02/24/2012 08:13 AM, Luiz Capitulino wrote:
>>> I was reading some related code yesterday and couldn't resist improving this.
>>> Not sure if this is aligned with any possible QOM work in this area, but I'm
>>> posting this anyway...
>>
>> I'm not sure how easy this is, but the way to do this with QOM would be:
>
> This seems like a cool thing to work on. The two major problems (for me at least)
> is testing and the possible huge amount of manual work,
Heh, I wouldn't quite call it huge :-)
I think you can pretty easily sed the machine init function definitions to
accept a Machine parameter as the first argument.
I think to introduce the types, you would need to write a quick python script
that parsed the QEMUMachine declarations and then converted that into a TypeInfo
+ class_init function.
I wouldn't bother trying to make the code conversion script perfect. I've found
it's easiest to convert the easy 90% automatically and then do the remaining 10%
by hand.
or do you think that
> most of the work can be automated?
>
> The problem with testing is that, we have a whole lot of machines I have no idea
> what's the best way of testing the conversion work.
Since the conversion shouldn't change any logic, there shouldn't be a huge test
burden. What I've done in the past is just write a little script that parses
the output of -M ? and then walks through and executes qemu with no arguments
other than -M $name. It's a bit tedious since you have to manually close the
window but it's a relatively quick way to check each machine is behaving the
same as it was before.
Regards,
Anthony Liguori
>
> [...]
>
>> That's not to say this series isn't a good cleanup. I haven't actually reviewed
>> it yet. I just wanted to illustrate the next QOM steps.
>
> Ok. I honestly think that this series is a small first step. Even the QTAILQ
> conversion is worth it IMHO, because it clearly shows what the function is doing
> in a single line.
>
prev parent reply other threads:[~2012-02-24 15:45 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-24 14:13 [Qemu-devel] [PATCH 0/5]: Improve machine type functions Luiz Capitulino
2012-02-24 14:13 ` [Qemu-devel] [PATCH 1/5] boards: qemu_register_machine(): return void Luiz Capitulino
2012-02-24 14:17 ` Andreas Färber
2012-02-24 14:13 ` [Qemu-devel] [PATCH 2/5] boards: rename machine type functions Luiz Capitulino
2012-02-24 16:12 ` Peter Maydell
2012-02-24 16:15 ` Anthony Liguori
2012-02-24 16:51 ` Luiz Capitulino
2012-02-24 16:57 ` Anthony Liguori
2012-02-24 14:13 ` [Qemu-devel] [PATCH 3/5] boards: introduce machine_print_all() Luiz Capitulino
2012-02-24 14:26 ` Andreas Färber
2012-02-24 14:57 ` Luiz Capitulino
2012-02-24 14:13 ` [Qemu-devel] [PATCH 4/5] boards: switch machine type list to QTAILQ Luiz Capitulino
2012-02-24 14:23 ` Andreas Färber
2012-02-24 14:56 ` Luiz Capitulino
2012-02-24 15:21 ` Andreas Färber
2012-02-24 15:23 ` Luiz Capitulino
2012-02-24 14:13 ` [Qemu-devel] [PATCH 5/5] boards: move all machine type functions to boards.c Luiz Capitulino
2012-02-24 15:10 ` Andreas Färber
2012-02-24 15:22 ` Luiz Capitulino
2012-02-24 14:58 ` [Qemu-devel] [PATCH 0/5]: Improve machine type functions Anthony Liguori
2012-02-24 15:20 ` Luiz Capitulino
2012-02-24 15:44 ` Anthony Liguori [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=4F47B078.9070509@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=afaerber@suse.de \
--cc=lcapitulino@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.