Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4808636ybf; Wed, 4 Mar 2020 11:06:08 -0800 (PST) X-Google-Smtp-Source: ADFU+vsHiPLfasS9qboBjPrhEJ/OoHrQ0AEu7imXp4ycXWkVz+MRmJBghvVAwbUIfDexRIcpjFNO X-Received: by 2002:aca:b7d5:: with SMTP id h204mr2734850oif.130.1583348768553; Wed, 04 Mar 2020 11:06:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583348768; cv=none; d=google.com; s=arc-20160816; b=WQqHnbrP05DFkiTlX0vpibZRgvdDB7sYLVjuTfLKzECxr3ehr0w81zd/bcvLimgBya ZKpivvAAMJDrVUJZcWxYp5ic+/pRqo146DEv040OEfHAzBArsOXR9Coh3YtrFK31Vfke 7UDkGZsEVIPVAslZg5M4I3Y5hdr9KcENU9Qvn25vY9BhsX05bYLjMDRY339uqLo9Bbpy Wv964Ub5MjQ5QMRMSJhu8larAl6AbL59qmfyyBAolmvs3EnJFzw9yW8qOe1JfvuXcocw q4/JHiw/HXMxHYA+S3uBLalVl+tAOQyhA2kLCA/tsEBKG4T9nU5W9OO6uUHs10WZlfVC rhnQ== 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 :in-reply-to:references:mime-version:dkim-signature; bh=T5IsoMjqfWddFM1UDEzLND8hgisFG5izGokLhMZ+uBw=; b=GP3KSUEU+F2W7JJjhO5TgbZkWtmQC1pou6guQsWPQH6eJfBqWbuOL3LDtgOeqj/oUO TXLk8GAPF69gXGNzHVl+TDv5GSE+I8dAjfDrArj2p/qS/BlfcyE4vUSPlMCMKF+yw1/l E3Rt1VypZiD/BPYAzRFSRDqNTzRQh4vEHwVk7qAoWhWwSJIprD2GYDiVUoD4qA/3awy1 j6TlbfnDizs1dL5Z/iP/kSMXc+PaDBT8cPmgnNQD+tREWA3UVyWoRyCQdE/sAXoGLqEF 2+gex/DM6KurBBUQW2LJuvBXlJ9FfITWIXZTjYvZOrsNvoD+kbVmtwo8XK4p66+xAP9e h5iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QIqc975Y; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d22si1776795oti.316.2020.03.04.11.05.56; Wed, 04 Mar 2020 11:06:08 -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=@kernel.org header.s=default header.b=QIqc975Y; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730169AbgCDTES (ORCPT + 99 others); Wed, 4 Mar 2020 14:04:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:39638 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727528AbgCDTER (ORCPT ); Wed, 4 Mar 2020 14:04:17 -0500 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B0B0524677 for ; Wed, 4 Mar 2020 19:04:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583348657; bh=hJurs/av6t9EdSglXfHGBNi3KPMs5TYGjABwzZDQpvE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=QIqc975YYSbTdnPOs8FNUDH6hSs32LUwNkUIKDwZt0hy5IENjOq+mLlbMqqfA2YFJ 46bOeKDC0ID/iz2t431gDQPHKTv3A6ikLMV5+kUCteYRzOjDy3VNbmW5kTwpCDBWHg kYya9bod/N6YiVWt8jo7/AmHpzQ1Zlk0TOl8DneE= Received: by mail-wr1-f43.google.com with SMTP id j7so3801375wrp.13 for ; Wed, 04 Mar 2020 11:04:16 -0800 (PST) X-Gm-Message-State: ANhLgQ0BDf741kQiKn7/pFHjVGSL4lr8LVov7w7VF108eQ8phBQh7c3P s44vNM6rIh0e62VOYVVHOYKMn7mdqHkMP0u3asH88A== X-Received: by 2002:adf:e742:: with SMTP id c2mr5384523wrn.262.1583348655022; Wed, 04 Mar 2020 11:04:15 -0800 (PST) MIME-Version: 1.0 References: <20200303205445.3965393-1-nivedita@alum.mit.edu> <20200303205445.3965393-2-nivedita@alum.mit.edu> <20200304154908.GB998825@rani.riverdale.lan> <20200304185042.GA281042@rani.riverdale.lan> In-Reply-To: <20200304185042.GA281042@rani.riverdale.lan> From: Ard Biesheuvel Date: Wed, 4 Mar 2020 20:04:04 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/4] x86/mm/pat: Handle no-GBPAGES case correctly in populate_pud To: Arvind Sankar Cc: Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "the arch/x86 maintainers" , linux-efi , Linux Kernel Mailing List 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 On Wed, 4 Mar 2020 at 19:50, Arvind Sankar wrote: > > On Wed, Mar 04, 2020 at 07:44:50PM +0100, Ard Biesheuvel wrote: > > > > I've tried a couple of different ways, but I can't seem to get my > > memory map organized in the way that will trigger the error. > > What does yours look like? efi_merge_regions doesn't merge everything > that will eventually be mapped the same way, so if there are some > non-conventional memory regions scattered over the address space, it > might be breaking up the mappings to the point where this doesn't > trigger. I have a region [ 0.000000] efi: mem07: [Conventional Memory| | | | | | | | | |WB|WT|WC|UC] range=[0x0000000001400000-0x00000000b9855fff] (2948MB) which gets covered correctly [ 0.401766] 0x0000000000a00000-0x0000000040000000 1014M RW PSE NX pmd [ 0.403436] 0x0000000040000000-0x0000000080000000 1G RW PSE NX pud [ 0.404645] 0x0000000080000000-0x00000000b9800000 920M RW PSE NX pmd [ 0.405844] 0x00000000b9800000-0x00000000b9a00000 2M RW NX pte [ 0.407436] 0x00000000b9a00000-0x00000000baa00000 16M ro PSE x pmd [ 0.408591] 0x00000000baa00000-0x00000000bbe00000 20M RW PSE NX pmd [ 0.409751] 0x00000000bbe00000-0x00000000bc000000 2M RW NX pte [ 0.410821] 0x00000000bc000000-0x00000000be600000 38M RW PSE NX pmd However, the fact that you can provide a case where it does fail should be sufficient justification for taking this patch. I was just trying to give more than a regression-tested-by