From: Anthony Liguori <aliguori@linux.vnet.ibm.com>
To: Glauber Costa <glommer@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH v2 1/2] early set current_machine
Date: Thu, 03 Jun 2010 08:14:52 -0500 [thread overview]
Message-ID: <4C07AACC.2080202@linux.vnet.ibm.com> (raw)
In-Reply-To: <1275414976-18258-2-git-send-email-glommer@redhat.com>
On 06/01/2010 12:56 PM, Glauber Costa wrote:
> this way, the machine_init function itself can know which machine is current
> in use, not only the late init code.
>
While your touching it...
We only use current_machine in hw/device-hotplug.c. I think it would be
better to introduce an accessor function (get_current_machine()) and
then make this global static.
Regards,
Anthony Liguori
> Signed-off-by: Glauber Costa<glommer@redhat.com>
> ---
> vl.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/vl.c b/vl.c
> index 96838f8..7a8b20b 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -5824,6 +5824,9 @@ int main(int argc, char **argv, char **envp)
> if (machine->compat_props) {
> qdev_prop_register_compat(machine->compat_props);
> }
> +
> + current_machine = machine;
> +
> machine->init(ram_size, boot_devices,
> kernel_filename, kernel_cmdline, initrd_filename, cpu_model);
>
> @@ -5841,8 +5844,6 @@ int main(int argc, char **argv, char **envp)
> }
> }
>
> - current_machine = machine;
> -
> /* init USB devices */
> if (usb_enabled) {
> if (foreach_device_config(DEV_USB, usb_parse)< 0)
>
prev parent reply other threads:[~2010-06-03 13:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-01 17:56 [Qemu-devel] [PATCH v2 0/2] basic machine opts framework Glauber Costa
2010-06-01 17:56 ` [Qemu-devel] [PATCH v2 1/2] early set current_machine Glauber Costa
2010-06-01 17:56 ` [Qemu-devel] [PATCH v2 2/2] basic machine opts framework Glauber Costa
2010-06-02 7:15 ` [Qemu-devel] " Jan Kiszka
2010-06-02 14:06 ` Glauber Costa
2010-06-03 6:07 ` Jan Kiszka
2010-06-03 13:11 ` Anthony Liguori
2010-06-03 9:02 ` Paul Brook
2010-06-03 14:13 ` Anthony Liguori
2010-06-03 13:14 ` 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=4C07AACC.2080202@linux.vnet.ibm.com \
--to=aliguori@linux.vnet.ibm.com \
--cc=glommer@redhat.com \
--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 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).