mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
Fix X86 CPU topology in KVM mode
apic id returned to guest kernel in ebx for cpuid(function=1) depends on CPUX86State->cpuid_apic_id which gets populated after the cpuid information is cached in the host kernel. This results in broken CPU topology in guest. Fix this by setting cpuid_apic_id before cpuid information is passed to the host kernel. This is done by moving the setting of cpuid_apic_id to cpu_x86_init() where it will work for both KVM as well as TCG modes. Acked-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Bharata B Rao <bharata.rao@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
18ebcc86f2
commit
f2209eb854
2 changed files with 1 additions and 1 deletions
|
@ -1257,6 +1257,7 @@ CPUX86State *cpu_x86_init(const char *cpu_model)
|
|||
cpu_x86_close(env);
|
||||
return NULL;
|
||||
}
|
||||
env->cpuid_apic_id = env->cpu_index;
|
||||
mce_init(env);
|
||||
|
||||
qemu_init_vcpu(env);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue