Received: by 10.223.164.202 with SMTP id h10csp735714wrb; Mon, 6 Nov 2017 14:40:29 -0800 (PST) X-Google-Smtp-Source: ABhQp+T2+Fk73wF3gF+x5L3P8ytTRf4OHOUHl5+g56JpPm1nw//B6jHBYNv1SQ/qSfp9MRnSvOqz X-Received: by 10.98.190.6 with SMTP id l6mr3059206pff.53.1510008029752; Mon, 06 Nov 2017 14:40:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510008029; cv=none; d=google.com; s=arc-20160816; b=TLnbPKjIhbHvTb2GX9+oYGA7O/GMJBpwg4pUhh2DByVGGIJcXqLAqWuDGsVTRwhuIj 80KUtd6STXr9Pwbk6Pm2YkpjwyzqRD94bpsCqO3nQqqTEV6vksGPb+FQom2VGdKqaxdV 1mvL85YIFTdToMaD9rMAJOonu005waQvNbsWBpY45IWjnlzSY37nrZgaoJYl1O5Rpj+F MFySZf3Lcdvv9r8Ea04Bbmh82687yZkQrBnT6PlIDzkmhRinhH10LO4SCdd7gthN5gi8 ENDnL0l582hWyUMOqqpuUYIv8WNYRdsIHnygFnAyhfdQma79j5vIsqCOg19DdmnHf/Pp iTEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=qUuaV3Lnz1eCbsxWPSJ2BO1JLu5/FLB17jCVcQuA7SA=; b=XxkpQBTc3MUz7Dv2OWu77GvK0rLM4nzgE3NYiqdqaKoJX5SGv3+UoqL3ZecEvfB2lE QTe87rW4k4V8UnLAY3iiEd75jmXfcmaF6s167rzi6VuujcIhamzlZcjBvMhBGjoVcrq4 bPeaBWSy53tzzk7q7PrP57JQjcNpR79adtNobXqaTllhM6VpuJCvxeKDYzJMD9Q3WNAc v8CWFhkeVncdZa5vsRv1TuwOP058R5KEmWlidrZFzuPwxbqd72b8JLV4MTJFFCUMQYla f2yvgm0Rzv++ElyNpgUw6YrrySYvjTEX5U+ie2oZnYWbHkHdjdFxPrnsdQFYpqsmciiJ CN6A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u10si11016522plu.617.2017.11.06.14.40.15; Mon, 06 Nov 2017 14:40:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752953AbdKFVv1 (ORCPT + 94 others); 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 Received: from carbon-x1.hos.anvin.org (c-24-5-245-234.hsd1.ca.comcast.net [24.5.245.234] (may be forged)) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id vA6LfEfK012195 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Mon, 6 Nov 2017 13:41:15 -0800 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 Precedence: bulk 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 From 1583352031470265939@xxx Mon Nov 06 21:02:46 +0000 2017 X-GM-THRID: 1583351961755078136 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread