From patchwork Wed Oct 7 03:52:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Hongyang X-Patchwork-Id: 527092 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 91206140D72 for ; Wed, 7 Oct 2015 14:53:29 +1100 (AEDT) Received: from localhost ([::1]:55078 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjfnD-0006hF-G5 for incoming@patchwork.ozlabs.org; Tue, 06 Oct 2015 23:53:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40775) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zjfmh-0005r5-7A for qemu-devel@nongnu.org; Tue, 06 Oct 2015 23:52:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zjfmd-0003u7-WE for qemu-devel@nongnu.org; Tue, 06 Oct 2015 23:52:55 -0400 Received: from [59.151.112.132] (port=2781 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zjfmd-0003tb-Gk for qemu-devel@nongnu.org; Tue, 06 Oct 2015 23:52:51 -0400 X-IronPort-AV: E=Sophos;i="5.15,520,1432569600"; d="scan'208";a="101428743" Received: from unknown (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 07 Oct 2015 11:55:21 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id t973qOaW023482; Wed, 7 Oct 2015 11:52:24 +0800 Received: from localhost (10.167.226.223) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.181.6; Wed, 7 Oct 2015 11:52:48 +0800 From: Yang Hongyang To: Date: Wed, 7 Oct 2015 11:52:13 +0800 Message-ID: <1444189942-21787-2-git-send-email-yanghy@cn.fujitsu.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1444189942-21787-1-git-send-email-yanghy@cn.fujitsu.com> References: <1444189942-21787-1-git-send-email-yanghy@cn.fujitsu.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 59.151.112.132 Cc: thuth@redhat.com, zhang.zhanghailiang@huawei.com, lizhijian@cn.fujitsu.com, jasowang@redhat.com, armbru@redhat.com, stefanha@redhat.com, Yang Hongyang Subject: [Qemu-devel] [PATCH v13 01/10] vl.c: init delayed object after net_init_clients 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 Init delayed object after net_init_clients, because netfilters need to be initialized after net clients initialized. Signed-off-by: Yang Hongyang --- vl.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/vl.c b/vl.c index f2bd8d2..366f38f 100644 --- a/vl.c +++ b/vl.c @@ -2767,6 +2767,7 @@ static bool object_create_initial(const char *type) if (g_str_equal(type, "rng-egd")) { return false; } + /* TODO: implement netfilters */ return true; } @@ -4286,12 +4287,6 @@ int main(int argc, char **argv, char **envp) exit(0); } - if (qemu_opts_foreach(qemu_find_opts("object"), - object_create, - object_create_delayed, NULL)) { - exit(1); - } - machine_opts = qemu_get_machine_opts(); if (qemu_opt_foreach(machine_opts, machine_set_property, current_machine, NULL)) { @@ -4397,6 +4392,12 @@ int main(int argc, char **argv, char **envp) exit(1); } + if (qemu_opts_foreach(qemu_find_opts("object"), + object_create, + object_create_delayed, NULL)) { + exit(1); + } + #ifdef CONFIG_TPM if (tpm_init() < 0) { exit(1);