[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH-for-9.1 06/21] target/i386: Make X86_CPU common to new I386_C
From: |
Markus Armbruster |
Subject: |
Re: [PATCH-for-9.1 06/21] target/i386: Make X86_CPU common to new I386_CPU / X86_64_CPU types |
Date: |
Tue, 26 Mar 2024 11:57:35 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Philippe Mathieu-Daudé <philmd@linaro.org> writes:
> "target/foo/cpu-qom.h" can not use any target specific definitions.
>
> Currently "target/i386/cpu-qom.h" defines TYPE_X86_CPU depending
> on the i386/x86_64 build type. This doesn't scale in a heterogeneous
> context where we need to access both types concurrently.
>
> In order to do that, introduce the new I386_CPU / X86_64_CPU
> types, both inheriting a common TYPE_X86_CPU base type.
>
> Keep the current "base" and "max" CPU types as 32 or 64-bit,
> depending on the binary built.
>
> Adapt the cpu-plug-test, since the 'base' architecture is now
> common to both 32/64-bit x86 targets.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Acked-by: Richard Henderson <richard.henderson@linaro.org>
[...]
> diff --git a/tests/qtest/cpu-plug-test.c b/tests/qtest/cpu-plug-test.c
> index 7f5dd5f85a..97316d131f 100644
> --- a/tests/qtest/cpu-plug-test.c
> +++ b/tests/qtest/cpu-plug-test.c
> @@ -90,7 +90,7 @@ static void add_pc_test_case(const char *mname)
> data->machine = g_strdup(mname);
> data->cpu_model = "Haswell"; /* 1.3+ theoretically */
> data->device_model = g_strdup_printf("%s-%s-cpu", data->cpu_model,
> - qtest_get_arch());
> + qtest_get_base_arch());
> data->sockets = 1;
> data->cores = 3;
> data->threads = 2;
Doesn't build for me:
../tests/qtest/cpu-plug-test.c: In function ‘add_pc_test_case’:
../tests/qtest/cpu-plug-test.c:93:42: error: implicit declaration of function
‘qtest_get_base_arch’; did you mean ‘qtest_get_arch’?
[-Werror=implicit-function-declaration]
93 | qtest_get_base_arch());
| ^~~~~~~~~~~~~~~~~~~
| qtest_get_arch
../tests/qtest/cpu-plug-test.c:93:42: error: nested extern declaration of
‘qtest_get_base_arch’ [-Werror=nested-externs]
../tests/qtest/cpu-plug-test.c:92:47: error: format ‘%s’ expects argument of
type ‘char *’, but argument 3 has type ‘int’ [-Werror=format=]
92 | data->device_model = g_strdup_printf("%s-%s-cpu", data->cpu_model,
| ~^
| |
| char *
| %d
93 | qtest_get_base_arch());
| ~~~~~~~~~~~~~~~~~~~~~
| |
| int
- Re: [PATCH-for-9.1 02/21] target/mips: Declare CPU QOM types using DEFINE_TYPES() macro, (continued)
- [PATCH-for-9.1 03/21] target/ppc: Declare CPU QOM types using DEFINE_TYPES() macro, Philippe Mathieu-Daudé, 2024/03/15
- [PATCH-for-9.1 01/21] target/i386: Declare CPU QOM types using DEFINE_TYPES() macro, Philippe Mathieu-Daudé, 2024/03/15
- [PATCH-for-9.1 04/21] target/sparc: Declare CPU QOM types using DEFINE_TYPES() macro, Philippe Mathieu-Daudé, 2024/03/15
- [PATCH-for-9.1 05/21] cpus: Open code OBJECT_DECLARE_TYPE() in OBJECT_DECLARE_CPU_TYPE(), Philippe Mathieu-Daudé, 2024/03/15
- [PATCH-for-9.1 06/21] target/i386: Make X86_CPU common to new I386_CPU / X86_64_CPU types, Philippe Mathieu-Daudé, 2024/03/15
- [PATCH-for-9.1 10/21] qapi: Make CpuModel* definitions target agnostic, Philippe Mathieu-Daudé, 2024/03/15
- [PATCH-for-9.1 11/21] qapi: Make CpuDefinitionInfo target agnostic, Philippe Mathieu-Daudé, 2024/03/15
- [PATCH-for-9.1 07/21] target/mips: Make MIPS_CPU common to new MIPS32_CPU / MIPS64_CPU types, Philippe Mathieu-Daudé, 2024/03/15
- [RFC PATCH-for-9.1 14/21] system: Introduce QMP generic_query_cpu_definitions(), Philippe Mathieu-Daudé, 2024/03/15