Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Aug 2010 23:30:51 +0400
From:      pluknet <pluknet@gmail.com>
To:        Jung-uk Kim <jkim@freebsd.org>
Cc:        freebsd-stable@freebsd.org, Andriy Gapon <avg@icyb.net.ua>
Subject:   Re: 8.1-PRERELEASE: CPU packages not detected correctly
Message-ID:  <AANLkTim03rju0J%2BZD1UMYGN77mrD3qizf1F675rUODCH@mail.gmail.com>
In-Reply-To: <201008191326.09822.jkim@FreeBSD.org>
References:  <201007141414.o6EEEUx9014690@lurza.secnetix.de> <4C6D5E31.9000701@icyb.net.ua> <AANLkTi=hZC9gL2xF2oD9w5ApgZ11LyRf1WbE=3YZuHef@mail.gmail.com> <201008191326.09822.jkim@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 19 August 2010 21:26, Jung-uk Kim <jkim@freebsd.org> wrote:
> On Thursday 19 August 2010 12:56 pm, pluknet wrote:
>> On 19 August 2010 20:39, Andriy Gapon <avg@icyb.net.ua> wrote:
>> > on 10/08/2010 19:55 pluknet said the following:
>> >> On 16 July 2010 19:47, Jung-uk Kim <jkim@freebsd.org> wrote:
>> >>> The patch should apply fine on both
>> >>> sys/amd64/amd64/mp_machdep.c and sys/i386/i386/mp_machdep.c.
>> >>>
>> >>> http://people.freebsd.org/~jkim/mp_machdep2.diff
>> >>
>> >> Hi.
>> >>
>> >> Just checked on Xen HVM with 3 cores.
>> >> 1) 8.1 unmodified:
>> >> FreeBSD/SMP: Multiprocessor System Detected: 3 CPUs
>> >> FreeBSD/SMP: 1 package(s) x 3 core(s)
>> >>
>> >> 2) 8.1 + patch
>> >> FreeBSD/SMP: Multiprocessor System Detected: 3 CPUs
>> >> FreeBSD/SMP: 0 package(s) x 1 core(s) x 32 HTT threads
>> >> WARNING: Non-uniform processors.
>> >> WARNING: Using suboptimal topology.
>> >
>> > Can you debug, e.g. with printfs, what exactly goes wrong?
>> > I wonder if in this case code follows some unusual/unexpected
>> > path.
>>
>> Sorry, I'm a bit busy right now.
>> I hope to debug this somewhere in the next week.
>>
>> > BTW, could you please also provide CPU name/model/features as
>> > detected by the kernel?
>>
>> Sure.
>> CPU: Intel(R) Xeon(R) CPU =A0 =A0 =A0 =A0 =A0 E5520 =A0@ 2.27GHz (2763.1=
2-MHz
>> 686-class CPU) Origin =3D "GenuineIntel" =A0Id =3D 0x106a5 =A0Family =3D=
 6
>> Model =3D 1a =A0Stepping =3D 5
>> Features=3D0x1781fbbf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,APIC,SEP,MTRR,PG
>>E,MCA,CMOV,PAT,MMX,FXSR,SSE,SSE2,HTT>
>> Features2=3D0x80982201<SSE3,SSSE3,CX16,SSE4.1,SSE4.2,POPCNT,<b31>>
>> TSC: P-state invariant
>> real memory =A0=3D 4194304000 (4000 MB)
>> avail memory =3D 3932786688 (3750 MB)
>> ACPI APIC Table: <Xen HVM>
>> FreeBSD/SMP: Multiprocessor System Detected: 3 CPUs
>> FreeBSD/SMP: 0 package(s) x 1 core(s) x 32 HTT threads
>> =A0cpu0 (BSP): APIC ID: =A00
>> =A0cpu1 (AP/HT): APIC ID: =A02
>> =A0cpu2 (AP/HT): APIC ID: =A04
>>
>> Just a thought.
>> =A0# HTT might somehow correlate with current maxcpus limit (32).
>
> One thing I am not sure is whether those CPUID instructions are
> executed on *real* CPUs or translated in HVM.

I may add only that <b31> of Features2 presents only in Xen
HVM environment, and its role is afaik to indicate a Xen guest
mode. There is no any mention of this bit in the latest Intel doc
(ie it's reserved/unused).

Also, at least NetBSD has a special handling of this bit.
See commit log for CPUID2_RAZ in sys/arch/x86/include/specialreg.h, 1.37
FWIW RAZ states for "reserved and zero" or so.

--=20
wbr,
pluknet



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTim03rju0J%2BZD1UMYGN77mrD3qizf1F675rUODCH>