Commit eae7629bfdb25f5d89444fcae532b13e78c6d608
1 parent
af655b6d
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
Showing
3 changed files
with
3 additions
and
1 deletions
hw/apic.c
... | ... | @@ -816,6 +816,7 @@ int apic_init(CPUState *env) |
816 | 816 | env->apic_state = s; |
817 | 817 | apic_init_ipi(s); |
818 | 818 | s->id = last_apic_id++; |
819 | + env->cpuid_apic_id = s->id; | |
819 | 820 | s->cpu_env = env; |
820 | 821 | s->apicbase = 0xfee00000 | |
821 | 822 | (s->id ? 0 : MSR_IA32_APICBASE_BSP) | MSR_IA32_APICBASE_ENABLE; | ... | ... |
target-i386/cpu.h
target-i386/helper.c
... | ... | @@ -1653,7 +1653,7 @@ void helper_cpuid(void) |
1653 | 1653 | break; |
1654 | 1654 | case 1: |
1655 | 1655 | EAX = env->cpuid_version; |
1656 | - EBX = 8 << 8; /* CLFLUSH size in quad words, Linux wants it. */ | |
1656 | + EBX = (env->cpuid_apic_id << 24) | 8 << 8; /* CLFLUSH size in quad words, Linux wants it. */ | |
1657 | 1657 | ECX = env->cpuid_ext_features; |
1658 | 1658 | EDX = env->cpuid_features; |
1659 | 1659 | break; | ... | ... |