From: armbru@redhat.com
To: qemu-devel@nongnu.org
Cc: ehabkost@redhat.com, mst@redhat.com, aliguori@amazon.com,
pbonzini@redhat.com, lersek@redhat.com, afaerber@suse.de
Subject: [Qemu-devel] [PATCH v3 1/2] hw: Pass QEMUMachine to its init() method
Date: Wed, 30 Oct 2013 13:56:39 +0100 [thread overview]
Message-ID: <1383137800-2990-2-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1383137800-2990-1-git-send-email-armbru@redhat.com>
From: Markus Armbruster <armbru@redhat.com>
Put it in QEMUMachineInitArgs, so I don't have to touch every board.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
include/hw/boards.h | 7 +++++--
vl.c | 3 ++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 5a7ae9f..2151460 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -6,7 +6,10 @@
#include "sysemu/blockdev.h"
#include "hw/qdev.h"
+typedef struct QEMUMachine QEMUMachine;
+
typedef struct QEMUMachineInitArgs {
+ const QEMUMachine *machine;
ram_addr_t ram_size;
const char *boot_order;
const char *kernel_filename;
@@ -21,7 +24,7 @@ typedef void QEMUMachineResetFunc(void);
typedef void QEMUMachineHotAddCPUFunc(const int64_t id, Error **errp);
-typedef struct QEMUMachine {
+struct QEMUMachine {
const char *name;
const char *alias;
const char *desc;
@@ -43,7 +46,7 @@ typedef struct QEMUMachine {
GlobalProperty *compat_props;
struct QEMUMachine *next;
const char *hw_version;
-} QEMUMachine;
+};
int qemu_register_machine(QEMUMachine *m);
QEMUMachine *find_default_machine(void);
diff --git a/vl.c b/vl.c
index b42ac67..63338e4 100644
--- a/vl.c
+++ b/vl.c
@@ -4236,7 +4236,8 @@ int main(int argc, char **argv, char **envp)
qdev_machine_init();
- QEMUMachineInitArgs args = { .ram_size = ram_size,
+ QEMUMachineInitArgs args = { .machine = machine,
+ .ram_size = ram_size,
.boot_order = boot_order,
.kernel_filename = kernel_filename,
.kernel_cmdline = kernel_cmdline,
--
1.8.1.4
next prev parent reply other threads:[~2013-10-30 12:56 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-30 12:56 [Qemu-devel] [PATCH v3 0/2] smbios nicer defaults for DMI type 1 (System) armbru
2013-10-30 12:56 ` armbru [this message]
2013-10-30 13:13 ` [Qemu-devel] [PATCH v3 1/2] hw: Pass QEMUMachine to its init() method Eduardo Habkost
2013-10-30 13:38 ` Andreas Färber
2013-10-31 6:17 ` Michael S. Tsirkin
2013-10-30 12:56 ` [Qemu-devel] [PATCH v3 2/2] smbios: Set system manufacturer, product & version by default armbru
2013-10-30 13:19 ` Eduardo Habkost
2013-10-30 14:18 ` Michael S. Tsirkin
2013-10-30 14:29 ` Eduardo Habkost
2013-10-30 14:48 ` Michael S. Tsirkin
2013-10-30 15:18 ` Markus Armbruster
2013-10-30 19:17 ` Michael S. Tsirkin
2013-10-30 20:22 ` Markus Armbruster
2013-10-30 23:01 ` Michael S. Tsirkin
2013-10-31 5:30 ` Markus Armbruster
2013-10-31 9:00 ` Eduardo Habkost
2013-10-30 14:48 ` Markus Armbruster
2013-10-30 19:12 ` Michael S. Tsirkin
2013-10-31 5:54 ` Markus Armbruster
2013-10-31 6:17 ` Michael S. Tsirkin
2013-10-30 14:20 ` [Qemu-devel] [PATCH v3 0/2] smbios nicer defaults for DMI type 1 (System) Michael S. Tsirkin
2013-10-31 5:51 ` [Qemu-devel] [PATCH v3 3/2] smbios: Decouple system product from QEMUMachine Markus Armbruster
2013-10-31 6:16 ` Michael S. Tsirkin
2013-10-31 8:20 ` Eduardo Habkost
2013-11-04 13:40 ` [Qemu-devel] [PATCH v3 0/2] smbios nicer defaults for DMI type 1 (System) Michael S. Tsirkin
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=1383137800-2990-2-git-send-email-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=afaerber@suse.de \
--cc=aliguori@amazon.com \
--cc=ehabkost@redhat.com \
--cc=lersek@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@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).