From: Eduardo Habkost <ehabkost@thinair.local>
The struct will be used by X86CPUClass, too.
Signed-off-by: Eduardo Habkost <ehabkost@thinair.local>
---
target-i386/cpu-qom.h | 19 +++++++++++++++++++
target-i386/cpu.c | 18 ------------------
2 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/target-i386/cpu-qom.h b/target-i386/cpu-qom.h
index 5901140..2cd4f1a 100644
--- a/target-i386/cpu-qom.h
+++ b/target-i386/cpu-qom.h
@@ -37,6 +37,25 @@
#define X86_CPU_GET_CLASS(obj) \
OBJECT_GET_CLASS(X86CPUClass, (obj), TYPE_X86_CPU)
+typedef struct X86CPUDefinition {
+ uint32_t level;
+ char vendor[CPUID_VENDOR_SZ + 1];
+ int family;
+ int model;
+ int stepping;
+ int tsc_khz;
+ uint32_t features, ext_features, ext2_features, ext3_features;
+ uint32_t kvm_features, svm_features;
+ uint32_t xlevel;
+ char model_id[48];
+ int vendor_override;
+ /* Store the results of Centaur's CPUID instructions */
+ uint32_t ext4_features;
+ uint32_t xlevel2;
+ /* The feature bits on CPUID[EAX=7,ECX=0].EBX */
+ uint32_t cpuid_7_0_ebx_features;
+} X86CPUDefinition;
+
/**
* X86CPUClass:
* @parent_reset: The parent class' reset handler.
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 0c816d9..da7b5af 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -207,24 +207,6 @@ static bool lookup_feature(uint32_t *pval, const char *s,
const char *e,
return found;
}
-typedef struct X86CPUDefinition {
- uint32_t level;
- char vendor[CPUID_VENDOR_SZ + 1];
- int family;
- int model;
- int stepping;
- int tsc_khz;
- uint32_t features, ext_features, ext2_features, ext3_features;
- uint32_t kvm_features, svm_features;
- uint32_t xlevel;
- char model_id[48];
- int vendor_override;
- /* Store the results of Centaur's CPUID instructions */
- uint32_t ext4_features;
- uint32_t xlevel2;
- /* The feature bits on CPUID[EAX=7,ECX=0].EBX */
- uint32_t cpuid_7_0_ebx_features;
-} X86CPUDefinition;
#define I486_FEATURES (CPUID_FP87 | CPUID_VME | CPUID_PSE)
#define PENTIUM_FEATURES (I486_FEATURES | CPUID_DE | CPUID_TSC | \
--
1.7.11.2