All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomeu Vizoso <tomeu@tomeuvizoso.net>
To: Tom Lendacky <thomas.lendacky@amd.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, Peter Zijlstra <peterz@infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Guenter Roeck <groeck@google.com>,
	Zach Reizner <zachr@google.com>,
	regressions@leemhuis.info
Subject: Re: [PATCH] x86/boot: Fix boot failure when SMP MP-table is based at 0
Date: Thu, 16 Nov 2017 10:20:47 +0100	[thread overview]
Message-ID: <CAAObsKCxKg7V-yddjGXfffSuVSJ=0PeJqfdufz7EuR4d-BTjPg@mail.gmail.com> (raw)
In-Reply-To: <CAAObsKDPLLtFUmAb0fjzXjXq+3hXzbEWdFCV4po4p0bPJRK7Dw@mail.gmail.com>

And now with the correct email.

Sorry about that,

Tomeu

On 16 November 2017 at 10:16, Tomeu Vizoso <tomeu@tomeuvizoso.net> wrote:
> Adding regression@leemhuis.info to CC so this regression is tracked.
>
> Regards,
>
> Tomeu
>
> On 8 November 2017 at 09:37, Tomeu Vizoso <tomeu@tomeuvizoso.net> wrote:
>> On 6 November 2017 at 23:01, Tom Lendacky <thomas.lendacky@amd.com> wrote:
>>> On 11/6/2017 3:41 PM, H. Peter Anvin wrote:
>>>>
>>>> On 11/06/17 12:17, Tom Lendacky wrote:
>>>>>
>>>>> When crosvm is used to boot a kernel as a VM, the SMP MP-table is found
>>>>> at physical address 0x0. This causes mpf_base to be set to 0 and a
>>>>> subsequent "if (!mpf_base)" check in default_get_smp_config() results in
>>>>> the MP-table not being parsed.  Further into the boot this results in an
>>>>> oops when attempting a read_apic_id().
>>>>>
>>>>> Add a boolean variable that is set to true when the MP-table is found.
>>>>> Use this variable for testing if the MP-table was found so that even a
>>>>> value of 0 for mpf_base will result in continued parsing of the MP-table.
>>>>>
>>>>> Reported-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
>>>>> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
>>>>
>>>>
>>>> Ahem... did anyone ever tell you that this is an epicly bad idea on your
>>>> part?  The low megabyte of physical memory has very special meaning on
>>>> x86, and deviating from the standard use of this memory is a *very*
>>>> dangerous thing to do, and imposing on the kernel a "fake null pointer"
>>>> requirement that exists only for the convenience of your particular
>>>> brokenness is not okay.
>>>>
>>>>         -hpa
>>>
>>>
>>> That was my initial thought... what was something doing down at the start
>>> of memory.  But when I looked at default_find_smp_config() it specifically
>>> scans the bottom 1K for a an MP-table signature. I was hoping to get some
>>> feedback as to whether this would really be an acceptable thing to do. So
>>> I'm good with this patch being rejected, but the change I made in
>>>
>>> 5997efb96756 ("x86/boot: Use memremap() to map the MPF and MPC data")
>>>
>>> does break something that was working before.
>>
>> Do I understand correctly that the best we can do right now is
>> reverting 5997efb96756?
>>
>> Thanks,
>>
>> Tomeu

  reply	other threads:[~2017-11-16  9:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-06 20:17 [PATCH] x86/boot: Fix boot failure when SMP MP-table is based at 0 Tom Lendacky
2017-11-06 20:25 ` Tom Lendacky
2017-11-06 21:41 ` H. Peter Anvin
2017-11-06 22:01   ` Tom Lendacky
2017-11-06 23:00     ` Tom Lendacky
2017-11-16 11:40       ` Borislav Petkov
2017-11-08  8:37     ` Tomeu Vizoso
2017-11-16  9:16       ` Tomeu Vizoso
2017-11-16  9:20         ` Tomeu Vizoso [this message]
2017-11-17 13:03     ` Thomas Gleixner
2017-11-17 15:25 ` [tip:x86/urgent] " tip-bot for Tom Lendacky

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='CAAObsKCxKg7V-yddjGXfffSuVSJ=0PeJqfdufz7EuR4d-BTjPg@mail.gmail.com' \
    --to=tomeu@tomeuvizoso.net \
    --cc=bp@alien8.de \
    --cc=groeck@google.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=regressions@leemhuis.info \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    --cc=x86@kernel.org \
    --cc=zachr@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.