diff options
author | Avi Kivity <avi@redhat.com> | 2010-06-21 18:26:50 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-06-21 18:26:50 +0300 |
commit | 5db1fcbb4107e90b0ce9dcd5424b367e8110686c (patch) | |
tree | 89ad017d9dbe21df5a29c019adea325dd7fbf02a /target-i386 | |
parent | 303d1f34a55d36c60f1042a868638b19ae3d89f0 (diff) | |
parent | 0e26b7b892e1369d66da63b748acbfb6b3819a59 (diff) |
Merge commit '0e26b7b892e1369d66da63b748acbfb6b3819a59' into upstream-merge
* commit '0e26b7b892e1369d66da63b748acbfb6b3819a59':
apic: avoid using CPUState internals
Conflicts:
hw/apic.h
hw/pc.c
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'target-i386')
-rw-r--r-- | target-i386/cpu.h | 12 | ||||
-rw-r--r-- | target-i386/cpuid.c | 6 |
2 files changed, 18 insertions, 0 deletions
diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 49e59ccfc..21e27dec5 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -813,6 +813,17 @@ static inline void cpu_x86_load_seg_cache(CPUX86State *env, } } +static inline void cpu_x86_load_seg_cache_sipi(CPUX86State *env, + int sipi_vector) +{ + env->eip = 0; + cpu_x86_load_seg_cache(env, R_CS, sipi_vector << 8, + sipi_vector << 12, + env->segs[R_CS].limit, + env->segs[R_CS].flags); + env->halted = 0; +} + int cpu_x86_get_descr_debug(CPUX86State *env, unsigned int selector, target_ulong *base, unsigned int *limit, unsigned int *flags); @@ -850,6 +861,7 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count, uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx); int cpu_x86_register (CPUX86State *env, const char *cpu_model); +void cpu_clear_apic_feature(CPUX86State *env); /* helper.c */ int cpu_x86_handle_mmu_fault(CPUX86State *env, target_ulong addr, diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c index 26e4054ee..9c9c63cbb 100644 --- a/target-i386/cpuid.c +++ b/target-i386/cpuid.c @@ -944,6 +944,12 @@ static int cpudef_register(QemuOpts *opts, void *opaque) x86_defs = def; return (0); } + +void cpu_clear_apic_feature(CPUX86State *env) +{ + env->cpuid_features &= ~CPUID_APIC; +} + #endif /* !CONFIG_USER_ONLY */ /* register "cpudef" models defined in configuration file. Here we first |