Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2414993imd; Fri, 2 Nov 2018 11:00:09 -0700 (PDT) X-Google-Smtp-Source: AJdET5fs2rYOLVL7B1cMPoiTw9atTlhCLYz8yPoMtpNPlpcc4kJzI9t20hNnR1FOiISB1yrhyVmR X-Received: by 2002:a62:2542:: with SMTP id l63-v6mr13027508pfl.64.1541181609370; Fri, 02 Nov 2018 11:00:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541181609; cv=none; d=google.com; s=arc-20160816; b=Gk3Vul5wrqEkq7kuT/pvH+q27SaSBY2ibQu6AieGTFGS4pfhJLC1Dk/ml60VHmMKNH uaCTRJ+6wLkkzLcoPD9ZOkP1G0tUB0FjhftqOdoXIneih7EHYaaF96vw+Q1F2V8tyjOW 2bJENM9Am/p0TENR3jK8L0MwcqpbwlSFTx1wOPHWpOdvWEu8nCQ99Ix+utvIZsx/Lyn5 IF680HQtveSI3qncdtwOobGDLbV9DzDVKOUIa67eXoMvxZc9XaKeP/1G5TjJrS6pYZSw DouYEBjrzsLMZzDh+GISakiuC0gdFW08fzC9oV8EoB92S6cJG9A/1gzbVk7xiQVGTzaI 4nNA== 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 :mime-version:dkim-signature; bh=rQmqZuno2zCIkAysoPQ/5FB5W+StQaQRHHNNFWMyqRw=; b=BelEFg2UoZvcE0wrwqiQeJjgntRqzeZGMhTeJSe2Ia7ZW5+lP6+ZB+tMLJGMccVHkO DGgwHfD6hLgvkS2NqSP3Wbp5d9wafuqYPmX/4i2BUo0JpvbFu8BRGugVSnJLN6eA9+HF aoXUHl+vOaSlw2oxrTqUGypgrx4PuiHWXur+YgOu1RRPoO4HwRvHUnASTIQQ0YoYKNK1 zGekrsHnWsJZ/bHPCmyLOzhPOAfPINLID486/VNazWr0IVRqwdcgnFWJFNulpmwAnsJp CD3kGfmbl7EnyVr5UyJJDowmogMI35RRG6z8AtS+WPsgMO3LNhJMP83uKMssABKR8fjF i88g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=M5EtJuTL; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j5-v6si17056361pgq.573.2018.11.02.10.59.47; Fri, 02 Nov 2018 11:00:09 -0700 (PDT) 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=@google.com header.s=20161025 header.b=M5EtJuTL; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727828AbeKCDHT (ORCPT + 99 others); Fri, 2 Nov 2018 23:07:19 -0400 Received: from mail-it1-f194.google.com ([209.85.166.194]:39862 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726085AbeKCDHT (ORCPT ); Fri, 2 Nov 2018 23:07:19 -0400 Received: by mail-it1-f194.google.com with SMTP id m15so4302312itl.4 for ; Fri, 02 Nov 2018 10:59:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=rQmqZuno2zCIkAysoPQ/5FB5W+StQaQRHHNNFWMyqRw=; b=M5EtJuTLjv0NClBlQxB3n+H0ODWX6RLPrYKe3XZVbTr54QROkoY3Ol66ENyWAl4c5w wcYU8NzNS3jCr5kpidDVnVWWwibSXTqihtRmoHRpj9DFHYaFbhV7j7GVkx7DxyzWkuPj K8DoO1abyEk7FFHfANM91MFB6f7+45ZJfK+ltGm38OlZK1xHqmVIDrdOXaO6VAPrpU9R u1wATvkr1Kn0rwvbvk/+YX0bnV/haYX3rtojSSHllYhEdZj40+8y/PsQcskdkSj0tIPI dcdZpXHeEiu45Ae3mh3PVToSOBO06ZMKvennXu2D395vcEyWhGqkMiqnwkpyIo1e9xcs 3fBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=rQmqZuno2zCIkAysoPQ/5FB5W+StQaQRHHNNFWMyqRw=; b=EaZRTyYINT9Q9mjgaJrds7L4ei6/Z1WaSOacrLg4SNiCvecawtqKOAKSRiKr0Cr5Fy b0lV3mcWGvobNQjbpwxVDt/cdBCNMC7iRmbNbNGWlmCnHFXdGz1Ugu/HCPDBMfxJtVak V+X6gyHI4Dz/WJ6YCzzQzA+690XqMfXrY8vkWbV4MfiAhzYqXZAHDR593ebzSu9J6bPY a21omBn3DE0K2doD+oVyyZ6Hf6ctSxIiR+cQ/EQnCz3xgyyGrlaVHuirBcWhotrm9Kwz edpCVfCxGKJhrCydD9KrDaC54yIEIS/DQjTdhW8VEcEmStJ2vRvLeM+GOWRuy/DLCtp3 V43g== X-Gm-Message-State: AGRZ1gIrgllbYBbyZqfdwdFiFqzaMcKvK6bSM4ZY96Xs0aqUBobO6FLH r13s95ocCOVuHPIfTx4t+9ht6OV07ui9gU5oWJf8yw== X-Received: by 2002:a24:7fc8:: with SMTP id r191-v6mr4674itc.107.1541181558114; Fri, 02 Nov 2018 10:59:18 -0700 (PDT) MIME-Version: 1.0 From: Alistair Strachan Date: Fri, 2 Nov 2018 10:59:07 -0700 Message-ID: Subject: "x86/mm: Introduce the 'no5lvl' kernel parameter" broke SETUP_DTB? To: kirill.shutemov@linux.intel.com Cc: mingo@kernel.org, tglx@linutronix.de, hughd@google.com, torvalds@linux-foundation.org, peterz@infradead.org, linux-kernel@vger.kernel.org, kernel-team@android.com 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 Hi Kirill, I noticed that booting 4.19 in qemu while injecting a FDT using the "-dtb /path/to/blob" feature might have been broken by your change 372fddf70904 ("x86/mm: Introduce the 'no5lvl' kernel parameter"). This manifests either as FDT corruption, which causes the setup code to fail to unpack it (i.e. corruption of the device-tree structure), or simply bad node data. If I make the below change, the problem goes away: diff --git a/arch/x86/boot/compressed/pgtable_64.c b/arch/x86/boot/compressed/pgtable_64.c index 8c5107545251..bfe5aca71254 100644 --- a/arch/x86/boot/compressed/pgtable_64.c +++ b/arch/x86/boot/compressed/pgtable_64.c @@ -40,7 +40,7 @@ struct paging_config paging_prepare(void *rmode) unsigned long bios_start, ebda_start; /* Initialize boot_params. Required for cmdline_find_option_bool(). */ - boot_params = rmode; + //boot_params = rmode; /* * Check if LA57 is desired and supported. This can be reproduced with the system-root.dtb file in https://android.googlesource.com/device/google/cuttlefish/+archive/master.tar.gz using "qemu -dtb system-root.dtb -kernel /path/to/bzImage -drive file=root.ext4" on x86_64_defconfig with CONFIG_OF_UNITTEST enabled. If the FDT is unpacked successfully, the /proc/device-tree/firmware/android/compatible file will exist, and contain the string "android,firmware" instead of junk. I'm still looking into the root cause for this, but I just wanted to let you know. Alistair.