qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 2/4] target-i386: QOM'ify CPU


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH v2 2/4] target-i386: QOM'ify CPU
Date: Fri, 06 Apr 2012 13:04:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120312 Thunderbird/11.0

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 <address@hidden>
> ---
>  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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]