public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	Borislav Petkov <borislav.petkov@amd.com>,
	"Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: 3.2-rc2 freezes on boot for AMD K6 - bisected to commit bcb80e53877c2045d9e52f4a71372c3fe6501f6f
Date: Mon, 5 Dec 2011 08:28:06 +0100	[thread overview]
Message-ID: <20111205072806.GA2366@elte.hu> (raw)
In-Reply-To: <CA+55aFwWVeAGT2p3tohRLh7VL8f4ztGwAHZxBmosEAGKJfL+Qg@mail.gmail.com>


* Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Sat, Dec 3, 2011 at 12:43 PM, Larry Finger <Larry.Finger@lwfinger.net> wrote:
> > On 11/30/2011 01:09 AM, Larry Finger wrote:
> >> On 11/29/2011 11:59 PM, Srivatsa S. Bhat wrote:
> >>>
> >>> Can you please try out the patch posted in
> >>> https://lkml.org/lkml/2011/11/28/178 ?
> 
> Ugh. I hate that patch.
> 
> It's completely stupid. If "rdmsr_safe()" doesn't work at that point
> in the boot, then it's pointless to call it.
> 
> So this change is pure and utter crap:
> 
>   -	rdmsr_safe(MSR_AMD64_PATCH_LEVEL, &c->microcode, &dummy);
>   +	if (c->x86 >= 0xf)
>   +		rdmsr_safe(MSR_AMD64_PATCH_LEVEL, &c->microcode, &dummy);
> 
> because it is misleading as hell: that rdmsr isn't *safe* at all, so
> why are we calling "rdmsr_safe()"?

Yeah.

> It's wrong.
> 
> The right patch would either just remove the "safe" part (and 
> just say that the register has to be supported if c->x86 >= 
> 0xf), but quite honestly, I don't see why we do that thing in 
> early_init_amd() AT ALL. Afaik, the microcode version field 
> isn't really *needed* by the kernelin the first place, much 
> less is it needed by the *early* boot, so why isn't this in 
> 'init_amd()' a bit later when the "safe" version actually 
> *works*?
> 
> IOW, I think the patch should be something like the attached 
> (TOTALLY UNTESTED) patch. Larry, does this work for you? It 
> just moves the rdmsr_safe() to the later function.

Looks sane to me.

We can improve the early init properties some more - but there's 
always going to be a chicken-and-egg problem there. At minimum 
we should add a comment to rdmsr_safe() that explains its 
dependencies.

Thanks,

	Ingo

  parent reply	other threads:[~2011-12-05  7:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-30  4:54 3.2-rc2 freezes on boot for AMD K6 - bisected to commit bcb80e53877c2045d9e52f4a71372c3fe6501f6f Larry Finger
2011-11-30  5:59 ` Srivatsa S. Bhat
2011-11-30  7:09   ` Larry Finger
2011-12-03 20:43     ` Larry Finger
2011-12-03 23:07       ` Linus Torvalds
2011-12-04  3:15         ` Larry Finger
2011-12-04  6:05         ` Bob Tracy
2011-12-04 13:09         ` Borislav Petkov
2011-12-05  7:28         ` Ingo Molnar [this message]
2011-12-05 17:40 ` [tip:x86/urgent] x86: Document rdmsr_safe restrictions tip-bot for Borislav Petkov

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=20111205072806.GA2366@elte.hu \
    --to=mingo@elte.hu \
    --cc=Larry.Finger@lwfinger.net \
    --cc=borislav.petkov@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srivatsa.bhat@linux.vnet.ibm.com \
    --cc=torvalds@linux-foundation.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