qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: "Andreas Färber" <afaerber@suse.de>
Subject: [Qemu-devel] [PATCH RFC v2 3/8] qom: Add QOM support to user emulators
Date: Wed,  1 Feb 2012 13:57:20 +0100	[thread overview]
Message-ID: <1328101045-10717-4-git-send-email-afaerber@suse.de> (raw)
In-Reply-To: <1328101045-10717-1-git-send-email-afaerber@suse.de>

Link the Object base class and the module infrastructure for class
registration. Call QOM module init.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Cc: Anthony Liguori <anthony@codemonkey.ws>
---
 Makefile.target    |    6 ++++++
 Makefile.user      |    1 +
 bsd-user/main.c    |    2 ++
 darwin-user/main.c |    3 +++
 linux-user/main.c  |    2 ++
 5 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 68481a3..d1b7867 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -129,6 +129,8 @@ obj-m68k-y += m68k-sim.o m68k-semi.o
 
 $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
 
+obj-y += module.o
+obj-y += $(addprefix ../qom/, $(qom-y))
 obj-y += $(addprefix ../libuser/, $(user-obj-y))
 obj-y += $(addprefix ../libdis-user/, $(libdis-y))
 obj-y += $(libobj-y)
@@ -156,6 +158,8 @@ obj-i386-y += ioport-user.o
 
 $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
 
+obj-y += module.o
+obj-y += $(addprefix ../qom/, $(qom-y))
 obj-y += $(addprefix ../libuser/, $(user-obj-y))
 obj-y += $(addprefix ../libdis-user/, $(libdis-y))
 obj-y += $(libobj-y)
@@ -178,6 +182,8 @@ obj-i386-y += ioport-user.o
 
 $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
 
+obj-y += module.o
+obj-y += $(addprefix ../qom/, $(qom-y))
 obj-y += $(addprefix ../libuser/, $(user-obj-y))
 obj-y += $(addprefix ../libdis-user/, $(libdis-y))
 obj-y += $(libobj-y)
diff --git a/Makefile.user b/Makefile.user
index 2b1e4d1..72d01c1 100644
--- a/Makefile.user
+++ b/Makefile.user
@@ -9,6 +9,7 @@ include $(SRC_PATH)/rules.mak
 $(call set-vpath, $(SRC_PATH))
 
 QEMU_CFLAGS+=-I..
+QEMU_CFLAGS+=-I$(SRC_PATH)/include
 
 include $(SRC_PATH)/Makefile.objs
 
diff --git a/bsd-user/main.c b/bsd-user/main.c
index cc7d4a3..cdb0d0a 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -748,6 +748,8 @@ int main(int argc, char **argv)
     if (argc <= 1)
         usage();
 
+    module_call_init(MODULE_INIT_QOM);
+
     if ((envlist = envlist_create()) == NULL) {
         (void) fprintf(stderr, "Unable to allocate envlist\n");
         exit(1);
diff --git a/darwin-user/main.c b/darwin-user/main.c
index 9b57c20..e1519c7 100644
--- a/darwin-user/main.c
+++ b/darwin-user/main.c
@@ -28,6 +28,7 @@
 #include <sys/mman.h>
 
 #include "qemu.h"
+#include "qemu-common.h"
 
 #define DEBUG_LOGFILE "/tmp/qemu.log"
 
@@ -749,6 +750,8 @@ int main(int argc, char **argv)
     if (argc <= 1)
         usage();
 
+    module_call_init(MODULE_INIT_QOM);
+
     optind = 1;
     for(;;) {
         if (optind >= argc)
diff --git a/linux-user/main.c b/linux-user/main.c
index 64d2208..f55109c 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -3278,6 +3278,8 @@ int main(int argc, char **argv, char **envp)
     int i;
     int ret;
 
+    module_call_init(MODULE_INIT_QOM);
+
     qemu_cache_utils_init(envp);
 
     if ((envlist = envlist_create()) == NULL) {
-- 
1.7.7

  parent reply	other threads:[~2012-02-01 13:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-01 12:57 [Qemu-devel] [PATCH RFC v2 0/8] Introduce QOM CPU and use for ARM Andreas Färber
2012-02-01 12:57 ` [Qemu-devel] [PATCH RFC v2 1/8] qom: Allow object_class_foreach() to take additional parameters to refine search Andreas Färber
2012-02-01 12:57 ` [Qemu-devel] [PATCH RFC v2 2/8] qom: Register QOM infrastructure early Andreas Färber
2012-02-01 12:57 ` Andreas Färber [this message]
2012-02-01 12:57 ` [Qemu-devel] [PATCH RFC v2 4/8] qom: Introduce CPU class Andreas Färber
2012-02-01 22:25   ` Peter Maydell
2012-02-01 12:57 ` [Qemu-devel] [PATCH RFC v2 5/8] target-arm: Introduce QOM CPU and use it for CPUID lookup Andreas Färber
2012-02-01 16:16   ` Andreas Färber
2012-02-01 12:57 ` [Qemu-devel] [PATCH RFC v2 6/8] target-arm: Embed CPUARMState in QOM ARMCPU Andreas Färber
2012-02-01 12:57 ` [Qemu-devel] [PATCH RFC v2 7/8] target-arm: Prepare model-specific class_init function Andreas Färber
2012-02-01 12:57 ` [Qemu-devel] [PATCH RFC v2 8/8] target-arm: Move CPU feature flags out of CPUState Andreas Färber

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=1328101045-10717-4-git-send-email-afaerber@suse.de \
    --to=afaerber@suse.de \
    --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).