From nobody Sat Oct 25 23:37:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 151620427270221.213965426808272; Wed, 17 Jan 2018 07:51:12 -0800 (PST) Received: from localhost ([::1]:44194 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpza-0000hw-LB for importer@patchew.org; Wed, 17 Jan 2018 10:51:10 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpuF-00056d-M8 for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpuE-0008Aa-Rc for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57254) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebpu4-0007wQ-DX; Wed, 17 Jan 2018 10:45:28 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 47FCE76540; Wed, 17 Jan 2018 15:45:22 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 735E74A9; Wed, 17 Jan 2018 15:45:20 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 16:43:13 +0100 Message-Id: <1516203816-19374-2-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 17 Jan 2018 15:45:22 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 01/24] arm: cpu: add TARGET_DEFAULT_CPU_TYPE macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Andrew Jones , Riku Voipio , Laurent Vivier , qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" it will be used for for 2 purposes, 1st is to provide to cpu name resolving class for machine 'none' cpu_parse_cpu_model(machine_class->default_cpu_type, cpu_model) and later to replace a bunch of ifdefs *-user/main.c that set default cpu_model with cpu type. With the later in mind set it to 'any', which is current default for ARM targets. While at it, default cpu_model for ARM is set to 'any' under TARGET_ARM, however there is catch all ifdef which also sets cpu_model to 'any'. Drop unnecessary TARGET_ARM ifdef and use catch all #else to set default value. Signed-off-by: Igor Mammedov --- CC: Riku Voipio CC: Laurent Vivier CC: Peter Maydell CC: Andrew Jones CC: qemu-arm@nongnu.org --- target/arm/cpu.h | 1 + linux-user/main.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 9631670..c87bb76 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -2171,6 +2171,7 @@ static inline bool arm_excp_unmasked(CPUState *cs, un= signed int excp_idx, =20 #define ARM_CPU_TYPE_SUFFIX "-" TYPE_ARM_CPU #define ARM_CPU_TYPE_NAME(name) (name ARM_CPU_TYPE_SUFFIX) +#define TARGET_DEFAULT_CPU_TYPE ARM_CPU_TYPE_NAME("any") =20 #define cpu_signal_handler cpu_arm_signal_handler #define cpu_list arm_cpu_list diff --git a/linux-user/main.c b/linux-user/main.c index 450eb3c..a35477e 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -4325,8 +4325,6 @@ int main(int argc, char **argv, char **envp) #else cpu_model =3D "qemu32"; #endif -#elif defined(TARGET_ARM) - cpu_model =3D "any"; #elif defined(TARGET_UNICORE32) cpu_model =3D "any"; #elif defined(TARGET_M68K) --=20 2.7.4 From nobody Sat Oct 25 23:37:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 15162042609431014.561864145566; Wed, 17 Jan 2018 07:51:00 -0800 (PST) Received: from localhost ([::1]:44192 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpzQ-0000ZQ-2T for importer@patchew.org; Wed, 17 Jan 2018 10:51:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55222) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpu9-00050Q-Tl for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpu5-0007xp-Em for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57274) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebpu5-0007x9-8l for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:29 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4D59D883C4; Wed, 17 Jan 2018 15:45:28 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 564764AB; Wed, 17 Jan 2018 15:45:22 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 16:43:14 +0100 Message-Id: <1516203816-19374-3-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 17 Jan 2018 15:45:28 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 02/24] alpha: cpu: add TARGET_DEFAULT_CPU_TYPE macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" it will be used for for 2 purposes, 1st is to provide to cpu name resolving class for machine 'none' cpu_parse_cpu_model(machine_class->default_cpu_type, cpu_model) and later to drop a bunch of ifdefs *-user/main.c that set default cpu_model. With the later in mind set it to 'ev67', which is what alpha_cpu_class_by_name() returns if user provided a garbage (including default "any" cpu_model that *-user targets set in catch all) in case of Alpha. Signed-off-by: Igor Mammedov --- CC: Richard Henderson --- target/alpha/cpu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/target/alpha/cpu.h b/target/alpha/cpu.h index 0a9ad35..c8dd560 100644 --- a/target/alpha/cpu.h +++ b/target/alpha/cpu.h @@ -472,6 +472,7 @@ void alpha_translate_init(void); =20 #define ALPHA_CPU_TYPE_SUFFIX "-" TYPE_ALPHA_CPU #define ALPHA_CPU_TYPE_NAME(model) model ALPHA_CPU_TYPE_SUFFIX +#define TARGET_DEFAULT_CPU_TYPE ALPHA_CPU_TYPE_NAME("ev67") =20 void alpha_cpu_list(FILE *f, fprintf_function cpu_fprintf); /* you can call this signal handler from your SIGBUS and SIGSEGV --=20 2.7.4 From nobody Sat Oct 25 23:37:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516204447811223.84217898777604; Wed, 17 Jan 2018 07:54:07 -0800 (PST) Received: from localhost ([::1]:44205 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebq2Q-000356-SH for importer@patchew.org; Wed, 17 Jan 2018 10:54:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55367) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpuH-000595-DU for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpuB-00087P-Tg for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58534) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebpuB-00085f-Nm for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:35 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8A39949008; Wed, 17 Jan 2018 15:45:29 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 853404A9; Wed, 17 Jan 2018 15:45:23 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 16:43:15 +0100 Message-Id: <1516203816-19374-4-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 17 Jan 2018 15:45:29 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 03/24] cris: cpu: add TARGET_DEFAULT_CPU_TYPE macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Edgar E. Iglesias" , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" it will be used for for 2 purposes, 1st is to provide to cpu name resolving class for machine 'none' cpu_parse_cpu_model(machine_class->default_cpu_type, cpu_model) and later to drop a bunch of ifdefs *-user/main.c that set default cpu_model. With the later in mind set it to 'crisv32', which is what cris_cpu_class_by_name() returns if user provided "any" cpu_model including default that *-user targets set in catch all in case of Cris. Signed-off-by: Igor Mammedov --- CC: "Edgar E. Iglesias" --- target/cris/cpu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/target/cris/cpu.h b/target/cris/cpu.h index b64fa35..8feabb4 100644 --- a/target/cris/cpu.h +++ b/target/cris/cpu.h @@ -271,6 +271,7 @@ enum { =20 #define CRIS_CPU_TYPE_SUFFIX "-" TYPE_CRIS_CPU #define CRIS_CPU_TYPE_NAME(name) (name CRIS_CPU_TYPE_SUFFIX) +#define TARGET_DEFAULT_CPU_TYPE CRIS_CPU_TYPE_NAME("crisv32") =20 #define cpu_signal_handler cpu_cris_signal_handler =20 --=20 2.7.4 From nobody Sat Oct 25 23:37:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516204200715519.4986260609686; Wed, 17 Jan 2018 07:50:00 -0800 (PST) Received: from localhost ([::1]:44186 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpyJ-00081k-I5 for importer@patchew.org; Wed, 17 Jan 2018 10:49:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpu9-000509-MM for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpu5-0007xU-03 for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58630) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebpu4-0007wk-Qd for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:28 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C9DC655870; Wed, 17 Jan 2018 15:45:27 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id B89544C0; Wed, 17 Jan 2018 15:45:24 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 16:43:16 +0100 Message-Id: <1516203816-19374-5-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 17 Jan 2018 15:45:27 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 04/24] lm32: cpu: add TARGET_DEFAULT_CPU_TYPE macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Walle , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" it will be used for for 2 purposes, 1st is to provide to cpu name resolving class for machine 'none' cpu_parse_cpu_model(machine_class->default_cpu_type, cpu_model). and later to drop a bunch of ifdefs *-user/main.c that set default cpu_model. LM32 however doesn't have working default in *-user targets which defaults to catch all 'any'. So I arbitraraly picked 'lm32-basic' cpu model to serve as the default. Signed-off-by: Igor Mammedov --- CC: Michael Walle --- target/lm32/cpu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/target/lm32/cpu.h b/target/lm32/cpu.h index 2279594..65f58f5 100644 --- a/target/lm32/cpu.h +++ b/target/lm32/cpu.h @@ -259,6 +259,7 @@ bool lm32_cpu_do_semihosting(CPUState *cs); =20 #define LM32_CPU_TYPE_SUFFIX "-" TYPE_LM32_CPU #define LM32_CPU_TYPE_NAME(model) model LM32_CPU_TYPE_SUFFIX +#define TARGET_DEFAULT_CPU_TYPE LM32_CPU_TYPE_NAME("lm32-basic") =20 #define cpu_list lm32_cpu_list #define cpu_signal_handler cpu_lm32_signal_handler --=20 2.7.4 From nobody Sat Oct 25 23:37:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516204077369871.97920498466; Wed, 17 Jan 2018 07:47:57 -0800 (PST) Received: from localhost ([::1]:44171 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpwS-0006Uk-Er for importer@patchew.org; Wed, 17 Jan 2018 10:47:56 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpu9-00050C-NG for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpu5-0007xq-Ea for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41608) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebpu5-0007xH-9D for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:29 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 52DB22D1EFB; Wed, 17 Jan 2018 15:45:28 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 15F454AC; Wed, 17 Jan 2018 15:45:25 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 16:43:17 +0100 Message-Id: <1516203816-19374-6-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 17 Jan 2018 15:45:28 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 05/24] m68k: cpu: add TARGET_DEFAULT_CPU_TYPE macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" it will be used for for 2 purposes, 1st is to provide to cpu name resolving class for machine 'none' cpu_parse_cpu_model(machine_class->default_cpu_type, cpu_model) and later to drop a bunch of ifdefs *-user/main.c that set default cpu_model. With the later in mind set it to 'any', which is current default for M68K targets. While at it, drop redundant ifdef in linux-user, as catch all #else sets default to the same 'any' model. Signed-off-by: Igor Mammedov --- CC: Riku Voipio CC: Laurent Vivier --- target/m68k/cpu.h | 1 + linux-user/main.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h index 2985b03..193e8f8 100644 --- a/target/m68k/cpu.h +++ b/target/m68k/cpu.h @@ -405,6 +405,7 @@ void register_m68k_insns (CPUM68KState *env); =20 #define M68K_CPU_TYPE_SUFFIX "-" TYPE_M68K_CPU #define M68K_CPU_TYPE_NAME(model) model M68K_CPU_TYPE_SUFFIX +#define TARGET_DEFAULT_CPU_TYPE M68K_CPU_TYPE_NAME("any") =20 #define cpu_signal_handler cpu_m68k_signal_handler #define cpu_list m68k_cpu_list diff --git a/linux-user/main.c b/linux-user/main.c index a35477e..54e8aac 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -4327,8 +4327,6 @@ int main(int argc, char **argv, char **envp) #endif #elif defined(TARGET_UNICORE32) cpu_model =3D "any"; -#elif defined(TARGET_M68K) - cpu_model =3D "any"; #elif defined(TARGET_SPARC) #ifdef TARGET_SPARC64 cpu_model =3D "TI UltraSparc II"; --=20 2.7.4 From nobody Sat Oct 25 23:37:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516204372967612.5642501123307; Wed, 17 Jan 2018 07:52:52 -0800 (PST) Received: from localhost ([::1]:44203 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebq1E-00025E-1x for importer@patchew.org; Wed, 17 Jan 2018 10:52:52 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpu9-00050S-U0 for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpu6-0007zD-Ju for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57306) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebpu6-0007yA-Cf for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:30 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 517977485B; Wed, 17 Jan 2018 15:45:29 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 654DC5191E; Wed, 17 Jan 2018 15:45:28 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 16:43:18 +0100 Message-Id: <1516203816-19374-7-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 17 Jan 2018 15:45:29 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 06/24] microblaze: cpu: add TARGET_DEFAULT_CPU_TYPE macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Edgar E. Iglesias" , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" it will be used for for 2 purposes, 1st is to provide to cpu name resolving class for machine 'none' cpu_parse_cpu_model(machine_class->default_cpu_type, cpu_model) and later to drop a bunch of ifdefs *-user/main.c that set default cpu_model. For the later default is set to bogus 'any', and mb_cpu_class_by_name() always returns TYPE_MICROBLAZE_CPU class regardless of cpu_model value. So use this type for default. Signed-off-by: Igor Mammedov --- CC: "Edgar E. Iglesias" --- target/microblaze/cpu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index 52b6b6a..f244efa 100644 --- a/target/microblaze/cpu.h +++ b/target/microblaze/cpu.h @@ -344,6 +344,7 @@ int cpu_mb_signal_handler(int host_signum, void *pinfo, #define TARGET_VIRT_ADDR_SPACE_BITS 32 =20 #define cpu_init(cpu_model) cpu_generic_init(TYPE_MICROBLAZE_CPU, cpu_mode= l) +#define TARGET_DEFAULT_CPU_TYPE TYPE_MICROBLAZE_CPU =20 #define cpu_signal_handler cpu_mb_signal_handler =20 --=20 2.7.4 From nobody Sat Oct 25 23:37:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516204273898380.4846759038453; Wed, 17 Jan 2018 07:51:13 -0800 (PST) Received: from localhost ([::1]:44193 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpzZ-0000h8-2a for importer@patchew.org; Wed, 17 Jan 2018 10:51:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55323) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpuF-00055k-13 for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpuE-0008A4-7E for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41738) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebpuE-00089R-2A for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:38 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E341D37E68; Wed, 17 Jan 2018 15:45:31 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 93BCD17AF9; Wed, 17 Jan 2018 15:45:29 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 16:43:19 +0100 Message-Id: <1516203816-19374-8-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 17 Jan 2018 15:45:32 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 07/24] mips: cpu: add TARGET_DEFAULT_CPU_TYPE macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yongbok Kim , Laurent Vivier , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" it will be used for for 2 purposes, 1st is to provide to cpu name resolving class for machine 'none' cpu_parse_cpu_model(machine_class->default_cpu_type, cpu_model) and later to drop a bunch of ifdefs *-user/main.c that set default cpu_model. Take defaults types from linux-user and use them as TARGET_DEFAULT_CPU_TYPE, which should work for *-user targets. Signed-off-by: Igor Mammedov --- CC: Aurelien Jarno CC: Yongbok Kim --- target/mips/cpu.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target/mips/cpu.h b/target/mips/cpu.h index 7f8ba5f..c5ee894 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -744,6 +744,12 @@ int cpu_mips_signal_handler(int host_signum, void *pin= fo, void *puc); #define MIPS_CPU_TYPE_SUFFIX "-" TYPE_MIPS_CPU #define MIPS_CPU_TYPE_NAME(model) model MIPS_CPU_TYPE_SUFFIX =20 +#if defined(TARGET_ABI_MIPSN32) || defined(TARGET_ABI_MIPSN64) +#define TARGET_DEFAULT_CPU_TYPE MIPS_CPU_TYPE_NAME("5KEf") +#else +#define TARGET_DEFAULT_CPU_TYPE MIPS_CPU_TYPE_NAME("24Kf") +#endif + bool cpu_supports_cps_smp(const char *cpu_type); bool cpu_supports_isa(const char *cpu_type, unsigned int isa); void cpu_set_exception_base(int vp_index, target_ulong address); --=20 2.7.4 From nobody Sat Oct 25 23:37:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516204451022841.088916216758; Wed, 17 Jan 2018 07:54:11 -0800 (PST) Received: from localhost ([::1]:44206 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebq2U-00037Q-7d for importer@patchew.org; Wed, 17 Jan 2018 10:54:10 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpuF-00055z-9G for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpuE-0008AP-IS for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58760) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebpuE-00089h-CH for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:38 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 45B9155363; Wed, 17 Jan 2018 15:45:32 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2A07C4A9; Wed, 17 Jan 2018 15:45:31 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 16:43:20 +0100 Message-Id: <1516203816-19374-9-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 17 Jan 2018 15:45:32 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 08/24] moxie: cpu: add TARGET_DEFAULT_CPU_TYPE macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anthony Green , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" it will be used for for 2 purposes, 1st is to provide to cpu name resolving class for machine 'none' cpu_parse_cpu_model(machine_class->default_cpu_type, cpu_model) and later to drop a bunch of ifdefs *-user/main.c that set default cpu_model. With the later in mind set it to 'any', which is current default for target. Signed-off-by: Igor Mammedov --- CC: Anthony Green --- target/moxie/cpu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/target/moxie/cpu.h b/target/moxie/cpu.h index d37e6a5..9fabb93 100644 --- a/target/moxie/cpu.h +++ b/target/moxie/cpu.h @@ -124,6 +124,7 @@ int cpu_moxie_signal_handler(int host_signum, void *pin= fo, =20 #define MOXIE_CPU_TYPE_SUFFIX "-" TYPE_MOXIE_CPU #define MOXIE_CPU_TYPE_NAME(model) model MOXIE_CPU_TYPE_SUFFIX +#define TARGET_DEFAULT_CPU_TYPE MOXIE_CPU_TYPE_NAME("any") =20 #define cpu_signal_handler cpu_moxie_signal_handler =20 --=20 2.7.4 From nobody Sat Oct 25 23:37:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516204570234147.96094731424546; Wed, 17 Jan 2018 07:56:10 -0800 (PST) Received: from localhost ([::1]:44237 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebq4L-0004l7-Gg for importer@patchew.org; Wed, 17 Jan 2018 10:56:05 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55265) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpuB-000529-R3 for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpuA-00085G-VV for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47980) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebpuA-00083o-OW for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:34 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D4C979B2EE; Wed, 17 Jan 2018 15:45:33 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7080417AFC; Wed, 17 Jan 2018 15:45:32 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 16:43:21 +0100 Message-Id: <1516203816-19374-10-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 17 Jan 2018 15:45:33 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 09/24] nios2: cpu: add TARGET_DEFAULT_CPU_TYPE macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marek Vasut , Chris Wulff , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" it will be used for for 2 purposes, 1st is to provide to cpu name resolving class for machine 'none' cpu_parse_cpu_model(machine_class->default_cpu_type, cpu_model) and later to drop a bunch of ifdefs *-user/main.c that set default cpu_model. For the later default is set to bogus 'any', and nios2_cpu_class_by_name() always returns TYPE_NIOS2_CPU class regardless of cpu_model value. So use this type for default. Signed-off-by: Igor Mammedov --- CC: Chris Wulff CC: Marek Vasut --- target/nios2/cpu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/target/nios2/cpu.h b/target/nios2/cpu.h index 88823a6..2d03958 100644 --- a/target/nios2/cpu.h +++ b/target/nios2/cpu.h @@ -232,6 +232,7 @@ void nios2_check_interrupts(CPUNios2State *env); #endif =20 #define cpu_init(cpu_model) cpu_generic_init(TYPE_NIOS2_CPU, cpu_model) +#define TARGET_DEFAULT_CPU_TYPE TYPE_NIOS2_CPU =20 #define cpu_gen_code cpu_nios2_gen_code #define cpu_signal_handler cpu_nios2_signal_handler --=20 2.7.4 From nobody Sat Oct 25 23:37:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 151620443818226.33463358874849; Wed, 17 Jan 2018 07:53:58 -0800 (PST) Received: from localhost ([::1]:44204 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebq2H-0002xu-9i for importer@patchew.org; Wed, 17 Jan 2018 10:53:57 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpuC-00053D-Tb for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpuC-00088F-7Z for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52884) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebpuC-00086E-1j for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:36 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 10838C05972A; Wed, 17 Jan 2018 15:45:35 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id F3C4D516EF; Wed, 17 Jan 2018 15:45:33 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 16:43:22 +0100 Message-Id: <1516203816-19374-11-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 17 Jan 2018 15:45:35 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 10/24] openrisc: cpu: add TARGET_DEFAULT_CPU_TYPE macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stafford Horne , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" it will be used for for 2 purposes, 1st is to provide to cpu name resolving class for machine 'none' cpu_parse_cpu_model(machine_class->default_cpu_type, cpu_model) and later to drop a bunch of ifdefs *-user/main.c that set default cpu_model. Take default type from linux-user and use it as TARGET_DEFAULT_CPU_TYPE, which should work for *-user targets. Signed-off-by: Igor Mammedov --- CC: Stafford Horne --- target/openrisc/cpu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/target/openrisc/cpu.h b/target/openrisc/cpu.h index cc22dc8..8d1a87e 100644 --- a/target/openrisc/cpu.h +++ b/target/openrisc/cpu.h @@ -394,6 +394,7 @@ int cpu_openrisc_get_phys_data(OpenRISCCPU *cpu, =20 #define OPENRISC_CPU_TYPE_SUFFIX "-" TYPE_OPENRISC_CPU #define OPENRISC_CPU_TYPE_NAME(model) model OPENRISC_CPU_TYPE_SUFFIX +#define TARGET_DEFAULT_CPU_TYPE OPENRISC_CPU_TYPE_NAME("or1200") =20 #include "exec/cpu-all.h" =20 --=20 2.7.4 From nobody Sat Oct 25 23:37:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516204615513343.1434307694818; Wed, 17 Jan 2018 07:56:55 -0800 (PST) Received: from localhost ([::1]:44239 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebq57-0005Sb-JS for importer@patchew.org; Wed, 17 Jan 2018 10:56:53 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55415) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpuK-0005BZ-8S for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpuH-0008EM-5Q for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37058) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebpuG-0008Cj-Vb; Wed, 17 Jan 2018 10:45:41 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E78FF400E7; Wed, 17 Jan 2018 15:45:39 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 36AAD4AB; Wed, 17 Jan 2018 15:45:35 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 16:43:23 +0100 Message-Id: <1516203816-19374-12-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 17 Jan 2018 15:45:40 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 11/24] ppc: cpu: add TARGET_DEFAULT_CPU_TYPE macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexander Graf , Riku Voipio , qemu-ppc@nongnu.org, Laurent Vivier , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" it will be used for for 2 purposes, 1st is to provide to cpu name resolving class for machine 'none' cpu_parse_cpu_model(machine_class->default_cpu_type, cpu_model) and later to drop a bunch of ifdefs *-user/main.c that set default cpu_model. Use default values from linux-user for TARGET_DEFAULT_CPU_TYPE. While at it fixup linux-user to use corresponding cpu models instead of aliases. Signed-off-by: Igor Mammedov Acked-by: David Gibson --- CC: Riku Voipio CC: Laurent Vivier CC: David Gibson CC: Alexander Graf CC: qemu-ppc@nongnu.org --- target/ppc/cpu.h | 6 ++++++ linux-user/main.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index a5e49f2..4af4aff 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -1377,6 +1377,12 @@ int ppc_dcr_write (ppc_dcr_t *dcr_env, int dcrn, uin= t32_t val); #define POWERPC_CPU_TYPE_SUFFIX "-" TYPE_POWERPC_CPU #define POWERPC_CPU_TYPE_NAME(model) model POWERPC_CPU_TYPE_SUFFIX =20 +#ifdef TARGET_PPC64 +#define TARGET_DEFAULT_CPU_TYPE POWERPC_CPU_TYPE_NAME("power8_v2.0") +#else +#define TARGET_DEFAULT_CPU_TYPE POWERPC_CPU_TYPE_NAME("750_v3.1") +#endif + #define cpu_signal_handler cpu_ppc_signal_handler #define cpu_list ppc_cpu_list =20 diff --git a/linux-user/main.c b/linux-user/main.c index 54e8aac..279cd97 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -4343,9 +4343,9 @@ int main(int argc, char **argv, char **envp) cpu_model =3D "or1200"; #elif defined(TARGET_PPC) # ifdef TARGET_PPC64 - cpu_model =3D "POWER8"; + cpu_model =3D "power8_v2.0"; # else - cpu_model =3D "750"; + cpu_model =3D "750_v3.1"; # endif #elif defined TARGET_SH4 cpu_model =3D "sh7785"; --=20 2.7.4 From nobody Sat Oct 25 23:37:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516204787028906.57121748553; Wed, 17 Jan 2018 07:59:47 -0800 (PST) Received: from localhost ([::1]:44260 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebq7t-0007rd-7z for importer@patchew.org; Wed, 17 Jan 2018 10:59:45 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpuK-0005CB-OA for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpuJ-0008IC-Td for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41802) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebpuJ-0008GX-ND; Wed, 17 Jan 2018 10:45:43 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8FB052D1EFB; Wed, 17 Jan 2018 15:45:42 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 26B9E4A7; Wed, 17 Jan 2018 15:45:39 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 16:43:24 +0100 Message-Id: <1516203816-19374-13-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 17 Jan 2018 15:45:42 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 12/24] s390x: cpu: add TARGET_DEFAULT_CPU_TYPE macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexander Graf , qemu-s390x@nongnu.org, Laurent Vivier , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" it will be used for for 2 purposes, 1st is to provide to cpu name resolving class for machine 'none' cpu_parse_cpu_model(machine_class->default_cpu_type, cpu_model) and later to drop a bunch of ifdefs *-user/main.c that set default cpu_model. Use default value from linux-user for TARGET_DEFAULT_CPU_TYPE. Signed-off-by: Igor Mammedov Reviewed-by: David Hildenbrand --- CC: Richard Henderson CC: Alexander Graf CC: qemu-s390x@nongnu.org --- target/s390x/cpu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index 1a8b6b9..174624a 100644 --- a/target/s390x/cpu.h +++ b/target/s390x/cpu.h @@ -731,6 +731,7 @@ void s390_set_qemu_cpu_model(uint16_t type, uint8_t gen= , uint8_t ec_ga, =20 #define S390_CPU_TYPE_SUFFIX "-" TYPE_S390_CPU #define S390_CPU_TYPE_NAME(name) (name S390_CPU_TYPE_SUFFIX) +#define TARGET_DEFAULT_CPU_TYPE S390_CPU_TYPE_NAME("qemu") =20 /* you can call this signal handler from your SIGBUS and SIGSEGV signal handlers to inform the virtual CPU of exceptions. non zero --=20 2.7.4 From nobody Sat Oct 25 23:37:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516204986541943.2028749015805; Wed, 17 Jan 2018 08:03:06 -0800 (PST) Received: from localhost ([::1]:44297 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebqAy-00026o-NT for importer@patchew.org; Wed, 17 Jan 2018 11:02:56 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55509) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpuQ-0005Jd-Mm for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpuP-0008SD-TK for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53052) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebpuP-0008Pa-Nz for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:49 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9CF37C0568E4; Wed, 17 Jan 2018 15:45:43 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id A892263136; Wed, 17 Jan 2018 15:45:41 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 16:43:25 +0100 Message-Id: <1516203816-19374-14-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 17 Jan 2018 15:45:48 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 13/24] sh4: cpu: add TARGET_DEFAULT_CPU_TYPE macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" it will be used for for 2 purposes, 1st is to provide to cpu name resolving class for machine 'none' cpu_parse_cpu_model(machine_class->default_cpu_type, cpu_model) and later to drop a bunch of ifdefs *-user/main.c that set default cpu_model. Use default value from linux-user for TARGET_DEFAULT_CPU_TYPE. Signed-off-by: Igor Mammedov --- CC: Aurelien Jarno --- target/sh4/cpu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h index a2c26e0..203d212 100644 --- a/target/sh4/cpu.h +++ b/target/sh4/cpu.h @@ -278,6 +278,7 @@ void cpu_load_tlb(CPUSH4State * env); =20 #define SUPERH_CPU_TYPE_SUFFIX "-" TYPE_SUPERH_CPU #define SUPERH_CPU_TYPE_NAME(model) model SUPERH_CPU_TYPE_SUFFIX +#define TARGET_DEFAULT_CPU_TYPE SUPERH_CPU_TYPE_NAME("sh7785") =20 #define cpu_signal_handler cpu_sh4_signal_handler #define cpu_list sh4_cpu_list --=20 2.7.4 From nobody Sat Oct 25 23:37:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516204647526813.4064408088815; Wed, 17 Jan 2018 07:57:27 -0800 (PST) Received: from localhost ([::1]:44241 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebq5e-0005tO-Kx for importer@patchew.org; Wed, 17 Jan 2018 10:57:26 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpuV-0005PZ-AF for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpuQ-0008TR-Dc for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53058) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebpuQ-0008Qt-7H for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:50 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 049FDC05686E; Wed, 17 Jan 2018 15:45:44 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id D0E054A5; Wed, 17 Jan 2018 15:45:42 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 16:43:26 +0100 Message-Id: <1516203816-19374-15-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 17 Jan 2018 15:45:49 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 14/24] sparc: cpu: add TARGET_DEFAULT_CPU_TYPE macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Cave-Ayland , Laurent Vivier , Artyom Tarasenko Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" it will be used for for 2 purposes, 1st is to provide to cpu name resolving class for machine 'none' cpu_parse_cpu_model(machine_class->default_cpu_type, cpu_model) and later to drop a bunch of ifdefs *-user/main.c that set default cpu_model. Use default values from linux-user for TARGET_DEFAULT_CPU_TYPE. Signed-off-by: Igor Mammedov --- CC: Mark Cave-Ayland CC: Artyom Tarasenko --- target/sparc/cpu.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index 9fde547..02c55ad 100644 --- a/target/sparc/cpu.h +++ b/target/sparc/cpu.h @@ -661,6 +661,12 @@ int cpu_sparc_signal_handler(int host_signum, void *pi= nfo, void *puc); #define SPARC_CPU_TYPE_SUFFIX "-" TYPE_SPARC_CPU #define SPARC_CPU_TYPE_NAME(model) model SPARC_CPU_TYPE_SUFFIX =20 +#ifdef TARGET_SPARC64 +#define TARGET_DEFAULT_CPU_TYPE SPARC_CPU_TYPE_NAME("TI-UltraSparc-II") +#else +#define TARGET_DEFAULT_CPU_TYPE SPARC_CPU_TYPE_NAME("Fujitsu-MB86904") +#endif + #define cpu_signal_handler cpu_sparc_signal_handler #define cpu_list sparc_cpu_list =20 --=20 2.7.4 From nobody Sat Oct 25 23:37:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516204742437332.89129939620875; Wed, 17 Jan 2018 07:59:02 -0800 (PST) Received: from localhost ([::1]:44259 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebq7A-0007Cq-G4 for importer@patchew.org; Wed, 17 Jan 2018 10:59:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpuV-0005Pi-B7 for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpuR-0008W1-Jc for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58926) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebpuR-0008US-EB for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:51 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3E2AE51F14; Wed, 17 Jan 2018 15:45:45 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 27E074B3; Wed, 17 Jan 2018 15:45:44 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 16:43:27 +0100 Message-Id: <1516203816-19374-16-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 17 Jan 2018 15:45:50 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 15/24] tricore: cpu: add TARGET_DEFAULT_CPU_TYPE macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" it will be used for for 2 purposes, 1st is to provide to cpu name resolving class for machine 'none' cpu_parse_cpu_model(machine_class->default_cpu_type, cpu_model) and later to drop a bunch of ifdefs *-user/main.c that set default cpu_model. linux-user defaults to catch all 'any' which is bogus and results into error. Pick arbitrary model "tc1796" for TARGET_DEFAULT_CPU_TYPE to use and it would fix missing default when *-user is switched to using types instead of cpu_model. Signed-off-by: Igor Mammedov Reviewed-by: Bastian Koppelmann --- CC: Bastian Koppelmann --- target/tricore/cpu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/target/tricore/cpu.h b/target/tricore/cpu.h index f41d2ce..835d51a 100644 --- a/target/tricore/cpu.h +++ b/target/tricore/cpu.h @@ -415,6 +415,7 @@ static inline void cpu_get_tb_cpu_state(CPUTriCoreState= *env, target_ulong *pc, =20 #define TRICORE_CPU_TYPE_SUFFIX "-" TYPE_TRICORE_CPU #define TRICORE_CPU_TYPE_NAME(model) model TRICORE_CPU_TYPE_SUFFIX +#define TARGET_DEFAULT_CPU_TYPE TRICORE_CPU_TYPE_NAME("tc1796") =20 /* helpers.c */ int cpu_tricore_handle_mmu_fault(CPUState *cpu, target_ulong address, --=20 2.7.4 From nobody Sat Oct 25 23:37:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516204628079299.1615927360706; Wed, 17 Jan 2018 07:57:08 -0800 (PST) Received: from localhost ([::1]:44240 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebq5I-0005a8-5P for importer@patchew.org; Wed, 17 Jan 2018 10:57:04 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55578) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpuV-0005Pb-AJ for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpuT-00006M-M8 for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47826) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebpuT-00005h-G1 for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:53 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 55B487EA81; Wed, 17 Jan 2018 15:45:47 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 757DB4BA; Wed, 17 Jan 2018 15:45:45 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 16:43:28 +0100 Message-Id: <1516203816-19374-17-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 17 Jan 2018 15:45:47 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 16/24] unicore32: cpu: add TARGET_DEFAULT_CPU_TYPE macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guan Xuetao , Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" it will be used for for 2 purposes, 1st is to provide to cpu name resolving class for machine 'none' cpu_parse_cpu_model(machine_class->default_cpu_type, cpu_model) and later to drop a bunch of ifdefs *-user/main.c that set default cpu_model. Use default value from linux-user for TARGET_DEFAULT_CPU_TYPE. While at it drop redundant ifdef and let catch all #else set default to the same 'any' model. Signed-off-by: Igor Mammedov --- CC: Riku Voipio CC: Laurent Vivier CC: Guan Xuetao --- target/unicore32/cpu.h | 1 + linux-user/main.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/target/unicore32/cpu.h b/target/unicore32/cpu.h index 3dc6fbc..fd3fa81 100644 --- a/target/unicore32/cpu.h +++ b/target/unicore32/cpu.h @@ -169,6 +169,7 @@ static inline int cpu_mmu_index(CPUUniCore32State *env,= bool ifetch) =20 #define UNICORE32_CPU_TYPE_SUFFIX "-" TYPE_UNICORE32_CPU #define UNICORE32_CPU_TYPE_NAME(model) model UNICORE32_CPU_TYPE_SUFFIX +#define TARGET_DEFAULT_CPU_TYPE UNICORE32_CPU_TYPE_NAME("any") =20 static inline void cpu_get_tb_cpu_state(CPUUniCore32State *env, target_ulo= ng *pc, target_ulong *cs_base, uint32_t *f= lags) diff --git a/linux-user/main.c b/linux-user/main.c index 279cd97..1cd5033 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -4325,8 +4325,6 @@ int main(int argc, char **argv, char **envp) #else cpu_model =3D "qemu32"; #endif -#elif defined(TARGET_UNICORE32) - cpu_model =3D "any"; #elif defined(TARGET_SPARC) #ifdef TARGET_SPARC64 cpu_model =3D "TI UltraSparc II"; --=20 2.7.4 From nobody Sat Oct 25 23:37:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516205187128381.11671006487984; Wed, 17 Jan 2018 08:06:27 -0800 (PST) Received: from localhost ([::1]:44491 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebqEM-00059V-Aj for importer@patchew.org; Wed, 17 Jan 2018 11:06:26 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55623) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpuX-0005S9-Hq for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpuW-00008z-KS for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47855) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebpuW-000080-C2 for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:56 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 639967A168; Wed, 17 Jan 2018 15:45:50 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 65C364A9; Wed, 17 Jan 2018 15:45:47 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 16:43:29 +0100 Message-Id: <1516203816-19374-18-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 17 Jan 2018 15:45:55 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 17/24] xtensa: cpu: rename XTENSA_DEFAULT_CPU_TYPE to TARGET_DEFAULT_CPU_TYPE X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Max Filippov , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" so naming would be in line with other targets and null-machine.c which uses the later would compile. Later it also would be used as default for *-user targets which is currently bogus cpu model 'any', that errors out. Signed-off-by: Igor Mammedov Acked-by: Max Filippov --- CC: Max Filippov --- target/xtensa/cpu.h | 2 +- hw/xtensa/sim.c | 2 +- hw/xtensa/xtfpga.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/xtensa/cpu.h b/target/xtensa/cpu.h index d9404aa..537e151 100644 --- a/target/xtensa/cpu.h +++ b/target/xtensa/cpu.h @@ -506,7 +506,7 @@ void xtensa_cpu_do_unaligned_access(CPUState *cpu, vadd= r addr, #else #define XTENSA_DEFAULT_CPU_MODEL "dc232b" #endif -#define XTENSA_DEFAULT_CPU_TYPE XTENSA_CPU_TYPE_NAME(XTENSA_DEFAULT_CPU_MO= DEL) +#define TARGET_DEFAULT_CPU_TYPE XTENSA_CPU_TYPE_NAME(XTENSA_DEFAULT_CPU_MO= DEL) =20 #define cpu_init(cpu_model) cpu_generic_init(TYPE_XTENSA_CPU, cpu_model) =20 diff --git a/hw/xtensa/sim.c b/hw/xtensa/sim.c index 2bb883b..58a79bd 100644 --- a/hw/xtensa/sim.c +++ b/hw/xtensa/sim.c @@ -128,7 +128,7 @@ static void xtensa_sim_machine_init(MachineClass *mc) mc->init =3D xtensa_sim_init; mc->max_cpus =3D 4; mc->no_serial =3D 1; - mc->default_cpu_type =3D XTENSA_DEFAULT_CPU_TYPE; + mc->default_cpu_type =3D TARGET_DEFAULT_CPU_TYPE; } =20 DEFINE_MACHINE("sim", xtensa_sim_machine_init) diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c index 1971ecf..c2b0aa4 100644 --- a/hw/xtensa/xtfpga.c +++ b/hw/xtensa/xtfpga.c @@ -449,7 +449,7 @@ static void xtensa_lx60_class_init(ObjectClass *oc, voi= d *data) mc->desc =3D "lx60 EVB (" XTENSA_DEFAULT_CPU_MODEL ")"; mc->init =3D xtensa_lx60_init; mc->max_cpus =3D 4; - mc->default_cpu_type =3D XTENSA_DEFAULT_CPU_TYPE; + mc->default_cpu_type =3D TARGET_DEFAULT_CPU_TYPE; } =20 static const TypeInfo xtensa_lx60_type =3D { @@ -465,7 +465,7 @@ static void xtensa_lx200_class_init(ObjectClass *oc, vo= id *data) mc->desc =3D "lx200 EVB (" XTENSA_DEFAULT_CPU_MODEL ")"; mc->init =3D xtensa_lx200_init; mc->max_cpus =3D 4; - mc->default_cpu_type =3D XTENSA_DEFAULT_CPU_TYPE; + mc->default_cpu_type =3D TARGET_DEFAULT_CPU_TYPE; } =20 static const TypeInfo xtensa_lx200_type =3D { @@ -481,7 +481,7 @@ static void xtensa_ml605_class_init(ObjectClass *oc, vo= id *data) mc->desc =3D "ml605 EVB (" XTENSA_DEFAULT_CPU_MODEL ")"; mc->init =3D xtensa_ml605_init; mc->max_cpus =3D 4; - mc->default_cpu_type =3D XTENSA_DEFAULT_CPU_TYPE; + mc->default_cpu_type =3D TARGET_DEFAULT_CPU_TYPE; } =20 static const TypeInfo xtensa_ml605_type =3D { @@ -497,7 +497,7 @@ static void xtensa_kc705_class_init(ObjectClass *oc, vo= id *data) mc->desc =3D "kc705 EVB (" XTENSA_DEFAULT_CPU_MODEL ")"; mc->init =3D xtensa_kc705_init; mc->max_cpus =3D 4; - mc->default_cpu_type =3D XTENSA_DEFAULT_CPU_TYPE; + mc->default_cpu_type =3D TARGET_DEFAULT_CPU_TYPE; } =20 static const TypeInfo xtensa_kc705_type =3D { --=20 2.7.4 From nobody Sat Oct 25 23:37:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516204815107844.7271276772643; Wed, 17 Jan 2018 08:00:15 -0800 (PST) Received: from localhost ([::1]:44262 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebq8M-0008HG-9E for importer@patchew.org; Wed, 17 Jan 2018 11:00:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpuV-0005PY-9k for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:46:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpuT-00006H-Ka for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42034) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebpuT-00005g-FR for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:53 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 882A113AA3; Wed, 17 Jan 2018 15:45:52 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 86D654C0; Wed, 17 Jan 2018 15:45:49 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 16:43:30 +0100 Message-Id: <1516203816-19374-19-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 17 Jan 2018 15:45:52 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 18/24] hppa: cpu: add TARGET_DEFAULT_CPU_TYPE macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" It will be used to drop a bunch of ifdefs *-user/main.c that set default cpu_model in favor of using type names directly. Signed-off-by: Igor Mammedov --- CC: Richard Henderson --- target/hppa/cpu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h index 8d14077..04625f7 100644 --- a/target/hppa/cpu.h +++ b/target/hppa/cpu.h @@ -113,6 +113,7 @@ static inline int cpu_mmu_index(CPUHPPAState *env, bool= ifetch) void hppa_translate_init(void); =20 #define cpu_init(cpu_model) cpu_generic_init(TYPE_HPPA_CPU, cpu_model) +#define TARGET_DEFAULT_CPU_TYPE TYPE_HPPA_CPU =20 void hppa_cpu_list(FILE *f, fprintf_function cpu_fprintf); =20 --=20 2.7.4 From nobody Sat Oct 25 23:37:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 151620537308711.964231964898772; Wed, 17 Jan 2018 08:09:33 -0800 (PST) Received: from localhost ([::1]:44751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebqHM-0000xk-9G for importer@patchew.org; Wed, 17 Jan 2018 11:09:32 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpuX-0005Ra-5Y for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:46:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpuW-00008Q-AL for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34184) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebpuW-00007w-5H for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:56 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1AAADBBB2; Wed, 17 Jan 2018 15:45:55 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id B09B24A5; Wed, 17 Jan 2018 15:45:52 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 16:43:31 +0100 Message-Id: <1516203816-19374-20-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 17 Jan 2018 15:45:55 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 19/24] tilegx: cpu: add TARGET_DEFAULT_CPU_TYPE macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" It will be used to drop a bunch of ifdefs *-user/main.c that set default cpu_model in favor of using type names directly. For tilegx, *-user defaulted to bogus 'any', however tilegx_cpu_class_by_name() is ignoring invalid values and always returns TYPE_TILEGX_CPU, so use it for TARGET_DEFAULT_CPU_TYPE Signed-off-by: Igor Mammedov --- CC: Eduardo Habkost --- target/tilegx/cpu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/target/tilegx/cpu.h b/target/tilegx/cpu.h index 71cea04..67de53e 100644 --- a/target/tilegx/cpu.h +++ b/target/tilegx/cpu.h @@ -165,6 +165,7 @@ void tilegx_tcg_init(void); int cpu_tilegx_signal_handler(int host_signum, void *pinfo, void *puc); =20 #define cpu_init(cpu_model) cpu_generic_init(TYPE_TILEGX_CPU, cpu_model) +#define TARGET_DEFAULT_CPU_TYPE TYPE_TILEGX_CPU =20 #define cpu_signal_handler cpu_tilegx_signal_handler =20 --=20 2.7.4 From nobody Sat Oct 25 23:37:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516204938256605.5781003252519; Wed, 17 Jan 2018 08:02:18 -0800 (PST) Received: from localhost ([::1]:44294 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebqA8-0001Ow-Cr for importer@patchew.org; Wed, 17 Jan 2018 11:02:04 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55757) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpuo-0005hD-7Y for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:46:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpuk-0000TF-6w for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:46:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48122) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebpuj-0000Sj-Ub for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:46:10 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 085CF7F7B9; Wed, 17 Jan 2018 15:46:04 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4EF374AB; Wed, 17 Jan 2018 15:45:55 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 16:43:32 +0100 Message-Id: <1516203816-19374-21-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 17 Jan 2018 15:46:09 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 20/24] machine: drop MachineState::cpu_model X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marcel Apfelbaum , Paolo Bonzini , Laurent Vivier , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The last user of it was machine type 'none', which used field to create CPU id user requested it on CLI with -cpu option. We could compare pointers of MachineState::cpu_type and MachineClass::default_cpu_type to check for the same condition, and drop cpu_model concept completly from machine/boards code So that no one would try to reuse obsolete field and only place to deal with cpu model would be vl.c and foo_cpu_class_by_name() callbacks. Signed-off-by: Igor Mammedov --- CC: Eduardo Habkost CC: Marcel Apfelbaum CC: Paolo Bonzini --- include/hw/boards.h | 1 - hw/core/null-machine.c | 10 +++++++--- vl.c | 8 +++++++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/include/hw/boards.h b/include/hw/boards.h index 156b16f..decd0ec 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -246,7 +246,6 @@ struct MachineState { char *kernel_filename; char *kernel_cmdline; char *initrd_filename; - const char *cpu_model; const char *cpu_type; AccelState *accelerator; CPUArchIdList *possible_cpus; diff --git a/hw/core/null-machine.c b/hw/core/null-machine.c index 864832d..c2e466c 100644 --- a/hw/core/null-machine.c +++ b/hw/core/null-machine.c @@ -23,10 +23,13 @@ static void machine_none_init(MachineState *mch) { CPUState *cpu =3D NULL; + MachineClass *mc =3D MACHINE_GET_CLASS(mch); =20 - /* Initialize CPU (if a model has been specified) */ - if (mch->cpu_model) { - cpu =3D cpu_init(mch->cpu_model); + /* Initialize CPU if cpu_type pointer is user provided + * (i.e. !=3D to pointer tot static default cpu type string) + */ + if (mch->cpu_type !=3D mc->default_cpu_type) { + cpu =3D cpu_create(mch->cpu_type); if (!cpu) { error_report("Unable to initialize CPU"); exit(1); @@ -54,6 +57,7 @@ static void machine_none_machine_init(MachineClass *mc) mc->init =3D machine_none_init; mc->max_cpus =3D 1; mc->default_ram_size =3D 0; + mc->default_cpu_type =3D TARGET_DEFAULT_CPU_TYPE; } =20 DEFINE_MACHINE("none", machine_none_machine_init) diff --git a/vl.c b/vl.c index 2586f25..8aa0131 100644 --- a/vl.c +++ b/vl.c @@ -4609,7 +4609,6 @@ int main(int argc, char **argv, char **envp) current_machine->maxram_size =3D maxram_size; current_machine->ram_slots =3D ram_slots; current_machine->boot_order =3D boot_order; - current_machine->cpu_model =3D cpu_model; =20 parse_numa_opts(current_machine); =20 @@ -4619,6 +4618,13 @@ int main(int argc, char **argv, char **envp) if (cpu_model) { current_machine->cpu_type =3D cpu_parse_cpu_model(machine_class->default_cpu_type, cpu_m= odel); + + /* machine 'none' depends on default cpu type pointer not being + * equal to resolved type name pointer to fugure out if type w= as + * user provided, make sure that if it becomes not true in fut= ure + * it won't beark silently */ + g_assert( + current_machine->cpu_type !=3D machine_class->default_cpu_= type); } } =20 --=20 2.7.4 From nobody Sat Oct 25 23:37:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516204798990972.9471887511523; Wed, 17 Jan 2018 07:59:58 -0800 (PST) Received: from localhost ([::1]:44261 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebq86-00081i-5m for importer@patchew.org; Wed, 17 Jan 2018 10:59:58 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55740) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpum-0005fV-ET for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:46:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpug-0000PG-Gb for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:46:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57856) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebpug-0000Nj-7E for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:46:06 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 39611935B8; Wed, 17 Jan 2018 15:46:05 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 456E84BA; Wed, 17 Jan 2018 15:46:02 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 16:43:33 +0100 Message-Id: <1516203816-19374-22-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 17 Jan 2018 15:46:05 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 21/24] linux/bsd-user: drop cpu_init() and use cpu_create() instead X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" *-user were the last users of cpu_init() macro, which were used to create a cpu instance using cpu_model name. Now since all targets provide TARGET_DEFAULT_CPU_TYPE, cpu_init() can be replaced with one call: cpu_type =3D cpu_parse_cpu_model(TARGET_DEFAULT_CPU_TYPE, cpu_model) when '-cpu' CLI option is parsed and cpu =3D create_cpu(cpu_type) whenever a cpu instance needs to be created. Also drop ifdef-ed definitions of default cpu_model and use target provided TARGET_DEFAULT_CPU_TYPE for it, this way linux/bsd-user targets will become consistent in handling defaults and won't go out off sync as it happened current code. Signed-off-by: Igor Mammedov --- CC: Riku Voipio CC: Laurent Vivier --- bsd-user/main.c | 26 ++++---------------------- linux-user/main.c | 46 +++++----------------------------------------- 2 files changed, 9 insertions(+), 63 deletions(-) diff --git a/bsd-user/main.c b/bsd-user/main.c index efef5ff..d52ff22 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -722,7 +722,7 @@ void init_task_state(TaskState *ts) int main(int argc, char **argv) { const char *filename; - const char *cpu_model; + const char *cpu_type =3D TARGET_DEFAULT_CPU_TYPE; const char *log_file =3D NULL; const char *log_mask =3D NULL; struct target_pt_regs regs1, *regs =3D ®s1; @@ -752,8 +752,6 @@ int main(int argc, char **argv) (void) envlist_setenv(envlist, *wrk); } =20 - cpu_model =3D NULL; - qemu_add_opts(&qemu_trace_opts); =20 optind =3D 1; @@ -811,7 +809,7 @@ int main(int argc, char **argv) } else if (!strcmp(r, "r")) { qemu_uname_release =3D argv[optind++]; } else if (!strcmp(r, "cpu")) { - cpu_model =3D argv[optind++]; + const char *cpu_model =3D argv[optind++]; if (is_help_option(cpu_model)) { /* XXX: implement xxx_cpu_list for targets that still miss it */ #if defined(cpu_list) @@ -819,6 +817,7 @@ int main(int argc, char **argv) #endif exit(1); } + cpu_type =3D cpu_parse_cpu_model(TARGET_DEFAULT_CPU_TYPE, cpu_= model); } else if (!strcmp(r, "B")) { guest_base =3D strtol(argv[optind++], NULL, 0); have_guest_base =3D 1; @@ -880,27 +879,10 @@ int main(int argc, char **argv) /* Scan interp_prefix dir for replacement files. */ init_paths(interp_prefix); =20 - if (cpu_model =3D=3D NULL) { -#if defined(TARGET_I386) -#ifdef TARGET_X86_64 - cpu_model =3D "qemu64"; -#else - cpu_model =3D "qemu32"; -#endif -#elif defined(TARGET_SPARC) -#ifdef TARGET_SPARC64 - cpu_model =3D "TI UltraSparc II"; -#else - cpu_model =3D "Fujitsu MB86904"; -#endif -#else - cpu_model =3D "any"; -#endif - } tcg_exec_init(0); /* NOTE: we need to init the CPU at this stage to get qemu_host_page_size */ - cpu =3D cpu_init(cpu_model); + cpu =3D cpu_create(cpu_type); env =3D cpu->env_ptr; #if defined(TARGET_SPARC) || defined(TARGET_PPC) cpu_reset(cpu); diff --git a/linux-user/main.c b/linux-user/main.c index 1cd5033..4624cc9 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -43,7 +43,7 @@ static const char *filename; static const char *argv0; static int gdbstub_port; static envlist_t *envlist; -static const char *cpu_model; +static const char *cpu_type =3D TARGET_DEFAULT_CPU_TYPE; unsigned long mmap_min_addr; unsigned long guest_base; int have_guest_base; @@ -3847,7 +3847,7 @@ void init_task_state(TaskState *ts) CPUArchState *cpu_copy(CPUArchState *env) { CPUState *cpu =3D ENV_GET_CPU(env); - CPUState *new_cpu =3D cpu_init(cpu_model); + CPUState *new_cpu =3D cpu_create(cpu_type); CPUArchState *new_env =3D new_cpu->env_ptr; CPUBreakpoint *bp; CPUWatchpoint *wp; @@ -3982,7 +3982,7 @@ static void handle_arg_uname(const char *arg) =20 static void handle_arg_cpu(const char *arg) { - cpu_model =3D strdup(arg); + const char *cpu_model =3D strdup(arg); if (cpu_model =3D=3D NULL || is_help_option(cpu_model)) { /* XXX: implement xxx_cpu_list for targets that still miss it */ #if defined(cpu_list) @@ -3990,6 +3990,7 @@ static void handle_arg_cpu(const char *arg) #endif exit(EXIT_FAILURE); } + cpu_type =3D cpu_parse_cpu_model(TARGET_DEFAULT_CPU_TYPE, cpu_model); } =20 static void handle_arg_guest_base(const char *arg) @@ -4292,8 +4293,6 @@ int main(int argc, char **argv, char **envp) } } =20 - cpu_model =3D NULL; - srand(time(NULL)); =20 qemu_add_opts(&qemu_trace_opts); @@ -4318,45 +4317,10 @@ int main(int argc, char **argv, char **envp) =20 init_qemu_uname_release(); =20 - if (cpu_model =3D=3D NULL) { -#if defined(TARGET_I386) -#ifdef TARGET_X86_64 - cpu_model =3D "qemu64"; -#else - cpu_model =3D "qemu32"; -#endif -#elif defined(TARGET_SPARC) -#ifdef TARGET_SPARC64 - cpu_model =3D "TI UltraSparc II"; -#else - cpu_model =3D "Fujitsu MB86904"; -#endif -#elif defined(TARGET_MIPS) -#if defined(TARGET_ABI_MIPSN32) || defined(TARGET_ABI_MIPSN64) - cpu_model =3D "5KEf"; -#else - cpu_model =3D "24Kf"; -#endif -#elif defined TARGET_OPENRISC - cpu_model =3D "or1200"; -#elif defined(TARGET_PPC) -# ifdef TARGET_PPC64 - cpu_model =3D "power8_v2.0"; -# else - cpu_model =3D "750_v3.1"; -# endif -#elif defined TARGET_SH4 - cpu_model =3D "sh7785"; -#elif defined TARGET_S390X - cpu_model =3D "qemu"; -#else - cpu_model =3D "any"; -#endif - } tcg_exec_init(0); /* NOTE: we need to init the CPU at this stage to get qemu_host_page_size */ - cpu =3D cpu_init(cpu_model); + cpu =3D cpu_create(cpu_type); env =3D cpu->env_ptr; cpu_reset(cpu); =20 --=20 2.7.4 From nobody Sat Oct 25 23:37:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516205567800963.0332621411584; Wed, 17 Jan 2018 08:12:47 -0800 (PST) Received: from localhost ([::1]:45086 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebqKQ-0003h6-0J for importer@patchew.org; Wed, 17 Jan 2018 11:12:42 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpv1-0005qn-FA for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:46:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpuz-00010U-KI for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:46:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34498) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebput-0000cA-39; Wed, 17 Jan 2018 10:46:19 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6214E7C83B; Wed, 17 Jan 2018 15:46:12 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 72C644C4; Wed, 17 Jan 2018 15:46:04 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 16:43:34 +0100 Message-Id: <1516203816-19374-23-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 17 Jan 2018 15:46:18 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 22/24] cpu: get rid of unused cpu_init() defines X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Anthony Green , Mark Cave-Ayland , Max Filippov , "Edgar E. Iglesias" , Guan Xuetao , Yongbok Kim , Marek Vasut , Alexander Graf , Richard Henderson , Artyom Tarasenko , Eduardo Habkost , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Stafford Horne , David Gibson , Bastian Koppelmann , Chris Wulff , Laurent Vivier , Michael Walle , qemu-ppc@nongnu.org, Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" cpu_init(cpu_model) were replaced by cpu_create(cpu_type) so no users are left, remove it. Signed-off-by: Igor Mammedov Acked-by: David Gibson Reviewed-by: Eduardo Habkost --- CC: Richard Henderson (maintainer:Alpha) CC: Peter Maydell CC: "Edgar E. Iglesias" CC: Eduardo Habkost CC: Michael Walle CC: Laurent Vivier CC: Aurelien Jarno CC: Yongbok Kim CC: Anthony Green CC: Chris Wulff CC: Marek Vasut CC: Stafford Horne CC: David Gibson CC: Alexander Graf CC: Mark Cave-Ayland CC: Artyom Tarasenko CC: Bastian Koppelmann CC: Guan Xuetao CC: Max Filippov CC: qemu-arm@nongnu.org CC: qemu-ppc@nongnu.org CC: qemu-s390x@nongnu.org --- target/alpha/cpu.h | 2 -- target/arm/cpu.h | 2 -- target/cris/cpu.h | 2 -- target/hppa/cpu.h | 1 - target/i386/cpu.h | 2 -- target/lm32/cpu.h | 2 -- target/m68k/cpu.h | 2 -- target/microblaze/cpu.h | 1 - target/mips/cpu.h | 2 -- target/moxie/cpu.h | 2 -- target/nios2/cpu.h | 1 - target/openrisc/cpu.h | 2 -- target/ppc/cpu.h | 2 -- target/s390x/cpu.h | 2 -- target/sh4/cpu.h | 2 -- target/sparc/cpu.h | 4 ---- target/tilegx/cpu.h | 1 - target/tricore/cpu.h | 2 -- target/unicore32/cpu.h | 2 -- target/xtensa/cpu.h | 2 -- 20 files changed, 38 deletions(-) diff --git a/target/alpha/cpu.h b/target/alpha/cpu.h index c8dd560..1a1d9a0 100644 --- a/target/alpha/cpu.h +++ b/target/alpha/cpu.h @@ -468,8 +468,6 @@ enum { =20 void alpha_translate_init(void); =20 -#define cpu_init(cpu_model) cpu_generic_init(TYPE_ALPHA_CPU, cpu_model) - #define ALPHA_CPU_TYPE_SUFFIX "-" TYPE_ALPHA_CPU #define ALPHA_CPU_TYPE_NAME(model) model ALPHA_CPU_TYPE_SUFFIX #define TARGET_DEFAULT_CPU_TYPE ALPHA_CPU_TYPE_NAME("ev67") diff --git a/target/arm/cpu.h b/target/arm/cpu.h index c87bb76..3c1e1aa 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -2167,8 +2167,6 @@ static inline bool arm_excp_unmasked(CPUState *cs, un= signed int excp_idx, return unmasked || pstate_unmasked; } =20 -#define cpu_init(cpu_model) cpu_generic_init(TYPE_ARM_CPU, cpu_model) - #define ARM_CPU_TYPE_SUFFIX "-" TYPE_ARM_CPU #define ARM_CPU_TYPE_NAME(name) (name ARM_CPU_TYPE_SUFFIX) #define TARGET_DEFAULT_CPU_TYPE ARM_CPU_TYPE_NAME("any") diff --git a/target/cris/cpu.h b/target/cris/cpu.h index 8feabb4..9845d89 100644 --- a/target/cris/cpu.h +++ b/target/cris/cpu.h @@ -267,8 +267,6 @@ enum { #define TARGET_PHYS_ADDR_SPACE_BITS 32 #define TARGET_VIRT_ADDR_SPACE_BITS 32 =20 -#define cpu_init(cpu_model) cpu_generic_init(TYPE_CRIS_CPU, cpu_model) - #define CRIS_CPU_TYPE_SUFFIX "-" TYPE_CRIS_CPU #define CRIS_CPU_TYPE_NAME(name) (name CRIS_CPU_TYPE_SUFFIX) #define TARGET_DEFAULT_CPU_TYPE CRIS_CPU_TYPE_NAME("crisv32") diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h index 04625f7..7a6074e 100644 --- a/target/hppa/cpu.h +++ b/target/hppa/cpu.h @@ -112,7 +112,6 @@ static inline int cpu_mmu_index(CPUHPPAState *env, bool= ifetch) =20 void hppa_translate_init(void); =20 -#define cpu_init(cpu_model) cpu_generic_init(TYPE_HPPA_CPU, cpu_model) #define TARGET_DEFAULT_CPU_TYPE TYPE_HPPA_CPU =20 void hppa_cpu_list(FILE *f, fprintf_function cpu_fprintf); diff --git a/target/i386/cpu.h b/target/i386/cpu.h index f64e5ed..0b4563b 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -1557,8 +1557,6 @@ uint64_t cpu_get_tsc(CPUX86State *env); =20 #define PHYS_ADDR_MASK MAKE_64BIT_MASK(0, TCG_PHYS_ADDR_BITS) =20 -#define cpu_init(cpu_model) cpu_generic_init(TYPE_X86_CPU, cpu_model) - #define X86_CPU_TYPE_SUFFIX "-" TYPE_X86_CPU #define X86_CPU_TYPE_NAME(name) (name X86_CPU_TYPE_SUFFIX) =20 diff --git a/target/lm32/cpu.h b/target/lm32/cpu.h index 65f58f5..ec9efa7 100644 --- a/target/lm32/cpu.h +++ b/target/lm32/cpu.h @@ -255,8 +255,6 @@ void lm32_watchpoint_insert(CPULM32State *env, int inde= x, target_ulong address, void lm32_watchpoint_remove(CPULM32State *env, int index); bool lm32_cpu_do_semihosting(CPUState *cs); =20 -#define cpu_init(cpu_model) cpu_generic_init(TYPE_LM32_CPU, cpu_model) - #define LM32_CPU_TYPE_SUFFIX "-" TYPE_LM32_CPU #define LM32_CPU_TYPE_NAME(model) model LM32_CPU_TYPE_SUFFIX #define TARGET_DEFAULT_CPU_TYPE LM32_CPU_TYPE_NAME("lm32-basic") diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h index 193e8f8..da4171c 100644 --- a/target/m68k/cpu.h +++ b/target/m68k/cpu.h @@ -401,8 +401,6 @@ void register_m68k_insns (CPUM68KState *env); #define TARGET_PHYS_ADDR_SPACE_BITS 32 #define TARGET_VIRT_ADDR_SPACE_BITS 32 =20 -#define cpu_init(cpu_model) cpu_generic_init(TYPE_M68K_CPU, cpu_model) - #define M68K_CPU_TYPE_SUFFIX "-" TYPE_M68K_CPU #define M68K_CPU_TYPE_NAME(model) model M68K_CPU_TYPE_SUFFIX #define TARGET_DEFAULT_CPU_TYPE M68K_CPU_TYPE_NAME("any") diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index f244efa..3ad1016 100644 --- a/target/microblaze/cpu.h +++ b/target/microblaze/cpu.h @@ -343,7 +343,6 @@ int cpu_mb_signal_handler(int host_signum, void *pinfo, #define TARGET_PHYS_ADDR_SPACE_BITS 32 #define TARGET_VIRT_ADDR_SPACE_BITS 32 =20 -#define cpu_init(cpu_model) cpu_generic_init(TYPE_MICROBLAZE_CPU, cpu_mode= l) #define TARGET_DEFAULT_CPU_TYPE TYPE_MICROBLAZE_CPU =20 #define cpu_signal_handler cpu_mb_signal_handler diff --git a/target/mips/cpu.h b/target/mips/cpu.h index c5ee894..7c66ec0 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -739,8 +739,6 @@ enum { =20 int cpu_mips_signal_handler(int host_signum, void *pinfo, void *puc); =20 -#define cpu_init(cpu_model) cpu_generic_init(TYPE_MIPS_CPU, cpu_model) - #define MIPS_CPU_TYPE_SUFFIX "-" TYPE_MIPS_CPU #define MIPS_CPU_TYPE_NAME(model) model MIPS_CPU_TYPE_SUFFIX =20 diff --git a/target/moxie/cpu.h b/target/moxie/cpu.h index 9fabb93..a3a1bba 100644 --- a/target/moxie/cpu.h +++ b/target/moxie/cpu.h @@ -120,8 +120,6 @@ void moxie_translate_init(void); int cpu_moxie_signal_handler(int host_signum, void *pinfo, void *puc); =20 -#define cpu_init(cpu_model) cpu_generic_init(TYPE_MOXIE_CPU, cpu_model) - #define MOXIE_CPU_TYPE_SUFFIX "-" TYPE_MOXIE_CPU #define MOXIE_CPU_TYPE_NAME(model) model MOXIE_CPU_TYPE_SUFFIX #define TARGET_DEFAULT_CPU_TYPE MOXIE_CPU_TYPE_NAME("any") diff --git a/target/nios2/cpu.h b/target/nios2/cpu.h index 2d03958..71a48b1 100644 --- a/target/nios2/cpu.h +++ b/target/nios2/cpu.h @@ -231,7 +231,6 @@ void nios2_check_interrupts(CPUNios2State *env); # define TARGET_VIRT_ADDR_SPACE_BITS 32 #endif =20 -#define cpu_init(cpu_model) cpu_generic_init(TYPE_NIOS2_CPU, cpu_model) #define TARGET_DEFAULT_CPU_TYPE TYPE_NIOS2_CPU =20 #define cpu_gen_code cpu_nios2_gen_code diff --git a/target/openrisc/cpu.h b/target/openrisc/cpu.h index 8d1a87e..f2d2abb 100644 --- a/target/openrisc/cpu.h +++ b/target/openrisc/cpu.h @@ -390,8 +390,6 @@ int cpu_openrisc_get_phys_data(OpenRISCCPU *cpu, int *prot, target_ulong address, int rw); #endif =20 -#define cpu_init(cpu_model) cpu_generic_init(TYPE_OPENRISC_CPU, cpu_model) - #define OPENRISC_CPU_TYPE_SUFFIX "-" TYPE_OPENRISC_CPU #define OPENRISC_CPU_TYPE_NAME(model) model OPENRISC_CPU_TYPE_SUFFIX #define TARGET_DEFAULT_CPU_TYPE OPENRISC_CPU_TYPE_NAME("or1200") diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 4af4aff..3dc0359 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -1372,8 +1372,6 @@ static inline uint64_t ppc_dump_gpr(CPUPPCState *env,= int gprn) int ppc_dcr_read (ppc_dcr_t *dcr_env, int dcrn, uint32_t *valp); int ppc_dcr_write (ppc_dcr_t *dcr_env, int dcrn, uint32_t val); =20 -#define cpu_init(cpu_model) cpu_generic_init(TYPE_POWERPC_CPU, cpu_model) - #define POWERPC_CPU_TYPE_SUFFIX "-" TYPE_POWERPC_CPU #define POWERPC_CPU_TYPE_NAME(model) model POWERPC_CPU_TYPE_SUFFIX =20 diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index 174624a..3e647df 100644 --- a/target/s390x/cpu.h +++ b/target/s390x/cpu.h @@ -727,8 +727,6 @@ void s390_set_qemu_cpu_model(uint16_t type, uint8_t gen= , uint8_t ec_ga, =20 =20 /* helper.c */ -#define cpu_init(cpu_model) cpu_generic_init(TYPE_S390_CPU, cpu_model) - #define S390_CPU_TYPE_SUFFIX "-" TYPE_S390_CPU #define S390_CPU_TYPE_NAME(name) (name S390_CPU_TYPE_SUFFIX) #define TARGET_DEFAULT_CPU_TYPE S390_CPU_TYPE_NAME("qemu") diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h index 203d212..ad58e24 100644 --- a/target/sh4/cpu.h +++ b/target/sh4/cpu.h @@ -274,8 +274,6 @@ int cpu_sh4_is_cached(CPUSH4State * env, target_ulong a= ddr); =20 void cpu_load_tlb(CPUSH4State * env); =20 -#define cpu_init(cpu_model) cpu_generic_init(TYPE_SUPERH_CPU, cpu_model) - #define SUPERH_CPU_TYPE_SUFFIX "-" TYPE_SUPERH_CPU #define SUPERH_CPU_TYPE_NAME(model) model SUPERH_CPU_TYPE_SUFFIX #define TARGET_DEFAULT_CPU_TYPE SUPERH_CPU_TYPE_NAME("sh7785") diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index 02c55ad..54b3dc7 100644 --- a/target/sparc/cpu.h +++ b/target/sparc/cpu.h @@ -654,10 +654,6 @@ hwaddr cpu_get_phys_page_nofault(CPUSPARCState *env, t= arget_ulong addr, #endif int cpu_sparc_signal_handler(int host_signum, void *pinfo, void *puc); =20 -#ifndef NO_CPU_IO_DEFS -#define cpu_init(cpu_model) cpu_generic_init(TYPE_SPARC_CPU, cpu_model) -#endif - #define SPARC_CPU_TYPE_SUFFIX "-" TYPE_SPARC_CPU #define SPARC_CPU_TYPE_NAME(model) model SPARC_CPU_TYPE_SUFFIX =20 diff --git a/target/tilegx/cpu.h b/target/tilegx/cpu.h index 67de53e..6c89b05 100644 --- a/target/tilegx/cpu.h +++ b/target/tilegx/cpu.h @@ -164,7 +164,6 @@ static inline TileGXCPU *tilegx_env_get_cpu(CPUTLGState= *env) void tilegx_tcg_init(void); int cpu_tilegx_signal_handler(int host_signum, void *pinfo, void *puc); =20 -#define cpu_init(cpu_model) cpu_generic_init(TYPE_TILEGX_CPU, cpu_model) #define TARGET_DEFAULT_CPU_TYPE TYPE_TILEGX_CPU =20 #define cpu_signal_handler cpu_tilegx_signal_handler diff --git a/target/tricore/cpu.h b/target/tricore/cpu.h index 835d51a..8ed17e0 100644 --- a/target/tricore/cpu.h +++ b/target/tricore/cpu.h @@ -411,8 +411,6 @@ static inline void cpu_get_tb_cpu_state(CPUTriCoreState= *env, target_ulong *pc, *flags =3D 0; } =20 -#define cpu_init(cpu_model) cpu_generic_init(TYPE_TRICORE_CPU, cpu_model) - #define TRICORE_CPU_TYPE_SUFFIX "-" TYPE_TRICORE_CPU #define TRICORE_CPU_TYPE_NAME(model) model TRICORE_CPU_TYPE_SUFFIX #define TARGET_DEFAULT_CPU_TYPE TRICORE_CPU_TYPE_NAME("tc1796") diff --git a/target/unicore32/cpu.h b/target/unicore32/cpu.h index fd3fa81..91b673a 100644 --- a/target/unicore32/cpu.h +++ b/target/unicore32/cpu.h @@ -165,8 +165,6 @@ static inline int cpu_mmu_index(CPUUniCore32State *env,= bool ifetch) =20 #include "exec/cpu-all.h" =20 -#define cpu_init(cpu_model) cpu_generic_init(TYPE_UNICORE32_CPU, cpu_model) - #define UNICORE32_CPU_TYPE_SUFFIX "-" TYPE_UNICORE32_CPU #define UNICORE32_CPU_TYPE_NAME(model) model UNICORE32_CPU_TYPE_SUFFIX #define TARGET_DEFAULT_CPU_TYPE UNICORE32_CPU_TYPE_NAME("any") diff --git a/target/xtensa/cpu.h b/target/xtensa/cpu.h index 537e151..c21acf9 100644 --- a/target/xtensa/cpu.h +++ b/target/xtensa/cpu.h @@ -508,8 +508,6 @@ void xtensa_cpu_do_unaligned_access(CPUState *cpu, vadd= r addr, #endif #define TARGET_DEFAULT_CPU_TYPE XTENSA_CPU_TYPE_NAME(XTENSA_DEFAULT_CPU_MO= DEL) =20 -#define cpu_init(cpu_model) cpu_generic_init(TYPE_XTENSA_CPU, cpu_model) - void xtensa_translate_init(void); void xtensa_breakpoint_handler(CPUState *cs); void xtensa_finalize_config(XtensaConfig *config); --=20 2.7.4 From nobody Sat Oct 25 23:37:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516204992374327.9719764791597; Wed, 17 Jan 2018 08:03:12 -0800 (PST) Received: from localhost ([::1]:44298 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebqBC-0002IN-K5 for importer@patchew.org; Wed, 17 Jan 2018 11:03:10 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55837) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpuy-0005oQ-C2 for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:46:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpuu-0000gr-1G for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:46:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59180) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebput-0000eG-Ro for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:46:19 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C6E7DCD003; Wed, 17 Jan 2018 15:46:18 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id A7D514A5; Wed, 17 Jan 2018 15:46:12 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 16:43:35 +0100 Message-Id: <1516203816-19374-24-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 17 Jan 2018 15:46:18 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 23/24] nios2: 10m50_devboard: replace cpu_model with cpu_type X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marek Vasut , Chris Wulff , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" use cpu_create() instead of being removed cpu_generic_init() Signed-off-by: Igor Mammedov --- CC: Chris Wulff CC: Marek Vasut --- hw/nios2/10m50_devboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/nios2/10m50_devboard.c b/hw/nios2/10m50_devboard.c index e4007f6..42053b2 100644 --- a/hw/nios2/10m50_devboard.c +++ b/hw/nios2/10m50_devboard.c @@ -75,7 +75,7 @@ static void nios2_10m50_ghrd_init(MachineState *machine) phys_ram_alias); =20 /* Create CPU -- FIXME */ - cpu =3D NIOS2_CPU(cpu_generic_init(TYPE_NIOS2_CPU, "nios2")); + cpu =3D NIOS2_CPU(cpu_create(TYPE_NIOS2_CPU)); =20 /* Register: CPU interrupt controller (PIC) */ cpu_irq =3D nios2_cpu_pic_init(cpu); --=20 2.7.4 From nobody Sat Oct 25 23:37:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516205037709812.0221343316672; Wed, 17 Jan 2018 08:03:57 -0800 (PST) Received: from localhost ([::1]:44313 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebqBv-0002rv-SZ for importer@patchew.org; Wed, 17 Jan 2018 11:03:55 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpv0-0005q5-MP for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:46:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpuw-0000n9-Im for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:46:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48282) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebpuw-0000km-9d for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:46:22 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1AFC47EA93; Wed, 17 Jan 2018 15:46:21 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id F39E94A7; Wed, 17 Jan 2018 15:46:13 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 16:43:36 +0100 Message-Id: <1516203816-19374-25-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 17 Jan 2018 15:46:21 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 24/24] cpu: get rid of cpu_generic_init() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , Richard Henderson , Laurent Vivier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Emilio G. Cota" , Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" There aren't any users of the helper left, remove it. Signed-off-by: Igor Mammedov --- CC: Richard Henderson CC: "Emilio G. Cota" CC: Paolo Bonzini CC: Eduardo Habkost CC: "Alex Benn=C3=A9e" CC: "Philippe Mathieu-Daud=C3=A9" --- include/qom/cpu.h | 11 ----------- qom/cpu.c | 25 ++----------------------- 2 files changed, 2 insertions(+), 34 deletions(-) diff --git a/include/qom/cpu.h b/include/qom/cpu.h index 93bd546..5446040 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -673,17 +673,6 @@ CPUState *cpu_create(const char *typename); const char *cpu_parse_cpu_model(const char *typename, const char *cpu_mode= l); =20 /** - * cpu_generic_init: - * @typename: The CPU base type. - * @cpu_model: The model string including optional parameters. - * - * Instantiates a CPU, processes optional parameters and realizes the CPU. - * - * Returns: A #CPUState or %NULL if an error occurred. - */ -CPUState *cpu_generic_init(const char *typename, const char *cpu_model); - -/** * cpu_has_work: * @cpu: The vCPU to check. * diff --git a/qom/cpu.c b/qom/cpu.c index e42d9a7..7ab7c36 100644 --- a/qom/cpu.c +++ b/qom/cpu.c @@ -90,14 +90,6 @@ const char *cpu_parse_cpu_model(const char *typename, co= nst char *cpu_model) return cpu_type; } =20 -CPUState *cpu_generic_init(const char *typename, const char *cpu_model) -{ - /* TODO: all callers of cpu_generic_init() need to be converted to - * call cpu_parse_features() only once, before calling cpu_generic_ini= t(). - */ - return cpu_create(cpu_parse_cpu_model(typename, cpu_model)); -} - bool cpu_paging_enabled(const CPUState *cpu) { CPUClass *cc =3D CPU_GET_CLASS(cpu); @@ -335,22 +327,9 @@ static ObjectClass *cpu_common_class_by_name(const cha= r *cpu_model) static void cpu_common_parse_features(const char *typename, char *features, Error **errp) { - char *featurestr; /* Single "key=3Dvalue" string being parsed */ char *val; - static bool cpu_globals_initialized; - - /* TODO: all callers of ->parse_features() need to be changed to - * call it only once, so we can remove this check (or change it - * to assert(!cpu_globals_initialized). - * Current callers of ->parse_features() are: - * - cpu_generic_init() - */ - if (cpu_globals_initialized) { - return; - } - cpu_globals_initialized =3D true; - - featurestr =3D features ? strtok(features, ",") : NULL; + /* Single "key=3Dvalue" string being parsed */ + char *featurestr =3D features ? strtok(features, ",") : NULL; =20 while (featurestr) { val =3D strchr(featurestr, '=3D'); --=20 2.7.4