Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751312AbbKIVOi (ORCPT ); Mon, 9 Nov 2015 16:14:38 -0500 Received: from g9t1613g.houston.hp.com ([15.240.0.71]:46525 "EHLO g9t1613g.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750837AbbKIVOh (ORCPT ); Mon, 9 Nov 2015 16:14:37 -0500 X-Greylist: delayed 523 seconds by postgrey-1.27 at vger.kernel.org; Mon, 09 Nov 2015 16:14:37 EST Message-ID: <1447102904.21443.20.camel@hpe.com> Subject: Re: [PATCH v4 RESEND 4/11] x86/asm: Fix pud/pmd interfaces to handle large PAT bit From: Toshi Kani To: "Kirill A. Shutemov" Cc: Boris Ostrovsky , hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, akpm@linux-foundation.org, bp@alien8.de, linux-mm@kvack.org, linux-kernel@vger.kernel.org, x86@kernel.org, jgross@suse.com, konrad.wilk@oracle.com, elliott@hpe.com Date: Mon, 09 Nov 2015 14:01:44 -0700 In-Reply-To: <20151109201054.GA5443@node.shutemov.name> References: <1442514264-12475-1-git-send-email-toshi.kani@hpe.com> <1442514264-12475-5-git-send-email-toshi.kani@hpe.com> <5640E08F.5020206@oracle.com> <1447096601.21443.15.camel@hpe.com> <20151109201054.GA5443@node.shutemov.name> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5 (3.16.5-3.fc22) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2179 Lines: 48 On Mon, 2015-11-09 at 22:10 +0200, Kirill A. Shutemov wrote: > On Mon, Nov 09, 2015 at 12:16:41PM -0700, Toshi Kani wrote: > > On Mon, 2015-11-09 at 13:06 -0500, Boris Ostrovsky wrote: > > > On 09/17/2015 02:24 PM, Toshi Kani wrote: > > > > Now that we have pud/pmd mask interfaces, which handle pfn & flags > > > > mask properly for the large PAT bit. > > > > > > > > Fix pud/pmd pfn & flags interfaces by replacing PTE_PFN_MASK and > > > > PTE_FLAGS_MASK with the pud/pmd mask interfaces. > > > > > > > > Suggested-by: Juergen Gross > > > > Signed-off-by: Toshi Kani > > > > Cc: Juergen Gross > > > > Cc: Konrad Wilk > > > > Cc: Thomas Gleixner > > > > Cc: H. Peter Anvin > > > > Cc: Ingo Molnar > > > > Cc: Borislav Petkov > > > > --- > > > > arch/x86/include/asm/pgtable.h | 14 ++++++++------ > > > > arch/x86/include/asm/pgtable_types.h | 4 ++-- > > > > 2 files changed, 10 insertions(+), 8 deletions(-) > > > > > > > > > > > > > Looks like this commit is causing this splat for 32-bit kernels. I am > > > attaching my config file, just in case. > > > > Thanks for the report! I'd like to reproduce the issue since I am not sure > > how this change caused it... > > > > I tried to build a kernel with the attached config file, and got the > > following error. Not sure what I am missing. > > The problem is that PMD_PAGE_MASK as well as PUD_PAGE_MASK are 'unsigned > long', not 'unsigned long long'. So on 32-bit with PAE enabled your > pmd_pfn_mask()/pud_pfn_mask() will truncate bits 32..43 of pmd/pudval and > you'll never get proper page frame for pages above 4G. Thanks Kirill! Yes, this explains the issue. Since I did not change these MASKs, and I tested 32-bit kernels on a small system, I was not able to catch this issue... -Toshi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/