Received: from eggs.gnu.org ([2001:4830:134:3::10]:59718) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zd1Un-0004LM-M3 for qemu-devel@nongnu.org; Fri, 18 Sep 2015 15:38:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zd1Ui-00026b-SJ for qemu-devel@nongnu.org; Fri, 18 Sep 2015 15:38:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zd1Ui-00026S-Ne for qemu-devel@nongnu.org; Fri, 18 Sep 2015 15:38:52 -0400 From: Eduardo Habkost Date: Fri, 18 Sep 2015 16:38:12 -0300 Message-Id: <1442605096-14103-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH v2 0/4] target-i386: Remove side-effects from X86CPU::instance_init List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: zhugh.fnst@cn.fujitsu.com, tangchen@cn.fujitsu.com, chen.fan.fnst@cn.fujitsu.com, isimatu.yasuaki@jp.fujitsu.com, Paolo Bonzini , Gu Zheng , Igor Mammedov , anshul.makkar@profitbricks.com, =?UTF-8?q?Andreas=20F=C3=A4rber?= To allow new code to ask the CPU classes for CPU model information and allow QOM properties to be queried by qmp_device_list_properties(), we need to be able to safely instantiate a X86CPU object without any side-effects. This series moves some code from x86_cpu_initfn() to x86_cpu_realizefn(), so that QEMU global state is affected only if the CPU object is realized. This series is based on my x86 tree, located at: https://github.com/ehabkost/qemu.git x86 Changes v1 -> v2: * New patch: Move TCG initialization check to tcg_x86_init() * Call cpu_exec_init() after basic parameter validation on realizefn * Move tcg_x86_init() call after basic parameter validation inside realizefn Eduardo Habkost (4): target-i386: Rename optimize_flags_init() target-i386: Move TCG initialization check to tcg_x86_init() target-i386: Move TCG initialization to realize time target-i386: Call cpu_exec_init() on realize target-i386/cpu.c | 14 ++++++-------- target-i386/cpu.h | 2 +- target-i386/translate.c | 8 +++++++- 3 files changed, 14 insertions(+), 10 deletions(-) -- 2.1.0