qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] X86 CPU topology broken in qemu ?


From: Avi Kivity
Subject: Re: [Qemu-devel] X86 CPU topology broken in qemu ?
Date: Thu, 25 Aug 2011 06:01:03 -0400 (EDT)

> Hi,
> 
> I see that x86 CPU topology inside VM is not showing up as specified.
> With some debugging, I found out that the root cause for this: qemu is
> not enumerating the apic ids correctly for vcpus. I made the below
> hackish change to get it working. Has anybody else seen this problem
> ? This patch is on qemu-kvm-0.14.1. Using 2.6.39 for guest.
> 
> ***************************
> Fix apic id enumeration
> 
> 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.
> 
> Fix this by setting cpuid_apic_id before cpuid information is passed
> to
> the host kernel.
> 

> Index: qemu-kvm-0.14.1/hw/pc.c
> ===================================================================
> --- qemu-kvm-0.14.1.orig/hw/pc.c
> +++ qemu-kvm-0.14.1/hw/pc.c

Please post a patch against qemu.git master branch.

> 
> + if (env->cpuid_features & CPUID_APIC)
> +     env->cpuid_apic_id = env->cpu_index;
> +

qemu coding style requires braces even around single statements in if () blocks.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]