Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4813534ybf; Wed, 4 Mar 2020 11:11:19 -0800 (PST) X-Google-Smtp-Source: ADFU+vv0NYJuYB8MikDvlsqg06XMQREvap2JC+OjzcFUK8vFoEtrfK+yac6R9/3SGmtFq9UPbJyZ X-Received: by 2002:a9d:7a56:: with SMTP id z22mr3367692otm.201.1583349079051; Wed, 04 Mar 2020 11:11:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583349079; cv=none; d=google.com; s=arc-20160816; b=Nt2eOYVsrR27r7yoSFVAJI6AQSRlSvcdVfnTRqDo9w9s5z/IW2CUeh0+pB+MxMnbIS Gz0B/LO7/mjxlEPOc9iD0NNECW0D/emun/cDcTzmrfdaI6Di4puiCm3qehmGzgGYlKhH CUoFfXdVcBAO4naPg4Pho/+9vXcxTfodedl5s9giyLm+pJOuu6xMghds4rwimqMk/cK+ zEv2546+DjxovRomcIUP2JcXRnMsEZjx1NH27gqCISBtKovXlHP3nj6dNwjd8ba+gVxV kcf9mK5SzqpEllzBDoeO/j+HQ2DaaG7yksqUfL9drDxI2hw1SIgMecGolodBKxXaBNIh L/yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=nM1dA0CwnvAM+gebairRIvq9J2g7Xu9WpCogn31XPBo=; b=V89XPeMqq3CAJkIhzNEXWoNrc1GooscwZeCK7FDdKrD87mVzQYJT8o1hXDjsIcRxNh JzlcjUfyMDSq8NjMzyghh4Vp7lh6fVQ3g9qGYNhXSjAg26un/BWXnanwEtFKPoXciq5C MpmFhOi+fKkPHRwfIRmBjNeEgRU+3mS+atc4uKYEO2qO/iZir7+2mfVcQEZUFESgaYO3 OeNh+kvfpS6TcXR7o2Dq6m4eMSkoBLr4AJqii1VpMuPVCMKf5jk11kCxsQ5utbFlJOfy Y8Ut2mLnH4bP55CJXYEYu2ILzFpmLUq2qJuu57QMdHsfccRM+E+iu+zJnEIVubtyaV0j /LcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=TAIlV8aN; 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 z18si1628508oid.82.2020.03.04.11.11.06; Wed, 04 Mar 2020 11:11:19 -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=fail header.i=@gmail.com header.s=20161025 header.b=TAIlV8aN; 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 S2387469AbgCDTK5 (ORCPT + 99 others); Wed, 4 Mar 2020 14:10:57 -0500 Received: from mail-qk1-f195.google.com ([209.85.222.195]:41898 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726440AbgCDTK4 (ORCPT ); Wed, 4 Mar 2020 14:10:56 -0500 Received: by mail-qk1-f195.google.com with SMTP id b5so2765351qkh.8; Wed, 04 Mar 2020 11:10:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=nM1dA0CwnvAM+gebairRIvq9J2g7Xu9WpCogn31XPBo=; b=TAIlV8aNIDDYyO3ACIaObRlbYK3dBnJamRbkfvCJbacLxiZgD7T6PhJrwsOM/t+BJ3 pPWQVc2vDWHmcy+DS3TCkwxR+VnZAwBU9KoRg2adXHYZhWIlu1he3j6pukRHDnbKveGV WhRW6QUl3vlCIM2AN7JkH9xdtJuahL0JrtLGc3rOa4/UykNbHqYvj2639Jk7f6NzsBSk cgD3EdIWOeGy9DsqMhAmqK/iYgJJ092oG4XT24lb/VPaR0ItDN51TeqD0d/XGH+0ip05 lbndHnePSLHZVULLe27S1rUALeGOx1+U7kdqri+VEnnGYXt5FnNLHhu+Eanxp0Wcfi6N 7KpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:date:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=nM1dA0CwnvAM+gebairRIvq9J2g7Xu9WpCogn31XPBo=; b=ryrasN/sjNGeKQ+HG2XGxOVvuzTkkGtIds9m7Yp03CWkW+3cFGKZ0n16/pnOsvLF5W 8P8mXUJeNbwA0CH4y4HzrOgVjjlnwgoPlDBJRW4dK7aW1bFYNuGTCZAydrAyfhyVcB3U ZIV1u2+YxIkkcRVMZ8bK3/JKR/cEQUlRYJDaBeh7G5QHC+Yzo3HSUgsLLzQpqDMT2n4T 3eMy7T734350JPfi0iDas9uJaBG30VYzwHaPgr5xtfQ0d4iNdpmfxiiLuCKllFTa3YEO kDN99Cmh9Gs/iqSf9zUEo8cjAKkUrJX/38UJZQ4J2QMkiV2fITDPXDFsoMkcwUzl9mXE WzoQ== X-Gm-Message-State: ANhLgQ3g6qC6fsOkBdZZmGUlePIAUJLkpA4Sdfqo0TKX4uUEzo99oJfV G+kMFlvdgzJdKL2eVYmZ4tU= X-Received: by 2002:a05:620a:5f8:: with SMTP id z24mr4396267qkg.203.1583349055725; Wed, 04 Mar 2020 11:10:55 -0800 (PST) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id 89sm14483809qth.3.2020.03.04.11.10.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Mar 2020 11:10:55 -0800 (PST) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Wed, 4 Mar 2020 14:10:53 -0500 To: Ard Biesheuvel Cc: Arvind Sankar , 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 Subject: Re: [PATCH 1/4] x86/mm/pat: Handle no-GBPAGES case correctly in populate_pud Message-ID: <20200304191053.GA291311@rani.riverdale.lan> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 04, 2020 at 08:04:04PM +0100, Ard Biesheuvel wrote: > 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 No, this case is exactly one that should break. But I think you're running on a processor model that _does_ support GB pages, as shown by the "pud" mapping there for the 1G-2G range. At least for my version of qemu, -cpu Haswell does not enable the pdpe1gb feature. Which cpu did you specify? Thanks.