aboutsummaryrefslogtreecommitdiff
path: root/target-i386/cpu.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-03-03 00:29:17 +0000
committerPeter Maydell <peter.maydell@linaro.org>2015-03-03 00:29:17 +0000
commit0856579cac2f1dacecd847cfcd89680d26ff78f5 (patch)
tree6ab14c4d57029b50bf6ec08b4b881bfad0625217 /target-i386/cpu.h
parentb8a173b25c887a606681fc35a46702c164d5b2d0 (diff)
Revert "Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging"
This reverts commit b8a173b25c887a606681fc35a46702c164d5b2d0, reversing changes made to 5de090464f1ec5360c4f30faa01d8a9f8826cd58. (I applied this pull request when I should not have done so, and am now immediately reverting it.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-i386/cpu.h')
-rw-r--r--target-i386/cpu.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index f0e6ca4843..478450cfb6 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -944,6 +944,7 @@ typedef struct CPUX86State {
uint32_t cpuid_version;
FeatureWordArray features;
uint32_t cpuid_model[12];
+ uint32_t cpuid_apic_id;
/* MTRRs */
uint64_t mtrr_fixed[11];
@@ -981,6 +982,7 @@ typedef struct CPUX86State {
#include "cpu-qom.h"
+X86CPU *cpu_x86_init(const char *cpu_model);
X86CPU *cpu_x86_create(const char *cpu_model, DeviceState *icc_bridge,
Error **errp);
int cpu_x86_exec(CPUX86State *s);
@@ -1169,9 +1171,14 @@ uint64_t cpu_get_tsc(CPUX86State *env);
# define PHYS_ADDR_MASK 0xfffffffffLL
# endif
-/* CPU creation function for *-user */
-CPUX86State *cpu_x86_init_user(const char *cpu_model);
-#define cpu_init cpu_x86_init_user
+static inline CPUX86State *cpu_init(const char *cpu_model)
+{
+ X86CPU *cpu = cpu_x86_init(cpu_model);
+ if (cpu == NULL) {
+ return NULL;
+ }
+ return &cpu->env;
+}
#define cpu_exec cpu_x86_exec
#define cpu_gen_code cpu_x86_gen_code