From nobody Sat May 4 12:22:25 2024 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 1516695364813803.3847283584428; Tue, 23 Jan 2018 00:16:04 -0800 (PST) Received: from localhost ([::1]:43848 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtkP-0003rB-NQ for importer@patchew.org; Tue, 23 Jan 2018 03:16:04 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54817) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtey-0007Oq-CD for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edtet-0001vu-PV for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43314) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edtel-0001m3-9J; Tue, 23 Jan 2018 03:10:11 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 33D572576B; Tue, 23 Jan 2018 08:10:10 +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 29ACCD1F4; Tue, 23 Jan 2018 08:10:07 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:00 +0100 Message-Id: <1516694904-64879-2-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 23 Jan 2018 08:10:10 +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 v3 01/25] 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 , Eduardo Habkost , Chris Wulff , Laurent Vivier , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@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" use cpu_create() instead of being removed cpu_generic_init() Signed-off-by: Igor Mammedov Reviewed-by: Eduardo Habkost --- 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 May 4 12:22:25 2024 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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516695165888170.2381816912167; Tue, 23 Jan 2018 00:12:45 -0800 (PST) Received: from localhost ([::1]:43822 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edth4-0000hT-QF for importer@patchew.org; Tue, 23 Jan 2018 03:12:34 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54684) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edter-0007Gk-1B for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edteq-0001tI-1u for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46550) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edten-0001qQ-6z; Tue, 23 Jan 2018 03:10:13 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D73C3C058EDC; Tue, 23 Jan 2018 08:10:11 +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 7CA6DD1E7; Tue, 23 Jan 2018 08:10:10 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:01 +0100 Message-Id: <1516694904-64879-3-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 23 Jan 2018 08:10:11 +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 v3 02/25] tests: add machine 'none' with -cpu test 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: qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, 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" Check that "$QEMU -M none -cpu FOO" starts QEMU without error Signed-off-by: Igor Mammedov --- v2: - rename file to machine-none-test.c (Thomas Huth ) - use qtest_startf()/instead of qtest_start() (Thomas Huth ) --- tests/Makefile.include | 2 ++ tests/machine-none-test.c | 68 +++++++++++++++++++++++++++++++++++++++++++= ++++ 2 files changed, 70 insertions(+) create mode 100644 tests/machine-none-test.c diff --git a/tests/Makefile.include b/tests/Makefile.include index 8883274..ea0a803 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -380,6 +380,7 @@ check-qtest-s390x-y +=3D tests/virtio-balloon-test$(EXE= SUF) check-qtest-s390x-y +=3D tests/virtio-console-test$(EXESUF) check-qtest-s390x-y +=3D tests/virtio-serial-test$(EXESUF) =20 +check-qtest-generic-y +=3D tests/machine-none-test$(EXESUF) check-qtest-generic-y +=3D tests/qom-test$(EXESUF) check-qtest-generic-y +=3D tests/test-hmp$(EXESUF) =20 @@ -782,6 +783,7 @@ tests/display-vga-test$(EXESUF): tests/display-vga-test= .o tests/ipoctal232-test$(EXESUF): tests/ipoctal232-test.o tests/qom-test$(EXESUF): tests/qom-test.o tests/test-hmp$(EXESUF): tests/test-hmp.o +tests/machine-none-test$(EXESUF): tests/machine-none-test.o tests/drive_del-test$(EXESUF): tests/drive_del-test.o $(libqos-virtio-obj-= y) tests/qdev-monitor-test$(EXESUF): tests/qdev-monitor-test.o $(libqos-pc-ob= j-y) tests/nvme-test$(EXESUF): tests/nvme-test.o diff --git a/tests/machine-none-test.c b/tests/machine-none-test.c new file mode 100644 index 0000000..2eb13e8 --- /dev/null +++ b/tests/machine-none-test.c @@ -0,0 +1,68 @@ +/* + * Machine 'none' tests. + * + * Copyright (c) 2018 Red Hat Inc. + * + * Authors: + * Igor Mammedov , + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. + */ + +#include "qemu/osdep.h" + +#include "qemu-common.h" +#include "qemu/cutils.h" +#include "libqtest.h" +#include "qapi/qmp/types.h" + +struct arch2cpu { + const char *arch; + const char *cpu_model; +}; + +static struct arch2cpu cpus_map[] =3D { + /* tested targets list */ +}; + +static const char *get_cpu_model_by_arch(const char *arch) +{ + int i; + + for (i =3D 0; i < ARRAY_SIZE(cpus_map); i++) { + if (!strcmp(arch, cpus_map[i].arch)) { + return cpus_map[i].cpu_model; + } + } + return NULL; +} + +static void test_machine_cpu_cli(void) +{ + QDict *response; + const char *arch =3D qtest_get_arch(); + const char *cpu_model =3D get_cpu_model_by_arch(arch); + + if (!cpu_model) { + fprintf(stderr, "WARNING: cpu name for target '%s' isn't defined," + " add it to cpus_map\n", arch); + return; /* TODO: die here to force all targets have a test */ + } + global_qtest =3D qtest_startf("-machine none -cpu %s", cpu_model); + + response =3D qmp("{ 'execute': 'quit' }"); + g_assert(qdict_haskey(response, "return")); + QDECREF(response); + + qtest_quit(global_qtest); +} + +int main(int argc, char **argv) +{ + g_test_init(&argc, &argv, NULL); + + qtest_add_func("machine/none/cpu_option", test_machine_cpu_cli); + + return g_test_run(); +} --=20 2.7.4 From nobody Sat May 4 12:22:25 2024 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 1516695174950325.3694820669931; Tue, 23 Jan 2018 00:12:54 -0800 (PST) Received: from localhost ([::1]:43824 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edthI-0000tn-66 for importer@patchew.org; Tue, 23 Jan 2018 03:12:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54711) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtes-0007Ho-3h for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edteq-0001tf-Sb for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52110) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edteo-0001ry-Jn; Tue, 23 Jan 2018 03:10:14 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D2C0415557; Tue, 23 Jan 2018 08:10:13 +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 2C0A5D1D1; Tue, 23 Jan 2018 08:10:12 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:02 +0100 Message-Id: <1516694904-64879-4-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 23 Jan 2018 08:10:13 +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 v3 03/25] arm: cpu: add CPU_RESOLVING_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 , Eduardo Habkost , Laurent Vivier , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@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 providing to cpu name resolving class for parsing cpu model for system and user emulation code. Along with change add target to null-machine test, so that when switch to CPU_RESOLVING_TYPE happens, thest would ensure that null-mchine usecase still works. Signed-off-by: Igor Mammedov --- CC: qemu-arm@nongnu.org CC: Peter Maydell CC: Andrew Jones --- target/arm/cpu.h | 1 + linux-user/main.c | 2 -- tests/machine-none-test.c | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 9631670..f9fb141 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 CPU_RESOLVING_TYPE TYPE_ARM_CPU =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) diff --git a/tests/machine-none-test.c b/tests/machine-none-test.c index 2eb13e8..1b213ff 100644 --- a/tests/machine-none-test.c +++ b/tests/machine-none-test.c @@ -24,6 +24,8 @@ struct arch2cpu { =20 static struct arch2cpu cpus_map[] =3D { /* tested targets list */ + { "arm", "cortex-a15" }, + { "aarch64", "cortex-a15" }, }; =20 static const char *get_cpu_model_by_arch(const char *arch) --=20 2.7.4 From nobody Sat May 4 12:22:25 2024 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 151669534968016.75527332557533; Tue, 23 Jan 2018 00:15:49 -0800 (PST) Received: from localhost ([::1]:43847 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtkC-0003ew-SJ for importer@patchew.org; Tue, 23 Jan 2018 03:15:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54750) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtet-0007Ji-Du for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edtes-0001v9-Il for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35930) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edteq-0001ss-8T; Tue, 23 Jan 2018 03:10:16 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 75645820F3; Tue, 23 Jan 2018 08:10:15 +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 265FD63F94; Tue, 23 Jan 2018 08:10:13 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:03 +0100 Message-Id: <1516694904-64879-5-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 23 Jan 2018 08:10:15 +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 v3 04/25] x86: cpu: add CPU_RESOLVING_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: qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, 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 for providing to cpu name resolving class for parsing cpu model for system and user emulation code. Along with change add target to null-machine test, so that when switch to CPU_RESOLVING_TYPE happens, test would ensure that null-mchine usecase still works. Signed-off-by: Igor Mammedov --- CC: Eduardo Habkost --- target/i386/cpu.h | 1 + tests/machine-none-test.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 30cc562..82c7381 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -1568,6 +1568,7 @@ uint64_t cpu_get_tsc(CPUX86State *env); =20 #define X86_CPU_TYPE_SUFFIX "-" TYPE_X86_CPU #define X86_CPU_TYPE_NAME(name) (name X86_CPU_TYPE_SUFFIX) +#define CPU_RESOLVING_TYPE TYPE_X86_CPU =20 #ifdef TARGET_X86_64 #define TARGET_DEFAULT_CPU_TYPE X86_CPU_TYPE_NAME("qemu64") diff --git a/tests/machine-none-test.c b/tests/machine-none-test.c index 1b213ff..4b704fb 100644 --- a/tests/machine-none-test.c +++ b/tests/machine-none-test.c @@ -26,6 +26,8 @@ static struct arch2cpu cpus_map[] =3D { /* tested targets list */ { "arm", "cortex-a15" }, { "aarch64", "cortex-a15" }, + { "x86_64", "qemu64,apic-id=3D0" }, + { "i386", "qemu32,apic-id=3D0" }, }; =20 static const char *get_cpu_model_by_arch(const char *arch) --=20 2.7.4 From nobody Sat May 4 12:22:25 2024 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 1516695198789870.8274335466145; Tue, 23 Jan 2018 00:13:18 -0800 (PST) Received: from localhost ([::1]:43825 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edthl-0001Ib-TD for importer@patchew.org; Tue, 23 Jan 2018 03:13:18 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54873) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtez-0007Q7-LF for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edtey-0001xh-CF for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36636) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edtes-0001uK-7r; Tue, 23 Jan 2018 03:10:18 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 508598F885; Tue, 23 Jan 2018 08:10:17 +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 BD5F29CCB; Tue, 23 Jan 2018 08:10:15 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:04 +0100 Message-Id: <1516694904-64879-6-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 23 Jan 2018 08:10:17 +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 v3 05/25] alpha: cpu: add CPU_RESOLVING_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: Eduardo Habkost , Laurent Vivier , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, 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 providing to cpu name resolving class for parsing cpu model for system and user emulation code. Along with change add target to null-machine test, so that when switch to CPU_RESOLVING_TYPE happens, test would ensure that null-mchine usecase still works. Signed-off-by: Igor Mammedov --- CC: Richard Henderson --- target/alpha/cpu.h | 1 + tests/machine-none-test.c | 1 + 2 files changed, 2 insertions(+) diff --git a/target/alpha/cpu.h b/target/alpha/cpu.h index 0a9ad35..21ed5d6 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 CPU_RESOLVING_TYPE TYPE_ALPHA_CPU =20 void alpha_cpu_list(FILE *f, fprintf_function cpu_fprintf); /* you can call this signal handler from your SIGBUS and SIGSEGV diff --git a/tests/machine-none-test.c b/tests/machine-none-test.c index 4b704fb..5d23ade 100644 --- a/tests/machine-none-test.c +++ b/tests/machine-none-test.c @@ -28,6 +28,7 @@ static struct arch2cpu cpus_map[] =3D { { "aarch64", "cortex-a15" }, { "x86_64", "qemu64,apic-id=3D0" }, { "i386", "qemu32,apic-id=3D0" }, + { "alpha", "ev67" }, }; =20 static const char *get_cpu_model_by_arch(const char *arch) --=20 2.7.4 From nobody Sat May 4 12:22:25 2024 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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516695571728743.6008504441506; Tue, 23 Jan 2018 00:19:31 -0800 (PST) Received: from localhost ([::1]:43891 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtnm-0006mX-VK for importer@patchew.org; Tue, 23 Jan 2018 03:19:31 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtf3-0007TN-G0 for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edtez-0001yu-HP for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35964) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edtet-0001vb-Qy; Tue, 23 Jan 2018 03:10:19 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1945E7653B; Tue, 23 Jan 2018 08:10:19 +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 979459CCB; Tue, 23 Jan 2018 08:10:17 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:05 +0100 Message-Id: <1516694904-64879-7-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 23 Jan 2018 08:10:19 +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 v3 06/25] cris: cpu: add CPU_RESOLVING_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: Eduardo Habkost , Laurent Vivier , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, "Edgar E. Iglesias" 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 providing to cpu name resolving class for parsing cpu model for system and user emulation code. Along with change add target to null-machine test, so that when switch to CPU_RESOLVING_TYPE happens, test would ensure that null-mchine usecase still works. Signed-off-by: Igor Mammedov --- CC: "Edgar E. Iglesias" --- target/cris/cpu.h | 1 + tests/machine-none-test.c | 1 + 2 files changed, 2 insertions(+) diff --git a/target/cris/cpu.h b/target/cris/cpu.h index b64fa35..1a27653 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 CPU_RESOLVING_TYPE TYPE_CRIS_CPU =20 #define cpu_signal_handler cpu_cris_signal_handler =20 diff --git a/tests/machine-none-test.c b/tests/machine-none-test.c index 5d23ade..68f7a30 100644 --- a/tests/machine-none-test.c +++ b/tests/machine-none-test.c @@ -29,6 +29,7 @@ static struct arch2cpu cpus_map[] =3D { { "x86_64", "qemu64,apic-id=3D0" }, { "i386", "qemu32,apic-id=3D0" }, { "alpha", "ev67" }, + { "cris", "crisv32" }, }; =20 static const char *get_cpu_model_by_arch(const char *arch) --=20 2.7.4 From nobody Sat May 4 12:22:25 2024 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 1516695165932325.72257680214193; Tue, 23 Jan 2018 00:12:45 -0800 (PST) Received: from localhost ([::1]:43823 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edthE-0000qd-TX for importer@patchew.org; Tue, 23 Jan 2018 03:12:44 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtf0-0007Qc-TL for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edtez-0001z6-Nh for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35982) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edtev-0001wU-Oh; Tue, 23 Jan 2018 03:10:21 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EE2AD883AE; Tue, 23 Jan 2018 08:10:20 +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 60A989CCB; Tue, 23 Jan 2018 08:10:19 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:06 +0100 Message-Id: <1516694904-64879-8-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 23 Jan 2018 08:10:21 +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 v3 07/25] lm32: cpu: add CPU_RESOLVING_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: Eduardo Habkost , qemu-s390x@nongnu.org, Laurent Vivier , Michael Walle , qemu-arm@nongnu.org, qemu-ppc@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 providing to cpu name resolving class for parsing cpu model for system and user emulation code. Along with change add target to null-machine test, so that when switch to CPU_RESOLVING_TYPE happens, test would ensure that null-mchine usecase still works. Signed-off-by: Igor Mammedov --- CC: Michael Walle --- target/lm32/cpu.h | 1 + tests/machine-none-test.c | 1 + 2 files changed, 2 insertions(+) diff --git a/target/lm32/cpu.h b/target/lm32/cpu.h index 2279594..0656052 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 CPU_RESOLVING_TYPE TYPE_LM32_CPU =20 #define cpu_list lm32_cpu_list #define cpu_signal_handler cpu_lm32_signal_handler diff --git a/tests/machine-none-test.c b/tests/machine-none-test.c index 68f7a30..1159290 100644 --- a/tests/machine-none-test.c +++ b/tests/machine-none-test.c @@ -30,6 +30,7 @@ static struct arch2cpu cpus_map[] =3D { { "i386", "qemu32,apic-id=3D0" }, { "alpha", "ev67" }, { "cris", "crisv32" }, + { "lm32", "lm32-full" }, }; =20 static const char *get_cpu_model_by_arch(const char *arch) --=20 2.7.4 From nobody Sat May 4 12:22:25 2024 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 1516695635197929.5294315424809; Tue, 23 Jan 2018 00:20:35 -0800 (PST) Received: from localhost ([::1]:43892 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtom-0007ac-6l for importer@patchew.org; Tue, 23 Jan 2018 03:20:32 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtf4-0007Uw-O8 for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edtf2-00020U-Cu for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52176) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edtex-0001x3-Aq; Tue, 23 Jan 2018 03:10:23 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9196113A9A; Tue, 23 Jan 2018 08:10: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 42814D1EC; Tue, 23 Jan 2018 08:10:21 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:07 +0100 Message-Id: <1516694904-64879-9-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 23 Jan 2018 08:10: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 v3 08/25] m68k: cpu: add CPU_RESOLVING_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: qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, 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 for providing to cpu name resolving class for parsing cpu model for system and user emulation code. Along with change add target to null-machine test, so that when switch to CPU_RESOLVING_TYPE happens, test would ensure that null-mchine usecase still works. Signed-off-by: Igor Mammedov Reviewed-by: Laurent Vivier --- CC: Laurent Vivier --- target/m68k/cpu.h | 1 + tests/machine-none-test.c | 1 + 2 files changed, 2 insertions(+) diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h index 2985b03..8a4299a 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 CPU_RESOLVING_TYPE TYPE_M68K_CPU =20 #define cpu_signal_handler cpu_m68k_signal_handler #define cpu_list m68k_cpu_list diff --git a/tests/machine-none-test.c b/tests/machine-none-test.c index 1159290..c9445b6 100644 --- a/tests/machine-none-test.c +++ b/tests/machine-none-test.c @@ -31,6 +31,7 @@ static struct arch2cpu cpus_map[] =3D { { "alpha", "ev67" }, { "cris", "crisv32" }, { "lm32", "lm32-full" }, + { "m68k", "m5206" }, }; =20 static const char *get_cpu_model_by_arch(const char *arch) --=20 2.7.4 From nobody Sat May 4 12:22:25 2024 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 1516695573136518.9720170241203; Tue, 23 Jan 2018 00:19:33 -0800 (PST) Received: from localhost ([::1]:43890 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtnf-0006bu-TH for importer@patchew.org; Tue, 23 Jan 2018 03:19:23 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtf3-0007TU-LW for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edtf2-00020t-Dk for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56834) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edtez-0001yF-60; Tue, 23 Jan 2018 03:10:25 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5953981DF3; Tue, 23 Jan 2018 08:10:24 +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 D99DDD1EC; Tue, 23 Jan 2018 08:10:22 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:08 +0100 Message-Id: <1516694904-64879-10-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 23 Jan 2018 08:10:24 +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 v3 09/25] microblaze: cpu: add CPU_RESOLVING_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: Eduardo Habkost , Laurent Vivier , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, "Edgar E. Iglesias" 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 providing to cpu name resolving class for parsing cpu model for system and user emulation code. PC: target cpu can't be instantiated with -M none -cpu Add FIXME note in test, so microblaze maintainers could fix it in future and add proper error checking in cpu_model resolver which accepts any junk now. Signed-off-by: Igor Mammedov --- CC: "Edgar E. Iglesias" --- target/microblaze/cpu.h | 1 + tests/machine-none-test.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index 52b6b6a..492f9f7 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 CPU_RESOLVING_TYPE TYPE_MICROBLAZE_CPU =20 #define cpu_signal_handler cpu_mb_signal_handler =20 diff --git a/tests/machine-none-test.c b/tests/machine-none-test.c index c9445b6..984def6 100644 --- a/tests/machine-none-test.c +++ b/tests/machine-none-test.c @@ -32,6 +32,8 @@ static struct arch2cpu cpus_map[] =3D { { "cris", "crisv32" }, { "lm32", "lm32-full" }, { "m68k", "m5206" }, + /* FIXME: { "microblaze", "any" }, doesn't work with -M none -cpu any = */ + /* FIXME: { "microblazeel", "any" }, doesn't work with -M none -cpu an= y */ }; =20 static const char *get_cpu_model_by_arch(const char *arch) --=20 2.7.4 From nobody Sat May 4 12:22:25 2024 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 15166958253216.163562799675901; Tue, 23 Jan 2018 00:23:45 -0800 (PST) Received: from localhost ([::1]:43933 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtrs-0001sd-3A for importer@patchew.org; Tue, 23 Jan 2018 03:23:44 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55106) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtf9-0007bn-Fr for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edtf4-00022J-MN for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52198) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edtf1-0001zw-OM; Tue, 23 Jan 2018 03:10:27 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C3F7219CF8E; Tue, 23 Jan 2018 08:10:26 +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 A37FBD1D1; Tue, 23 Jan 2018 08:10:24 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:09 +0100 Message-Id: <1516694904-64879-11-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 23 Jan 2018 08:10: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 v3 10/25] mips: cpu: add CPU_RESOLVING_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: Eduardo Habkost , Laurent Vivier , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Yongbok Kim , 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 providing to cpu name resolving class for parsing cpu model for system and user emulation code. Along with change add target to null-machine test, so that when switch to CPU_RESOLVING_TYPE happens, test would ensure that null-mchine usecase still works. Signed-off-by: Igor Mammedov --- CC: Aurelien Jarno CC: Yongbok Kim --- target/mips/cpu.h | 1 + tests/machine-none-test.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/target/mips/cpu.h b/target/mips/cpu.h index 7f8ba5f..0fcbfb3 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -743,6 +743,7 @@ int cpu_mips_signal_handler(int host_signum, void *pinf= o, void *puc); =20 #define MIPS_CPU_TYPE_SUFFIX "-" TYPE_MIPS_CPU #define MIPS_CPU_TYPE_NAME(model) model MIPS_CPU_TYPE_SUFFIX +#define CPU_RESOLVING_TYPE TYPE_MIPS_CPU =20 bool cpu_supports_cps_smp(const char *cpu_type); bool cpu_supports_isa(const char *cpu_type, unsigned int isa); diff --git a/tests/machine-none-test.c b/tests/machine-none-test.c index 984def6..9bc6a06 100644 --- a/tests/machine-none-test.c +++ b/tests/machine-none-test.c @@ -34,6 +34,10 @@ static struct arch2cpu cpus_map[] =3D { { "m68k", "m5206" }, /* FIXME: { "microblaze", "any" }, doesn't work with -M none -cpu any = */ /* FIXME: { "microblazeel", "any" }, doesn't work with -M none -cpu an= y */ + { "mips", "4Kc" }, + { "mipsel", "4Kc" }, + { "mips64", "20Kc" }, + { "mips64el", "20Kc" }, }; =20 static const char *get_cpu_model_by_arch(const char *arch) --=20 2.7.4 From nobody Sat May 4 12:22:25 2024 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 1516695366443151.38320963865772; Tue, 23 Jan 2018 00:16:06 -0800 (PST) Received: from localhost ([::1]:43849 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtkT-0003sK-Mm for importer@patchew.org; Tue, 23 Jan 2018 03:16:05 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtfA-0007d1-EC for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edtf9-00024k-6d for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49454) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edtf3-000214-BI; Tue, 23 Jan 2018 03:10:29 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8EAE04E90B; Tue, 23 Jan 2018 08:10: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 189C663F94; Tue, 23 Jan 2018 08:10:26 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:10 +0100 Message-Id: <1516694904-64879-12-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 23 Jan 2018 08:10: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 v3 11/25] moxie: cpu: add CPU_RESOLVING_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: Eduardo Habkost , Anthony Green , Laurent Vivier , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@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 providing to cpu name resolving class for parsing cpu model for system and user emulation code. Along with change add target to null-machine test, so that when switch to CPU_RESOLVING_TYPE happens, test would ensure that null-mchine usecase still works. Signed-off-by: Igor Mammedov --- CC: Anthony Green --- target/moxie/cpu.h | 1 + tests/machine-none-test.c | 1 + 2 files changed, 2 insertions(+) diff --git a/target/moxie/cpu.h b/target/moxie/cpu.h index d37e6a5..3f94a5a 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 CPU_RESOLVING_TYPE TYPE_MOXIE_CPU =20 #define cpu_signal_handler cpu_moxie_signal_handler =20 diff --git a/tests/machine-none-test.c b/tests/machine-none-test.c index 9bc6a06..c15a857 100644 --- a/tests/machine-none-test.c +++ b/tests/machine-none-test.c @@ -38,6 +38,7 @@ static struct arch2cpu cpus_map[] =3D { { "mipsel", "4Kc" }, { "mips64", "20Kc" }, { "mips64el", "20Kc" }, + { "moxie", "MoxieLite" }, }; =20 static const char *get_cpu_model_by_arch(const char *arch) --=20 2.7.4 From nobody Sat May 4 12:22:25 2024 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 1516695761763268.0962216410369; Tue, 23 Jan 2018 00:22:41 -0800 (PST) Received: from localhost ([::1]:43927 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtqq-0000y9-Pg for importer@patchew.org; Tue, 23 Jan 2018 03:22:40 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtfB-0007ew-OS for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edtfA-00026Q-Iu for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41523) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edtf5-00022r-Ef; Tue, 23 Jan 2018 03:10:31 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A519F13AAB; Tue, 23 Jan 2018 08:10:30 +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 D74599CCB; Tue, 23 Jan 2018 08:10:28 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:11 +0100 Message-Id: <1516694904-64879-13-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 23 Jan 2018 08:10:30 +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 v3 12/25] nios2: cpu: add CPU_RESOLVING_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 , Eduardo Habkost , Chris Wulff , Laurent Vivier , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@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 providing to cpu name resolving class for parsing cpu model for system and user emulation code. Along with change add target to null-machine test, so that when switch to CPU_RESOLVING_TYPE happens, test would ensure that null-mchine usecase still works. TODO: make nios2_cpu_class_by_name() to do name check instead of accepting anything Signed-off-by: Igor Mammedov --- CC: Chris Wulff CC: Marek Vasut --- target/nios2/cpu.h | 1 + tests/machine-none-test.c | 1 + 2 files changed, 2 insertions(+) diff --git a/target/nios2/cpu.h b/target/nios2/cpu.h index 88823a6..2234bff 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 CPU_RESOLVING_TYPE TYPE_NIOS2_CPU =20 #define cpu_gen_code cpu_nios2_gen_code #define cpu_signal_handler cpu_nios2_signal_handler diff --git a/tests/machine-none-test.c b/tests/machine-none-test.c index c15a857..c6ad495 100644 --- a/tests/machine-none-test.c +++ b/tests/machine-none-test.c @@ -39,6 +39,7 @@ static struct arch2cpu cpus_map[] =3D { { "mips64", "20Kc" }, { "mips64el", "20Kc" }, { "moxie", "MoxieLite" }, + { "nios2", "FIXME" }, }; =20 static const char *get_cpu_model_by_arch(const char *arch) --=20 2.7.4 From nobody Sat May 4 12:22:25 2024 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 1516696146537348.19349676442414; Tue, 23 Jan 2018 00:29:06 -0800 (PST) Received: from localhost ([::1]:43990 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtx3-0006fV-M4 for importer@patchew.org; Tue, 23 Jan 2018 03:29:05 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtfJ-0007qM-8l for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edtfF-0002AD-7K for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49508) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edtf7-00023j-74; Tue, 23 Jan 2018 03:10:33 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6D7264E90B; Tue, 23 Jan 2018 08:10: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 EC8009CCB; Tue, 23 Jan 2018 08:10:30 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:12 +0100 Message-Id: <1516694904-64879-14-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 23 Jan 2018 08:10: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 v3 13/25] openrisc: cpu: add CPU_RESOLVING_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: Eduardo Habkost , Laurent Vivier , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Stafford Horne 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 providing to cpu name resolving class for parsing cpu model for system and user emulation code. Along with change add target to null-machine test, so that when switch to CPU_RESOLVING_TYPE happens, test would ensure that null-mchine usecase still works. Signed-off-by: Igor Mammedov --- CC: Stafford Horne --- target/openrisc/cpu.h | 1 + tests/machine-none-test.c | 1 + 2 files changed, 2 insertions(+) diff --git a/target/openrisc/cpu.h b/target/openrisc/cpu.h index cc22dc8..9b32ea4 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 CPU_RESOLVING_TYPE TYPE_OPENRISC_CPU =20 #include "exec/cpu-all.h" =20 diff --git a/tests/machine-none-test.c b/tests/machine-none-test.c index c6ad495..160aa13 100644 --- a/tests/machine-none-test.c +++ b/tests/machine-none-test.c @@ -40,6 +40,7 @@ static struct arch2cpu cpus_map[] =3D { { "mips64el", "20Kc" }, { "moxie", "MoxieLite" }, { "nios2", "FIXME" }, + { "or1k", "or1200" }, }; =20 static const char *get_cpu_model_by_arch(const char *arch) --=20 2.7.4 From nobody Sat May 4 12:22:25 2024 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 1516695952539460.45680637821613; Tue, 23 Jan 2018 00:25:52 -0800 (PST) Received: from localhost ([::1]:43963 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edttv-0003q4-Mp for importer@patchew.org; Tue, 23 Jan 2018 03:25:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55280) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtfD-0007iR-Mu for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edtfC-00028H-QH for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52328) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edtf9-000250-V5; Tue, 23 Jan 2018 03:10:36 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D090B3DE3F; Tue, 23 Jan 2018 08:10:34 +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 B69859CCB; Tue, 23 Jan 2018 08:10:32 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:13 +0100 Message-Id: <1516694904-64879-15-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 23 Jan 2018 08:10: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 v3 14/25] ppc: cpu: add CPU_RESOLVING_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: Eduardo Habkost , Laurent Vivier , Alexander Graf , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, 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 providing to cpu name resolving class for parsing cpu model for system and user emulation code. Along with change add target to null-machine test, so that when switch to CPU_RESOLVING_TYPE happens, test would ensure that null-mchine usecase still works. Signed-off-by: Igor Mammedov Acked-by: David Gibson --- CC: Laurent Vivier CC: David Gibson CC: Alexander Graf CC: qemu-ppc@nongnu.org --- target/ppc/cpu.h | 1 + tests/machine-none-test.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 603a38c..d5f2f3d 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -1380,6 +1380,7 @@ int ppc_dcr_write (ppc_dcr_t *dcr_env, int dcrn, uint= 32_t val); =20 #define POWERPC_CPU_TYPE_SUFFIX "-" TYPE_POWERPC_CPU #define POWERPC_CPU_TYPE_NAME(model) model POWERPC_CPU_TYPE_SUFFIX +#define CPU_RESOLVING_TYPE TYPE_POWERPC_CPU =20 #define cpu_signal_handler cpu_ppc_signal_handler #define cpu_list ppc_cpu_list diff --git a/tests/machine-none-test.c b/tests/machine-none-test.c index 160aa13..052b8c0 100644 --- a/tests/machine-none-test.c +++ b/tests/machine-none-test.c @@ -41,6 +41,9 @@ static struct arch2cpu cpus_map[] =3D { { "moxie", "MoxieLite" }, { "nios2", "FIXME" }, { "or1k", "or1200" }, + { "ppc", "604" }, + { "ppc64", "power8e_v2.1" }, + { "ppcemb", "440epb" }, }; =20 static const char *get_cpu_model_by_arch(const char *arch) --=20 2.7.4 From nobody Sat May 4 12:22:25 2024 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 1516695796732326.52279589384693; Tue, 23 Jan 2018 00:23:16 -0800 (PST) Received: from localhost ([::1]:43928 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtrP-0001TV-Vm for importer@patchew.org; Tue, 23 Jan 2018 03:23:16 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtfE-0007jk-N9 for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edtfD-00029B-SM for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49578) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edtfB-00026l-L1; Tue, 23 Jan 2018 03:10:37 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BE1F24900C; Tue, 23 Jan 2018 08:10:36 +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 21CE7D1E8; Tue, 23 Jan 2018 08:10:34 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:14 +0100 Message-Id: <1516694904-64879-16-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 23 Jan 2018 08:10:36 +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 v3 15/25] s390x: cpu: add CPU_RESOLVING_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: Eduardo Habkost , Laurent Vivier , Alexander Graf , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, 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 providing to cpu name resolving class for parsing cpu model for system and user emulation code. Along with change add target to null-machine test, so that when switch to CPU_RESOLVING_TYPE happens, test would ensure that null-mchine usecase still works. Signed-off-by: Igor Mammedov --- CC: Richard Henderson CC: Alexander Graf CC: qemu-s390x@nongnu.org --- target/s390x/cpu.h | 1 + tests/machine-none-test.c | 1 + 2 files changed, 2 insertions(+) diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index 1a8b6b9..b2121cb 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 CPU_RESOLVING_TYPE TYPE_S390_CPU =20 /* you can call this signal handler from your SIGBUS and SIGSEGV signal handlers to inform the virtual CPU of exceptions. non zero diff --git a/tests/machine-none-test.c b/tests/machine-none-test.c index 052b8c0..b3a346d 100644 --- a/tests/machine-none-test.c +++ b/tests/machine-none-test.c @@ -44,6 +44,7 @@ static struct arch2cpu cpus_map[] =3D { { "ppc", "604" }, { "ppc64", "power8e_v2.1" }, { "ppcemb", "440epb" }, + { "s390x", "qemu" }, }; =20 static const char *get_cpu_model_by_arch(const char *arch) --=20 2.7.4 From nobody Sat May 4 12:22:25 2024 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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 15166955742105.609949954980834; Tue, 23 Jan 2018 00:19:34 -0800 (PST) Received: from localhost ([::1]:43889 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtnb-0006Z6-9i for importer@patchew.org; Tue, 23 Jan 2018 03:19:19 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55441) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtfK-0007sK-PF for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edtfJ-0002CT-Dp for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52382) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edtfD-000289-A7; Tue, 23 Jan 2018 03:10:39 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8744313A9A; Tue, 23 Jan 2018 08:10:38 +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 12EB8D1E8; Tue, 23 Jan 2018 08:10:36 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:15 +0100 Message-Id: <1516694904-64879-17-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 23 Jan 2018 08:10:38 +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 v3 16/25] sh4: cpu: add CPU_RESOLVING_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: Eduardo Habkost , Laurent Vivier , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, 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" it will be used for providing to cpu name resolving class for parsing cpu model for system and user emulation code. Along with change add target to null-machine test, so that when switch to CPU_RESOLVING_TYPE happens, test would ensure that null-mchine usecase still works. Signed-off-by: Igor Mammedov --- CC: Aurelien Jarno --- target/sh4/cpu.h | 1 + tests/machine-none-test.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h index a2c26e0..709e0ca 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 CPU_RESOLVING_TYPE TYPE_SUPERH_CPU =20 #define cpu_signal_handler cpu_sh4_signal_handler #define cpu_list sh4_cpu_list diff --git a/tests/machine-none-test.c b/tests/machine-none-test.c index b3a346d..134036a 100644 --- a/tests/machine-none-test.c +++ b/tests/machine-none-test.c @@ -45,6 +45,8 @@ static struct arch2cpu cpus_map[] =3D { { "ppc64", "power8e_v2.1" }, { "ppcemb", "440epb" }, { "s390x", "qemu" }, + { "sh4", "sh7750r" }, + { "sh4eb", "sh7751r" }, }; =20 static const char *get_cpu_model_by_arch(const char *arch) --=20 2.7.4 From nobody Sat May 4 12:22:25 2024 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 1516696426321773.8352704874533; Tue, 23 Jan 2018 00:33:46 -0800 (PST) Received: from localhost ([::1]:44727 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edu1Z-0002VD-0m for importer@patchew.org; Tue, 23 Jan 2018 03:33:45 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtfL-0007tw-Ne for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edtfK-0002DS-ML for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46854) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edtfF-0002A1-HD; Tue, 23 Jan 2018 03:10:41 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AEAF4C0587C3; Tue, 23 Jan 2018 08:10:40 +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 D0890D1F0; Tue, 23 Jan 2018 08:10:38 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:16 +0100 Message-Id: <1516694904-64879-18-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 23 Jan 2018 08:10: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 v3 17/25] sparc: cpu: add CPU_RESOLVING_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: Eduardo Habkost , Mark Cave-Ayland , Laurent Vivier , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, 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 providing to cpu name resolving class for parsing cpu model for system and user emulation code. Along with change add target to null-machine test, so that when switch to CPU_RESOLVING_TYPE happens, test would ensure that null-mchine usecase still works. PS: sparc cpu model names might have spaces, add quotes around cpu model name when creating CLI so QEMU could find cpu. Signed-off-by: Igor Mammedov --- CC: Mark Cave-Ayland CC: Artyom Tarasenko --- target/sparc/cpu.h | 1 + tests/machine-none-test.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index 9fde547..345b39a 100644 --- a/target/sparc/cpu.h +++ b/target/sparc/cpu.h @@ -660,6 +660,7 @@ int cpu_sparc_signal_handler(int host_signum, void *pin= fo, void *puc); =20 #define SPARC_CPU_TYPE_SUFFIX "-" TYPE_SPARC_CPU #define SPARC_CPU_TYPE_NAME(model) model SPARC_CPU_TYPE_SUFFIX +#define CPU_RESOLVING_TYPE TYPE_SPARC_CPU =20 #define cpu_signal_handler cpu_sparc_signal_handler #define cpu_list sparc_cpu_list diff --git a/tests/machine-none-test.c b/tests/machine-none-test.c index 134036a..0f80d7b 100644 --- a/tests/machine-none-test.c +++ b/tests/machine-none-test.c @@ -47,6 +47,8 @@ static struct arch2cpu cpus_map[] =3D { { "s390x", "qemu" }, { "sh4", "sh7750r" }, { "sh4eb", "sh7751r" }, + { "sparc", "LEON2" }, + { "sparc64", "Fujitsu Sparc64" }, }; =20 static const char *get_cpu_model_by_arch(const char *arch) @@ -72,7 +74,7 @@ static void test_machine_cpu_cli(void) " add it to cpus_map\n", arch); return; /* TODO: die here to force all targets have a test */ } - global_qtest =3D qtest_startf("-machine none -cpu %s", cpu_model); + global_qtest =3D qtest_startf("-machine none -cpu '%s'", cpu_model); =20 response =3D qmp("{ 'execute': 'quit' }"); g_assert(qdict_haskey(response, "return")); --=20 2.7.4 From nobody Sat May 4 12:22:25 2024 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 1516696319960196.8647953897888; Tue, 23 Jan 2018 00:31:59 -0800 (PST) Received: from localhost ([::1]:44288 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtzr-0000th-5w for importer@patchew.org; Tue, 23 Jan 2018 03:31:59 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55495) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtfL-0007uM-TZ for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edtfK-0002DK-Hv for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43624) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edtfH-0002Av-D1; Tue, 23 Jan 2018 03:10:43 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 972BD51473; Tue, 23 Jan 2018 08:10: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 EC7F463F94; Tue, 23 Jan 2018 08:10:40 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:17 +0100 Message-Id: <1516694904-64879-19-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 23 Jan 2018 08:10: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 v3 18/25] tricore: cpu: add CPU_RESOLVING_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: Eduardo Habkost , Bastian Koppelmann , Laurent Vivier , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@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 providing to cpu name resolving class for parsing cpu model for system and user emulation code. Along with change add target to null-machine test, so that when switch to CPU_RESOLVING_TYPE happens, test would ensure that null-mchine usecase still works. Signed-off-by: Igor Mammedov Acked-by: Bastian Koppelmann --- CC: Bastian Koppelmann --- target/tricore/cpu.h | 1 + tests/machine-none-test.c | 1 + 2 files changed, 2 insertions(+) diff --git a/target/tricore/cpu.h b/target/tricore/cpu.h index f41d2ce..a2ef632 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 CPU_RESOLVING_TYPE TYPE_TRICORE_CPU =20 /* helpers.c */ int cpu_tricore_handle_mmu_fault(CPUState *cpu, target_ulong address, diff --git a/tests/machine-none-test.c b/tests/machine-none-test.c index 0f80d7b..0430b06 100644 --- a/tests/machine-none-test.c +++ b/tests/machine-none-test.c @@ -49,6 +49,7 @@ static struct arch2cpu cpus_map[] =3D { { "sh4eb", "sh7751r" }, { "sparc", "LEON2" }, { "sparc64", "Fujitsu Sparc64" }, + { "tricore", "tc1796" }, }; =20 static const char *get_cpu_model_by_arch(const char *arch) --=20 2.7.4 From nobody Sat May 4 12:22:25 2024 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 1516695738060363.495149562052; Tue, 23 Jan 2018 00:22:18 -0800 (PST) Received: from localhost ([::1]:43925 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtqT-0000dJ-9p for importer@patchew.org; Tue, 23 Jan 2018 03:22:17 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtfN-0007xh-T3 for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edtfM-0002F4-R8 for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52478) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edtfK-0002CO-1x; Tue, 23 Jan 2018 03:10:46 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 05BD6552C7; Tue, 23 Jan 2018 08:10: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 E0D2FD1E7; Tue, 23 Jan 2018 08:10:42 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:18 +0100 Message-Id: <1516694904-64879-20-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 23 Jan 2018 08:10:45 +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 v3 19/25] unicore32: cpu: add CPU_RESOLVING_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: Eduardo Habkost , Laurent Vivier , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Guan Xuetao 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 providing to cpu name resolving class for parsing cpu model for system and user emulation code. Along with change add target to null-machine test, so that when switch to CPU_RESOLVING_TYPE happens, test would ensure that null-mchine usecase still works. Signed-off-by: Igor Mammedov --- CC: Laurent Vivier CC: Guan Xuetao --- target/unicore32/cpu.h | 1 + tests/machine-none-test.c | 1 + 2 files changed, 2 insertions(+) diff --git a/target/unicore32/cpu.h b/target/unicore32/cpu.h index 3dc6fbc..9644b07 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 CPU_RESOLVING_TYPE TYPE_UNICORE32_CPU =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/tests/machine-none-test.c b/tests/machine-none-test.c index 0430b06..a8a499e 100644 --- a/tests/machine-none-test.c +++ b/tests/machine-none-test.c @@ -50,6 +50,7 @@ static struct arch2cpu cpus_map[] =3D { { "sparc", "LEON2" }, { "sparc64", "Fujitsu Sparc64" }, { "tricore", "tc1796" }, + { "unicore32", "UniCore-II" }, }; =20 static const char *get_cpu_model_by_arch(const char *arch) --=20 2.7.4 From nobody Sat May 4 12:22:25 2024 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 1516696040310443.1992820796004; Tue, 23 Jan 2018 00:27:20 -0800 (PST) Received: from localhost ([::1]:43979 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtvL-00054z-Hc for importer@patchew.org; Tue, 23 Jan 2018 03:27:19 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtfO-0007ys-KQ for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edtfN-0002Fi-Qn for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52498) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edtfL-0002Do-JW; Tue, 23 Jan 2018 03:10:47 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C9D0413AAB; Tue, 23 Jan 2018 08:10:46 +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 4E9B0D1E7; Tue, 23 Jan 2018 08:10:45 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:19 +0100 Message-Id: <1516694904-64879-21-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 23 Jan 2018 08:10:46 +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 v3 20/25] xtensa: cpu: add CPU_RESOLVING_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: Eduardo Habkost , Laurent Vivier , Max Filippov , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@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 providing to cpu name resolving class for parsing cpu model for system and user emulation code. Along with change add target to null-machine test, so that when switch to CPU_RESOLVING_TYPE happens, test would ensure that null-mchine usecase still works. Signed-off-by: Igor Mammedov --- CC: Max Filippov --- target/xtensa/cpu.h | 1 + tests/machine-none-test.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/target/xtensa/cpu.h b/target/xtensa/cpu.h index d9404aa..23dbd45 100644 --- a/target/xtensa/cpu.h +++ b/target/xtensa/cpu.h @@ -500,6 +500,7 @@ void xtensa_cpu_do_unaligned_access(CPUState *cpu, vadd= r addr, =20 #define XTENSA_CPU_TYPE_SUFFIX "-" TYPE_XTENSA_CPU #define XTENSA_CPU_TYPE_NAME(model) model XTENSA_CPU_TYPE_SUFFIX +#define CPU_RESOLVING_TYPE TYPE_XTENSA_CPU =20 #ifdef TARGET_WORDS_BIGENDIAN #define XTENSA_DEFAULT_CPU_MODEL "fsf" diff --git a/tests/machine-none-test.c b/tests/machine-none-test.c index a8a499e..a1e9980 100644 --- a/tests/machine-none-test.c +++ b/tests/machine-none-test.c @@ -51,6 +51,8 @@ static struct arch2cpu cpus_map[] =3D { { "sparc64", "Fujitsu Sparc64" }, { "tricore", "tc1796" }, { "unicore32", "UniCore-II" }, + { "xtensa", "dc233c" }, + { "xtensaeb", "fsf" }, }; =20 static const char *get_cpu_model_by_arch(const char *arch) --=20 2.7.4 From nobody Sat May 4 12:22:25 2024 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 1516695937288942.0341087145841; Tue, 23 Jan 2018 00:25:37 -0800 (PST) Received: from localhost ([::1]:43949 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edttZ-0003RS-G6 for importer@patchew.org; Tue, 23 Jan 2018 03:25:29 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtfT-00086v-WE for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edtfP-0002H9-Gb for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52524) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edtfN-0002Ev-Dk; Tue, 23 Jan 2018 03:10:49 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 91F743DE3F; Tue, 23 Jan 2018 08:10:48 +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 1C8A3D1E7; Tue, 23 Jan 2018 08:10:46 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:20 +0100 Message-Id: <1516694904-64879-22-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 23 Jan 2018 08:10: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 v3 21/25] hppa: cpu: add CPU_RESOLVING_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: Eduardo Habkost , Laurent Vivier , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, 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 providing to cpu name resolving class for parsing cpu model for system and user emulation code. Along with change add target to null-machine test, so that when switch to CPU_RESOLVING_TYPE happens, test would ensure that null-mchine usecase still works. 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..b92ae3f 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 CPU_RESOLVING_TYPE TYPE_HPPA_CPU =20 void hppa_cpu_list(FILE *f, fprintf_function cpu_fprintf); =20 --=20 2.7.4 From nobody Sat May 4 12:22:25 2024 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 1516696108850799.5448888347103; Tue, 23 Jan 2018 00:28:28 -0800 (PST) Received: from localhost ([::1]:43984 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtwS-00068J-3a for importer@patchew.org; Tue, 23 Jan 2018 03:28:28 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55740) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtfV-000898-Uq for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edtfV-0002Ke-55 for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57188) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edtfP-0002GE-0e; Tue, 23 Jan 2018 03:10:51 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 34C9E8125C; Tue, 23 Jan 2018 08:10: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 DB5CAD1E7; Tue, 23 Jan 2018 08:10:48 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:21 +0100 Message-Id: <1516694904-64879-23-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 23 Jan 2018 08:10: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 v3 22/25] tilegx: cpu: add CPU_RESOLVING_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: qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, 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 for providing to cpu name resolving class for parsing cpu model for system and user emulation code. Along with change add target to null-machine test, so that when switch to CPU_RESOLVING_TYPE happens, test would ensure that null-mchine usecase still works. 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..a73215e 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 CPU_RESOLVING_TYPE TYPE_TILEGX_CPU =20 #define cpu_signal_handler cpu_tilegx_signal_handler =20 --=20 2.7.4 From nobody Sat May 4 12:22:25 2024 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 1516696075734783.5494388468233; Tue, 23 Jan 2018 00:27:55 -0800 (PST) Received: from localhost ([::1]:43983 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtvu-0005cP-Tc for importer@patchew.org; Tue, 23 Jan 2018 03:27:54 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtfX-0008BV-CJ for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:11:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edtfV-0002L8-Rh for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:10:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43718) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edtfQ-0002IR-PF; Tue, 23 Jan 2018 03:10:52 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 075C061E53; Tue, 23 Jan 2018 08:10: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 7E4F1D1F2; Tue, 23 Jan 2018 08:10:50 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:22 +0100 Message-Id: <1516694904-64879-24-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 23 Jan 2018 08:10: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 v3 23/25] Use cpu_create(type) instead of cpu_init(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: qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, 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" With all targets defining CPU_RESOLVING_TYPE, refactor cpu_parse_cpu_model(type, cpu_model) to parse_cpu_model(cpu_model) so that callers won't have to know internal resolving cpu type. Place it in exec.c so it could be called from both target independed vl.c and *-user/main.c. That allows us to stop abusing cpu type from MachineClass::default_cpu_type as resolver class in vl.c which were confusing part of cpu_parse_cpu_model(). Also with new parse_cpu_model(), the last users of cpu_init() in null-machine.c and bsd/linux-user targets could be switched to cpu_create() API and cpu_init() API will be removed by follow up patch. Signed-off-by: Igor Mammedov --- include/qom/cpu.h | 16 ++-------------- bsd-user/main.c | 4 +++- exec.c | 23 +++++++++++++++++++++++ hw/core/null-machine.c | 6 +++--- linux-user/main.c | 8 ++++++-- qom/cpu.c | 31 ------------------------------- vl.c | 10 +++------- 7 files changed, 40 insertions(+), 58 deletions(-) diff --git a/include/qom/cpu.h b/include/qom/cpu.h index 93bd546..0185589 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -661,8 +661,7 @@ ObjectClass *cpu_class_by_name(const char *typename, co= nst char *cpu_model); CPUState *cpu_create(const char *typename); =20 /** - * cpu_parse_cpu_model: - * @typename: The CPU base type or CPU type. + * parse_cpu_model: * @cpu_model: The model string including optional parameters. * * processes optional parameters and registers them as global properties @@ -670,18 +669,7 @@ CPUState *cpu_create(const char *typename); * Returns: type of CPU to create or prints error and terminates process * if an error occurred. */ -const char *cpu_parse_cpu_model(const char *typename, const char *cpu_mode= l); - -/** - * 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); +const char *parse_cpu_model(const char *cpu_model); =20 /** * cpu_has_work: diff --git a/bsd-user/main.c b/bsd-user/main.c index efef5ff..cbc683a 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -723,6 +723,7 @@ int main(int argc, char **argv) { const char *filename; const char *cpu_model; + const char *cpu_type; const char *log_file =3D NULL; const char *log_mask =3D NULL; struct target_pt_regs regs1, *regs =3D ®s1; @@ -900,7 +901,8 @@ int main(int argc, char **argv) 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_type =3D parse_cpu_model(cpu_model); + cpu =3D create(cpu_type); env =3D cpu->env_ptr; #if defined(TARGET_SPARC) || defined(TARGET_PPC) cpu_reset(cpu); diff --git a/exec.c b/exec.c index 629a508..8aee230 100644 --- a/exec.c +++ b/exec.c @@ -817,6 +817,29 @@ void cpu_exec_realizefn(CPUState *cpu, Error **errp) #endif } =20 +const char *parse_cpu_model(const char *cpu_model) +{ + ObjectClass *oc; + CPUClass *cc; + gchar **model_pieces; + const char *cpu_type; + + model_pieces =3D g_strsplit(cpu_model, ",", 2); + + oc =3D cpu_class_by_name(CPU_RESOLVING_TYPE, model_pieces[0]); + if (oc =3D=3D NULL) { + error_report("unable to find CPU model '%s'", model_pieces[0]); + g_strfreev(model_pieces); + exit(EXIT_FAILURE); + } + + cpu_type =3D object_class_get_name(oc); + cc =3D CPU_CLASS(oc); + cc->parse_features(cpu_type, model_pieces[1], &error_fatal); + g_strfreev(model_pieces); + return cpu_type; +} + #if defined(CONFIG_USER_ONLY) static void breakpoint_invalidate(CPUState *cpu, target_ulong pc) { diff --git a/hw/core/null-machine.c b/hw/core/null-machine.c index 864832d..cde4d3e 100644 --- a/hw/core/null-machine.c +++ b/hw/core/null-machine.c @@ -24,9 +24,9 @@ static void machine_none_init(MachineState *mch) { CPUState *cpu =3D NULL; =20 - /* Initialize CPU (if a model has been specified) */ - if (mch->cpu_model) { - cpu =3D cpu_init(mch->cpu_model); + /* Initialize CPU (if user asked for it) */ + if (mch->cpu_type) { + cpu =3D cpu_create(mch->cpu_type); if (!cpu) { error_report("Unable to initialize CPU"); exit(1); diff --git a/linux-user/main.c b/linux-user/main.c index a35477e..0afb3f4 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -44,6 +44,7 @@ static const char *argv0; static int gdbstub_port; static envlist_t *envlist; static const char *cpu_model; +static const char *cpu_type; unsigned long mmap_min_addr; unsigned long guest_base; int have_guest_base; @@ -3847,7 +3848,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; @@ -4357,10 +4358,13 @@ int main(int argc, char **argv, char **envp) cpu_model =3D "any"; #endif } + cpu_type =3D parse_cpu_model(cpu_model); + 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 diff --git a/qom/cpu.c b/qom/cpu.c index e42d9a7..aab8437 100644 --- a/qom/cpu.c +++ b/qom/cpu.c @@ -67,37 +67,6 @@ CPUState *cpu_create(const char *typename) return cpu; } =20 -const char *cpu_parse_cpu_model(const char *typename, const char *cpu_mode= l) -{ - ObjectClass *oc; - CPUClass *cc; - gchar **model_pieces; - const char *cpu_type; - - model_pieces =3D g_strsplit(cpu_model, ",", 2); - - oc =3D cpu_class_by_name(typename, model_pieces[0]); - if (oc =3D=3D NULL) { - error_report("unable to find CPU model '%s'", model_pieces[0]); - g_strfreev(model_pieces); - exit(EXIT_FAILURE); - } - - cpu_type =3D object_class_get_name(oc); - cc =3D CPU_CLASS(oc); - cc->parse_features(cpu_type, model_pieces[1], &error_fatal); - g_strfreev(model_pieces); - return cpu_type; -} - -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); diff --git a/vl.c b/vl.c index e725ecb..e45e831 100644 --- a/vl.c +++ b/vl.c @@ -4609,15 +4609,11 @@ 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 features once if machine provides default cpu_type */ - if (machine_class->default_cpu_type) { - current_machine->cpu_type =3D machine_class->default_cpu_type; - if (cpu_model) { - current_machine->cpu_type =3D - cpu_parse_cpu_model(machine_class->default_cpu_type, cpu_m= odel); - } + current_machine->cpu_type =3D machine_class->default_cpu_type; + if (cpu_model) { + current_machine->cpu_type =3D parse_cpu_model(cpu_model); } parse_numa_opts(current_machine); =20 --=20 2.7.4 From nobody Sat May 4 12:22:25 2024 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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516696263800767.690884251469; Tue, 23 Jan 2018 00:31:03 -0800 (PST) Received: from localhost ([::1]:44208 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtym-0008PB-DC for importer@patchew.org; Tue, 23 Jan 2018 03:30:52 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtfd-0008Gx-Hr for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:11:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edtfa-0002Nz-0T for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:11:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:63976) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edtfV-0002KZ-Kl; Tue, 23 Jan 2018 03:10:57 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9E6D38F885; Tue, 23 Jan 2018 08:10:56 +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 5131DD1E7; Tue, 23 Jan 2018 08:10:52 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:23 +0100 Message-Id: <1516694904-64879-25-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 23 Jan 2018 08:10:56 +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 v3 24/25] 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 21ed5d6..b3bec21 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 CPU_RESOLVING_TYPE TYPE_ALPHA_CPU diff --git a/target/arm/cpu.h b/target/arm/cpu.h index f9fb141..b37d266 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 CPU_RESOLVING_TYPE TYPE_ARM_CPU diff --git a/target/cris/cpu.h b/target/cris/cpu.h index 1a27653..db80cb1 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 CPU_RESOLVING_TYPE TYPE_CRIS_CPU diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h index b92ae3f..628d7de 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 CPU_RESOLVING_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 82c7381..1ed60b0 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -1564,8 +1564,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) #define CPU_RESOLVING_TYPE TYPE_X86_CPU diff --git a/target/lm32/cpu.h b/target/lm32/cpu.h index 0656052..53939e5 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 CPU_RESOLVING_TYPE TYPE_LM32_CPU diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h index 8a4299a..7d64804 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 CPU_RESOLVING_TYPE TYPE_M68K_CPU diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index 492f9f7..a0ea421 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 CPU_RESOLVING_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 0fcbfb3..cfe1735 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 #define CPU_RESOLVING_TYPE TYPE_MIPS_CPU diff --git a/target/moxie/cpu.h b/target/moxie/cpu.h index 3f94a5a..5f8d10b 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 CPU_RESOLVING_TYPE TYPE_MOXIE_CPU diff --git a/target/nios2/cpu.h b/target/nios2/cpu.h index 2234bff..8897e9a 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 CPU_RESOLVING_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 9b32ea4..6f843fa 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 CPU_RESOLVING_TYPE TYPE_OPENRISC_CPU diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index d5f2f3d..32c51fb 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -1376,8 +1376,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 #define CPU_RESOLVING_TYPE TYPE_POWERPC_CPU diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index b2121cb..b3bfcf5 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 CPU_RESOLVING_TYPE TYPE_S390_CPU diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h index 709e0ca..c6418ef 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 CPU_RESOLVING_TYPE TYPE_SUPERH_CPU diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index 345b39a..28f254d 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 #define CPU_RESOLVING_TYPE TYPE_SPARC_CPU diff --git a/target/tilegx/cpu.h b/target/tilegx/cpu.h index a73215e..238f8d3 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 CPU_RESOLVING_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 a2ef632..13d629d 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 CPU_RESOLVING_TYPE TYPE_TRICORE_CPU diff --git a/target/unicore32/cpu.h b/target/unicore32/cpu.h index 9644b07..5ff8b98 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 CPU_RESOLVING_TYPE TYPE_UNICORE32_CPU diff --git a/target/xtensa/cpu.h b/target/xtensa/cpu.h index 23dbd45..6481c3b 100644 --- a/target/xtensa/cpu.h +++ b/target/xtensa/cpu.h @@ -509,8 +509,6 @@ void xtensa_cpu_do_unaligned_access(CPUState *cpu, vadd= r addr, #endif #define XTENSA_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 May 4 12:22:25 2024 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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516696579268514.2835380615123; Tue, 23 Jan 2018 00:36:19 -0800 (PST) Received: from localhost ([::1]:44842 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edu3v-0003y1-Qy for importer@patchew.org; Tue, 23 Jan 2018 03:36:11 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edtfj-0008Ma-Gp for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:11:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edtfd-0002P8-Id for qemu-devel@nongnu.org; Tue, 23 Jan 2018 03:11:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56180) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1edtfY-0002MG-66; Tue, 23 Jan 2018 03:11:00 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5D8FC13AAB; Tue, 23 Jan 2018 08:10:59 +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 E5FD5D1E7; Tue, 23 Jan 2018 08:10:56 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 Jan 2018 09:08:24 +0100 Message-Id: <1516694904-64879-26-git-send-email-imammedo@redhat.com> In-Reply-To: <1516694904-64879-1-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 23 Jan 2018 08:10:59 +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 v3 25/25] 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?= , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , "Emilio G. Cota" 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" --- qom/cpu.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/qom/cpu.c b/qom/cpu.c index aab8437..cf6880d 100644 --- a/qom/cpu.c +++ b/qom/cpu.c @@ -304,22 +304,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