Received: by 10.223.164.202 with SMTP id h10csp1650534wrb; Thu, 16 Nov 2017 01:49:14 -0800 (PST) X-Google-Smtp-Source: AGs4zMbuWjI1kf4blAmii4IWjORBMR9TNiCC7bnuszUOf6A9K4tut1Hn6JRCa0CoTFPqv1xSVyRL X-Received: by 10.159.218.144 with SMTP id w16mr1112081plp.443.1510825754228; Thu, 16 Nov 2017 01:49:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510825754; cv=none; d=google.com; s=arc-20160816; b=L7g6blfu1kWX9UZHUB5nDTnBIpkGP4LVLR0LIghnn6pIb2VMCGSmWoZ+uaYpn4ymwD WW8ejFcfKSzrq72ofP1yDeHYIqi5CvumD59eEGq4hLylaxPir+FouvNwtCtg4xMrqC7S A1hasW2o7K4hKo1bgypT8nJ7Y2znBNzo4JPQEC7rE3jUjL8noILdXalhmXzquA2tkiy1 AGrN2djLDIgwPtS0RodpbJGbVLEwX6f3VgHugxzXeDIf/G47DcLO+vv40WsSTCBuYoU3 6nYRAHDCliHOWD8j3Gtj3XEaQ/AsGOMjIdVsaa6Btqz1zHhQi3IqsSfVJx89IO10CeLk XW3g== 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=Z8NG8jjmr/JGXqAg+aJUyoqWhPhdI8A3gx7g86xFHnM=; b=q4sDvXf7mHRaA9/GFnQobdqR/2N1LJKptdWUYqT4dbmeZ1m4Jf2wYnZXoOeU3nhWZr 0gjkH84r+ILJcRm+BgfvkH0AT49ELtKNrIWZia1icwljyzd7wXONevZQ+8iSSdeysEmg Swwq0lsXFgmo8AccfhHzICjYhnvz2LzrwF6HE/RKxr5gQhmSLHbMBWjSaTn7cJmmD2e2 Jgn7k+oMxFur7XCUbEX9VPLk/jO7sepnIbaSbBPGWD2Pt5LDARC1an92dDF12r3Z75m2 ukUq9js+Io9zX/1XVfu5HWpNdNfIN2nxDbZiws+yL0381gQQVvRbylP+nTIIQ14oW9iv BAyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tomeuvizoso-net.20150623.gappssmtp.com header.s=20150623 header.b=2A5uGUL5; 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 t73si643768pfk.319.2017.11.16.01.48.58; Thu, 16 Nov 2017 01:49:14 -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=2A5uGUL5; 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 S934098AbdKPJVb (ORCPT + 91 others); Thu, 16 Nov 2017 04:21:31 -0500 Received: from mail-io0-f177.google.com ([209.85.223.177]:37859 "EHLO mail-io0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934078AbdKPJVJ (ORCPT ); Thu, 16 Nov 2017 04:21:09 -0500 Received: by mail-io0-f177.google.com with SMTP id v21so4571294ioi.4 for ; Thu, 16 Nov 2017 01:21:08 -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=Z8NG8jjmr/JGXqAg+aJUyoqWhPhdI8A3gx7g86xFHnM=; b=2A5uGUL5xKAW+PiaeWAbiql9q2j02SAnLKfv2ZNUTzbGFD8mmh9yyTj9B8Eq+wb2D8 mlfBDyXvPB9TXCdkO6nLOOD30SA/nRVhFdaVeDNOrMvSca6oApH2WAZik+o0fASm/11G P7ceww6SUasesi1MpZ9Qd7WPpXwv/Z2IvgnYmoY37BqPIzSjRQYt12OTDygx98O6DhLe IHFbvH3pmIJEES5eV+5W0dG7vP48miYH2EZmul+x+LmkvJ4KrxVs71C+tuHVChUGtKY9 KZoCr3KKv430Pt2QHDqevVtHxWWTdQZZbb8TWFbuLvT2DoYiGOxWIoeAgusG2MK8A74a TuuA== 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=Z8NG8jjmr/JGXqAg+aJUyoqWhPhdI8A3gx7g86xFHnM=; b=AAeZgeimFlHME2Bv55tDQacyWKmNr4uhmTzhof2EWcKHJAGHSG/Ck3o9GGTnJROOil modG8w+BIYWsf3yakKGFq6FrqLJXlDAbrb3xAH0c0owLENcFiBL1mk7TJkxm60JDSSpv 5JYv62bR0fiITEGnEF+ETNO9SZsRe+dq/vXNoygRFDoezJWyWzlfQ3vMPipWdoWWyO+9 StBwuqBXQzGLJVE8sTWA35S6ymZlFxDP3mpOgxbo+LaBRmmGFI0znoYopEvXAG3lCnYO ILc5qPIy06h2GxjhrZb/aqkG4pLCwohdNpOMJThK5NcBzdkoMLWo5MkBvCVnDr1qCo1+ jTyQ== X-Gm-Message-State: AJaThX7q2rak8d+Hf237h3E6b0BLx77EKvWWHx+Qr4H1a10MjsClm/RQ wvlgNMd6mOSb4RwRcyTwkxQspl8JcVA= X-Received: by 10.107.112.4 with SMTP id l4mr764161ioc.261.1510824068234; Thu, 16 Nov 2017 01:21:08 -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 v19sm607029ite.4.2017.11.16.01.21.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Nov 2017 01:21:07 -0800 (PST) Received: by mail-it0-f44.google.com with SMTP id m191so5144826itg.2 for ; Thu, 16 Nov 2017 01:21:07 -0800 (PST) X-Received: by 10.36.68.13 with SMTP id o13mr1452322ita.56.1510824067475; Thu, 16 Nov 2017 01:21:07 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.133.199 with HTTP; Thu, 16 Nov 2017 01:20:47 -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:20:47 +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 , Guenter Roeck , Zach Reizner , regressions@leemhuis.info 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 And now with the correct email. Sorry about that, Tomeu On 16 November 2017 at 10:16, Tomeu Vizoso wrote: > 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 1583486391291293814@xxx Wed Nov 08 08:38:21 +0000 2017 X-GM-THRID: 1583351961755078136 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread