From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752960AbdKFVv1 (ORCPT ); Mon, 6 Nov 2017 16:51:27 -0500 Received: from terminus.zytor.com ([65.50.211.136]:53603 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752637AbdKFVv0 (ORCPT ); Mon, 6 Nov 2017 16:51:26 -0500 Subject: Re: [PATCH] x86/boot: Fix boot failure when SMP MP-table is based at 0 To: Tom Lendacky , x86@kernel.org Cc: Peter Zijlstra , linux-kernel@vger.kernel.org, Ingo Molnar , Borislav Petkov , Thomas Gleixner , Tomeu Vizoso References: <20171106201753.23059.86674.stgit@tlendack-t1.amdoffice.net> From: "H. Peter Anvin" Message-ID: Date: Mon, 6 Nov 2017 13:41:09 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20171106201753.23059.86674.stgit@tlendack-t1.amdoffice.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Signed-off-by: Tom Lendacky 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