Received: by 10.223.164.202 with SMTP id h10csp1711883wrb; Thu, 16 Nov 2017 03:05:22 -0800 (PST) X-Google-Smtp-Source: AGs4zMYfJERlD0mR/k+PIXGopGt/Zt9jm2YA5bKxFZzDmxqRdm0sEQfVuQKOyDSvf+vb0YT9Gb7Q X-Received: by 10.98.41.194 with SMTP id p185mr1448118pfp.140.1510830322659; Thu, 16 Nov 2017 03:05:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510830322; cv=none; d=google.com; s=arc-20160816; b=nwmjkZTgKacvWNf6uD3W4dngIczNrN6sluJigz6QM9asxX4MfKPk3tLlVbFrxQ+blJ GN0GOREKLHhN+3zv+9ya36RC9JYelhVLcu7H9gxgTJL42dUsMs9wFrzGiGLLRspuZmWZ hlIzPERhioZizD5yXrZ2+rkg06n1RTNuL2OzyTFIEcP/+hv7eBzTOpeuRuh2GxwFJ1m2 cWGsAP3/mEtKkL098BijSuEW0U9dqXVhy3QDR/TIlcJlGIH3YPoKdKGQN9er0sgVubf7 puu2GtCrwRWOhthxneeOTqL662n5R3q3aw0POrqSm3cfdykEWxxjw5v2uNkgXqX12zBt jKUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=L6Z6XVjG+PiV52KIdelqNccitrTFpLHnjPthtpQAFf4=; b=qy7t6GBqgYTYNZy3h+UvomdLZ6udnGm/N2ZHhC+XN6TyragyiwKGTLrz+M4Z2TvGVv ylTcX6S0tOUjfojlImvyKGRep2KHUTnypv42N76LuHSl8ZDPSnIwIXc3wzFxHk1JBKy7 H3KcwFghcChHzuBTLm1Wn6Csz3FLveJuOKcXwhR2De61PfBigvexrFfV2uLZFmefer/7 5hF4pqJ0iq+nZ9OpW+uuZvKZf79ebLR7LZ7VdelGk+j9UQvzw8VbxxMhfDiqqxfwnDiq RBxWfP8Up8vvll4+k8/AKlT5kSqAM8taQ4bUDhJHwk2/GEsWceaZ1erZiyey5NLkOgSI pGBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tomeuvizoso-net.20150623.gappssmtp.com header.s=20150623 header.b=djq8SX2i; 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 w18si694268pll.461.2017.11.16.03.05.10; Thu, 16 Nov 2017 03:05:22 -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; dkim=pass header.i=@tomeuvizoso-net.20150623.gappssmtp.com header.s=20150623 header.b=djq8SX2i; 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 S1759367AbdKPJRI (ORCPT + 91 others); Thu, 16 Nov 2017 04:17:08 -0500 Received: from mail-it0-f65.google.com ([209.85.214.65]:45550 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759232AbdKPJRA (ORCPT ); Thu, 16 Nov 2017 04:17:00 -0500 Received: by mail-it0-f65.google.com with SMTP id l196so5081897itl.4 for ; Thu, 16 Nov 2017 01:16:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tomeuvizoso-net.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=L6Z6XVjG+PiV52KIdelqNccitrTFpLHnjPthtpQAFf4=; b=djq8SX2iwaG1HhXVo73oGsWGfI89EuJi8/hwG5xzymimV9RQJ/RLfoWlaPL/L+9Q3N QkAPG82zHYLgbZnIOLN7Q+Sft/Y4rHGuDszuhyaDPqgUinw7wYkcNsrII5IxIhQxyXKS bEJIQN88bIZL9+33c39FbdZkxn7MN4ovm0xf8JE3cITy6jvuFeqVGasG5GKOeazunWH7 5UnkRg2VNtcvMw+E+ln/QFh4VNVF/Proio+rN4/t1sv4DISHLkS9Cwj9Gdt+ebIOXw+R mestjyacaxdvejrHrmw+fof/gWTUDpek3D/b5Hcws7tXe/2zigX0kuUfUoDUjN92RuZ0 lFZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=L6Z6XVjG+PiV52KIdelqNccitrTFpLHnjPthtpQAFf4=; b=pgidg6U0w2mU6Q2XGytEqnDMsuFlsaDmuJleO5emhUgUHPnOJ8HIPO4eto8hl2AQwC zluuhmIdb2SYyX1zb5ST5q8hT1IvpFkqUmFxcDFnl0ASw/SzRs8hF8BPZk6iyx4yc4VI KJ5RFi7UuM7tf0Skeqp+sjdTNyPDQiGrMagOqLGeU6UeKOpatzwVijHZjbqxckwH/9Ob Cr6qy3XWQMFjVi095IyoqTJtuBOaVP706c9CkFui8MvjrKEsOI2sE0S7btvgHNomP71v tjPz4PsM5QN6PjXYTJTTm0CuGF/EU7lDBgU8UlaJqAXppJTHgyVH3RdA5CKWwovRS+CY KEvQ== X-Gm-Message-State: AJaThX4jPjWZukHQYqZ3WAOshVk55FO+S69Eik0nqGDjuXV07uifixZb d6NSYrwV+driPN/HqKistHDqgRQ1 X-Received: by 10.36.37.18 with SMTP id g18mr1450516itg.86.1510823819496; Thu, 16 Nov 2017 01:16:59 -0800 (PST) Received: from mail-it0-f44.google.com (mail-it0-f44.google.com. [209.85.214.44]) by smtp.gmail.com with ESMTPSA id g195sm688266itc.14.2017.11.16.01.16.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Nov 2017 01:16:58 -0800 (PST) Received: by mail-it0-f44.google.com with SMTP id m191so5075083itg.2 for ; Thu, 16 Nov 2017 01:16:58 -0800 (PST) X-Received: by 10.36.68.13 with SMTP id o13mr1442897ita.56.1510823818544; Thu, 16 Nov 2017 01:16:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.133.199 with HTTP; Thu, 16 Nov 2017 01:16:37 -0800 (PST) In-Reply-To: References: <20171106201753.23059.86674.stgit@tlendack-t1.amdoffice.net> <17a1c480-d0aa-b272-7ca3-5dd2cf2fd7dc@amd.com> From: Tomeu Vizoso Date: Thu, 16 Nov 2017 10:16:37 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] x86/boot: Fix boot failure when SMP MP-table is based at 0 To: Tom Lendacky Cc: "H. Peter Anvin" , x86@kernel.org, Peter Zijlstra , "linux-kernel@vger.kernel.org" , Ingo Molnar , Borislav Petkov , Thomas Gleixner , regression@leemhuis.info, Guenter Roeck , Zach Reizner Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adding regression@leemhuis.info to CC so this regression is tracked. Regards, Tomeu On 8 November 2017 at 09:37, Tomeu Vizoso wrote: > On 6 November 2017 at 23:01, Tom Lendacky 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 >>>> 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 >> >> >> 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 From 1584215626264634523@xxx Thu Nov 16 09:49:14 +0000 2017 X-GM-THRID: 1583351961755078136 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread