public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Fenghua Yu <fenghua.yu@intel.com>, Ingo Molnar <mingo@elte.hu>,
	Thomas Gleixner <tglx@linutronix.de>,
	penguin-kernel@i-love.sakura.ne.jp,
	linux-kernel <linux-kernel@vger.kernel.org>, x86 <x86@kernel.org>
Subject: Re: [PATCH] x86/microcode_intel_early.c: Get 32-bit physical address by __pa_nodebug()
Date: Tue, 19 Mar 2013 16:21:13 -0700	[thread overview]
Message-ID: <5148F2E9.5000401@zytor.com> (raw)
In-Reply-To: <CAE9FiQVhziaB9vEUNw-EBvA1Bfey=uMEw+CERuqSyPgU3qCJUA@mail.gmail.com>

On 03/19/2013 04:15 PM, Yinghai Lu wrote:
> On Tue, Mar 19, 2013 at 8:04 AM, Fenghua Yu <fenghua.yu@intel.com> wrote:
>> From: Fenghua Yu <fenghua.yu@intel.com>
>>
>> In 32-bit, __pa_symbol() in CONFIG_DEBUG_VIRTUAL accesses kernel data (e.g.
>> max_low_pfn) that haven't been setup yet in such early boot phase. To fix the
>> issue, __pa_nodebug() replaces __pa_symbol() to get a global symbol's physical
>> address.
> 
> That explanation is not precise.
> 
> __phys_addr in 32bit when DEBUG_VIRTUAL is set, it does have check
>         /* max_low_pfn is set early, but not _that_ early */
>         if (max_low_pfn) {
>          ....
>         }
> the reason should be:
> in head_32.S, 32bit flat mode, you need to switch to phys addr to access
> global variable max_low_pfn.
> 

Uh, no.

It already does that.  The problem is that __pa_symbol() breaks with
CONFIG_DEBUG_VIRTUAL at this point; we need to use __pa_nodebug().

	-hpa


  reply	other threads:[~2013-03-19 23:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-19 15:04 [PATCH] x86/microcode_intel_early.c: Get 32-bit physical address by __pa_nodebug() Fenghua Yu
2013-03-19 23:15 ` Yinghai Lu
2013-03-19 23:21   ` H. Peter Anvin [this message]
2013-03-19 23:36   ` Yu, Fenghua
2013-03-19 23:48     ` Yinghai Lu
2013-03-20  0:03       ` H. Peter Anvin
2013-03-20  2:06 ` Tetsuo Handa
2013-03-20  3:11 ` [tip:x86/urgent] x86-32, microcode_intel_early: Fix crash with CONFIG_DEBUG_VIRTUAL tip-bot for Fenghua Yu
2013-03-21 10:40 ` [PATCH] x86/microcode_intel_early.c: Get 32-bit physical address by __pa_nodebug() Ingo Molnar
2013-03-21 14:30   ` 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=5148F2E9.5000401@zytor.com \
    --to=hpa@zytor.com \
    --cc=fenghua.yu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yinghai@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