Messages in this thread | | | Date | Thu, 26 Mar 2009 11:17:47 -0700 | From | Ravikiran G Thirumalai <> | Subject | Re: [PATCH] x86: don't compile vsmp_64 for 32bit |
| |
On Thu, Mar 26, 2009 at 10:11:53AM +0100, Ingo Molnar wrote: > >* Ravikiran G Thirumalai <kiran@scalex86.org> wrote: > >> > unsynchronized_tsc() just returns a guess anyway, and if you >> > don't have X86_FEATURE_CONSTANT_TSC set, then it will return >> > unstable for your hardware anyway, even without the >> > is_vsmp_box() test. >> >> Unfortunately we use hardware which has X86_FEATURE_CONSTANT_TSC. >> >> > >> > Failing that, you could add yourself to bad_tsc_dmi_table[] and >> > have that mark the tsc as unstable (you have DMI, right?). >> > >> >> Newer versions of the VMM does, but older ones don't :(, and >> obviously we have older versions out in the field that still needs >> to be supported. > >But those old versions wont have X86_FEATURE_CONSTANT_TSC set, >right?
No, the old versions also do have X86_FEATURE_CONSTANT_TSC. The kernel assumes that even netburst based cpus have synced tscs (of course this is never mentioned in the intel documentation, but in the past we've been told that that intel engineers say so -- that tscs are synced and guaranteed to not drift between intel cpus)
Here's the code that sets X86_FEATURE_CONSTANT_TSC.
static void __cpuinit early_init_intel(struct cpuinfo_x86 *c) { if ((c->x86 == 0xf && c->x86_model >= 0x03) || (c->x86 == 0x6 && c->x86_model >= 0x0e)) set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
...
Thanks, Kiran
| |