diff mbox

[v2,2/4] target-i386: QOM'ify CPU

Message ID 4F7ECDD5.50804@suse.de
State New
Headers show

Commit Message

Andreas Färber April 6, 2012, 11:04 a.m. UTC
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 <afaerber@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:


/-F
diff mbox

Patch

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)