From: Andreas Herrmann <andreas.herrmann3@amd.com>
To: Borislav Petkov <bp@amd64.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
Alok Kataria <akataria@vmware.com>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@alien8.de>,
the arch/x86 maintainers <x86@kernel.org>,
Greg KH <gregkh@suse.de>, "greg@kroah.com" <greg@kroah.com>,
"ksrinivasan@novell.com" <ksrinivasan@novell.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -v2] x86, tsc: Limit CPU frequency calibration on AMD
Date: Wed, 25 Aug 2010 15:39:48 +0200 [thread overview]
Message-ID: <20100825133948.GE4590@loge.amd.com> (raw)
In-Reply-To: <20100825130454.GB4891@loge.amd.com>
On Wed, Aug 25, 2010 at 03:04:54PM +0200, Andreas Herrmann wrote:
> On Wed, Aug 25, 2010 at 03:06:53AM -0400, Borislav Petkov wrote:
> > From: "H. Peter Anvin" <hpa@zytor.com>
> > Date: Tue, Aug 24, 2010 at 06:33:07PM -0400
> >
> > > Build failure:
> > >
> > > /home/hpa/kernel/linux-2.6-tip.cpu/arch/x86/kernel/cpu/amd.c: In
> > > function ‘amd_calibrate_cpu’:
> > > /home/hpa/kernel/linux-2.6-tip.cpu/arch/x86/kernel/cpu/amd.c:397: error:
> > > implicit declaration of function ‘avail_to_resrv_perfctr_nmi_bit’
> > > /home/hpa/kernel/linux-2.6-tip.cpu/arch/x86/kernel/cpu/amd.c:409: error:
> > > implicit declaration of function ‘reserve_perfctr_nmi’
> > > /home/hpa/kernel/linux-2.6-tip.cpu/arch/x86/kernel/cpu/amd.c:410: error:
> > > implicit declaration of function ‘reserve_evntsel_nmi’
> > > /home/hpa/kernel/linux-2.6-tip.cpu/arch/x86/kernel/cpu/amd.c:429: error:
> > > implicit declaration of function ‘release_perfctr_nmi’
> > > /home/hpa/kernel/linux-2.6-tip.cpu/arch/x86/kernel/cpu/amd.c:430: error:
> > > implicit declaration of function ‘release_evntsel_nmi’
> > >
> > > Reproducible by doing "make ARCH=i386 allnoconfig".
> >
> > Sh*t, I can't catch a break with that Kconfig dependency stuff, can I?
> >
> > This happens because perfctr-watchdog.c gets pulled in by
> > CONFIG_X86_LOCAL_APIC which is, _of course_, not selected in an
> > allnoconfig build. Fixing this would mean exporting all that perfcounter
> > reservation functionality for the allnoconfig case, which is of course
> > doable but I'm starting to question the need for recalibrating the TSC
> > at all:
> >
> > I mean, in the 99% of the cases MSRC001_0015[24] should be set by the
> > BIOS and if not then the BIOS which does that is pretty b0rked anyway.
> > So I'm thinking of removing the recalibration code and simply warning
> > the user instead, for the 1% case.
> >
> > Andreas, what do you think?
>
> I opt for removing the recalibration code plus keeping a FIRMWARE_WARN
> for borked BIOSes (just in case that there are any old systems with
> the wrong setting).
... and checking the HWCR MSR and issuing the firmware warning should
only happen if not running on a hypervisor. (Validate whether CPU has
X86_FEATURE_HYPERVISOR bit set or not.)
Andreas
--
Operating | Advanced Micro Devices GmbH
System | Einsteinring 24, 85609 Dornach b. München, Germany
Research | Geschäftsführer: Alberto Bozzo, Andrew Bowd
Center | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
(OSRC) | Registergericht München, HRB Nr. 43632
next prev parent reply other threads:[~2010-08-25 13:23 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-16 19:25 [Patch] Skip cpu_calibrate for kernel running under hypervisors Alok Kataria
2010-08-16 23:56 ` H. Peter Anvin
2010-08-17 5:51 ` Alok Kataria
2010-08-17 6:30 ` H. Peter Anvin
2010-08-17 7:05 ` Borislav Petkov
2010-08-17 16:45 ` Alok Kataria
2010-08-17 18:56 ` Borislav Petkov
2010-08-18 16:16 ` [PATCH] x86, tsc: Limit CPU frequency calibration on AMD Borislav Petkov
2010-08-18 16:23 ` H. Peter Anvin
2010-08-18 17:34 ` Borislav Petkov
2010-08-18 17:44 ` H. Peter Anvin
2010-08-18 17:51 ` Alok Kataria
2010-08-18 18:45 ` Borislav Petkov
2010-08-24 15:53 ` [PATCH -v2] " Borislav Petkov
2010-08-24 17:51 ` Alok Kataria
2010-08-24 22:33 ` H. Peter Anvin
2010-08-25 7:06 ` Borislav Petkov
2010-08-25 13:04 ` Andreas Herrmann
2010-08-25 13:39 ` Andreas Herrmann [this message]
2010-08-25 16:28 ` [PATCH -v3] x86, tsc: Remove " Borislav Petkov
2010-08-25 21:36 ` [tip:x86/cpu] " tip-bot for Borislav Petkov
2010-08-25 22:33 ` [PATCH -v3] " Alok Kataria
2010-08-26 7:19 ` Borislav Petkov
2010-08-19 18:47 ` [PATCH] x86, tsc: Limit " john stultz
2010-08-19 20:29 ` Borislav Petkov
2010-08-19 20:52 ` john stultz
2010-08-17 16:48 ` [Patch] Skip cpu_calibrate for kernel running under hypervisors Alok Kataria
2010-08-17 16:49 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100825133948.GE4590@loge.amd.com \
--to=andreas.herrmann3@amd.com \
--cc=akataria@vmware.com \
--cc=bp@alien8.de \
--cc=bp@amd64.org \
--cc=greg@kroah.com \
--cc=gregkh@suse.de \
--cc=hpa@zytor.com \
--cc=ksrinivasan@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox