From patchwork Sun Mar 4 20:32:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 144530 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 39085B6FA1 for ; Mon, 5 Mar 2012 07:33:00 +1100 (EST) Received: from localhost ([::1]:48508 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4I70-0006r3-0w for incoming@patchwork.ozlabs.org; Sun, 04 Mar 2012 15:32:58 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55343) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4I6o-0006nC-GZ for qemu-devel@nongnu.org; Sun, 04 Mar 2012 15:32:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4I6l-0006MY-J8 for qemu-devel@nongnu.org; Sun, 04 Mar 2012 15:32:46 -0500 Received: from cantor2.suse.de ([195.135.220.15]:40935 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4I6l-0006MG-CS for qemu-devel@nongnu.org; Sun, 04 Mar 2012 15:32:43 -0500 Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 3E1B689471; Sun, 4 Mar 2012 21:32:42 +0100 (CET) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Sun, 4 Mar 2012 21:32:35 +0100 Message-Id: <1330893156-26569-3-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1330893156-26569-1-git-send-email-afaerber@suse.de> References: <1330893156-26569-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , anthony@codemonkey.ws, lcapitulino@redhat.com Subject: [Qemu-devel] [PATCH v4 2/3] qom: Register QOM infrastructure early X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The constructors for QOM TYPE_INTERFACE were executed rather late in vl.c's main(). Call them very early so that QOM can safely be used for machines and CPUs. Signed-off-by: Andreas Färber Cc: Anthony Liguori --- vl.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index 97ab2b9..3fb9182 100644 --- a/vl.c +++ b/vl.c @@ -2299,6 +2299,8 @@ int main(int argc, char **argv, char **envp) #endif } + module_call_init(MODULE_INIT_QOM); + runstate_init(); init_clocks(); @@ -3460,8 +3462,6 @@ int main(int argc, char **argv, char **envp) if (foreach_device_config(DEV_DEBUGCON, debugcon_parse) < 0) exit(1); - module_call_init(MODULE_INIT_QOM); - /* must be after qdev registration but before machine init */ if (vga_model) { select_vgahw(vga_model);