i386 return APIC ID with cpuid, by Bernhard Kauer.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2591 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
af655b6d82
commit
eae7629bfd
|
@ -816,6 +816,7 @@ int apic_init(CPUState *env)
|
||||||
env->apic_state = s;
|
env->apic_state = s;
|
||||||
apic_init_ipi(s);
|
apic_init_ipi(s);
|
||||||
s->id = last_apic_id++;
|
s->id = last_apic_id++;
|
||||||
|
env->cpuid_apic_id = s->id;
|
||||||
s->cpu_env = env;
|
s->cpu_env = env;
|
||||||
s->apicbase = 0xfee00000 |
|
s->apicbase = 0xfee00000 |
|
||||||
(s->id ? 0 : MSR_IA32_APICBASE_BSP) | MSR_IA32_APICBASE_ENABLE;
|
(s->id ? 0 : MSR_IA32_APICBASE_BSP) | MSR_IA32_APICBASE_ENABLE;
|
||||||
|
|
|
@ -530,6 +530,7 @@ typedef struct CPUX86State {
|
||||||
uint32_t cpuid_xlevel;
|
uint32_t cpuid_xlevel;
|
||||||
uint32_t cpuid_model[12];
|
uint32_t cpuid_model[12];
|
||||||
uint32_t cpuid_ext2_features;
|
uint32_t cpuid_ext2_features;
|
||||||
|
uint32_t cpuid_apic_id;
|
||||||
|
|
||||||
#ifdef USE_KQEMU
|
#ifdef USE_KQEMU
|
||||||
int kqemu_enabled;
|
int kqemu_enabled;
|
||||||
|
|
|
@ -1653,7 +1653,7 @@ void helper_cpuid(void)
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
EAX = env->cpuid_version;
|
EAX = env->cpuid_version;
|
||||||
EBX = 8 << 8; /* CLFLUSH size in quad words, Linux wants it. */
|
EBX = (env->cpuid_apic_id << 24) | 8 << 8; /* CLFLUSH size in quad words, Linux wants it. */
|
||||||
ECX = env->cpuid_ext_features;
|
ECX = env->cpuid_ext_features;
|
||||||
EDX = env->cpuid_features;
|
EDX = env->cpuid_features;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue