On Tue, Apr 29, 2025 at 10:51:48AM +0200, Philippe Mathieu-Daudé wrote: > VMSTATE_CPU() is only used in 4 places and doesn't provide > much, directly inline it using VMSTATE_STRUCT(). > > This removes the last COMPILING_PER_TARGET in "hw/core/cpu.h". > > Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> > --- > include/hw/core/cpu.h | 12 ------------ > target/alpha/machine.c | 2 +- > target/hppa/machine.c | 2 +- > target/microblaze/machine.c | 2 +- > target/openrisc/machine.c | 2 +- > 5 files changed, 4 insertions(+), 16 deletions(-) > > diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h > index 12b2ff1f7d2..1e87f7d393e 100644 > --- a/include/hw/core/cpu.h > +++ b/include/hw/core/cpu.h > @@ -1121,20 +1121,8 @@ bool cpu_exec_realizefn(CPUState *cpu, Error **errp); > void cpu_exec_unrealizefn(CPUState *cpu); > void cpu_exec_reset_hold(CPUState *cpu); > > -#ifdef COMPILING_PER_TARGET > - > extern const VMStateDescription vmstate_cpu_common; > > -#define VMSTATE_CPU() { \ > - .name = "parent_obj", \ > - .size = sizeof(CPUState), \ > - .vmsd = &vmstate_cpu_common, \ > - .flags = VMS_STRUCT, \ > - .offset = 0, \ > -}
Before looking at this I didn't notice there're a bunch of vmsds that are with version_id=0.. but looks like it's working all fine.. Acked-by: Peter Xu <pet...@redhat.com> -- Peter Xu