Am 03.04.2012 02:05, schrieb Andreas Färber: > Embed CPUX86State as first member of X86CPU. > Drop cpu_x86_close() in favor of calling object_delete() directly. > > For now let CPUClass::reset() call cpu_state_reset(). > > Signed-off-by: Andreas Färber <afaer...@suse.de> > --- > target-i386/cpu-qom.h | 71 > +++++++++++++++++++++++++++++++++++++++++++++++++ > target-i386/cpu.c | 37 +++++++++++++++++++++++++ > target-i386/cpu.h | 3 +- > target-i386/helper.c | 11 +++----- > 4 files changed, 114 insertions(+), 8 deletions(-) > create mode 100644 target-i386/cpu-qom.h
Based on an idea by Blue I've prepared the following change, adjusting the type name based on target: diff --git a/target-i386/cpu-qom.h b/target-i386/cpu-qom.h index e6ebfb8..40635c4 100644 --- a/target-i386/cpu-qom.h +++ b/target-i386/cpu-qom.h @@ -23,7 +23,11 @@ #include "qemu/cpu.h" #include "cpu.h" -#define TYPE_X86_CPU "x86-cpu" +#ifdef TARGET_X86_64 +#define TYPE_X86_CPU "x86_64-cpu" +#else +#define TYPE_X86_CPU "i386-cpu" +#endif #define X86_CPU_CLASS(klass) \ OBJECT_CLASS_CHECK(X86CPUClass, (klass), TYPE_X86_CPU) /-F -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg