On 10/10/23 02:28, Philippe Mathieu-Daudé wrote:
"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é <phi...@linaro.org>
---
target/i386/cpu-qom.h | 16 +++++++++-------
target/i386/cpu.h | 3 +++
target/i386/cpu.c | 20 ++++++++++++++++++--
tests/qtest/cpu-plug-test.c | 2 +-
4 files changed, 31 insertions(+), 10 deletions(-)
I suppose the concurrent existence of these two types will be used by follow-on
cleanups?
Acked-by: Richard Henderson <richard.hender...@linaro.org>
r~