Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp557472ybe; Fri, 13 Sep 2019 02:19:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqz96wK5L5j6TOL94P+edmXvBdCnArw1PhGAt8TJTNTCZfq6A+4Y4Zg90tfAIelDopCcrBCx X-Received: by 2002:a05:6402:b2d:: with SMTP id bo13mr45747889edb.170.1568366345819; Fri, 13 Sep 2019 02:19:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568366345; cv=none; d=google.com; s=arc-20160816; b=N2qc0aMxqSBKXI4CXKpLXkt4Lte1Hh/SLHSRR+Ku2zw8/M7PI1mOWI+XNrEDfOaal/ 6JGZdgsQ8zPjfJ06TW1B+goPlfBJnRcUpgaBHq1LeCrWvVZrqknyPN7Tyk6GDt2Qn2Gf 0W/c1MYHMKE/zwfSGtxsn6r746x+f3TSpdb/UHcgcWgH2Q7ExgVJJ4ZXnH533J0kQJ6j yO3jyo44wAn/vgaU1BrjPJiXuHZNUwucHLH3R+QJHQqm+UyQaO5DtG2pHEErsWMI/mT+ ooV4VscesFkm+xYCMsMSBn4zMm7hpOiwgoCaIaIlo/iYmt8E7M6uEzMl2AQE+VFVBWbX lQTA== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=GEliFawsGnvWaq/wjC8o7X+uw8pCAUzjjDt3si5wKpw=; b=OyVmxLU8fPDDqeFOONd81Gw4W1jK42ccFcZaY7vTSFGKkl8OYeznNwsn8xPOxiSZCT bwB9bJQmsc8IiS0Q0P85qT9TpLckjMqqtw+Q8NIee/ro8I5WA+KTsv/aiWxAx8OIJlCN 19YQKgstko45ynmxGRBcr5qvatZHKygmxL4xNl+PLxpeilfZqEjg42Q6J8yOUGIDSGTZ azYmTR5IxqckVBCk1UhRWEvY7rlCBSfQFJpmD6N00Si/0LUZw1Iq+jADxumjXirqSAvi M9Xa0//je0ig67dWcSBwizzUYLnv3iUiiRwjdp9HAXYxr5++tVMr4IB8gnk5YAoi+k/C 8vbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=cuhllGlp; 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 k55si17981460edd.179.2019.09.13.02.18.42; Fri, 13 Sep 2019 02:19:05 -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=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=cuhllGlp; 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 S2387957AbfIMJNG (ORCPT + 99 others); Fri, 13 Sep 2019 05:13:06 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:35168 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387424AbfIMJNG (ORCPT ); Fri, 13 Sep 2019 05:13:06 -0400 Received: by mail-ed1-f68.google.com with SMTP id f24so8802212edv.2 for ; Fri, 13 Sep 2019 02:13:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=GEliFawsGnvWaq/wjC8o7X+uw8pCAUzjjDt3si5wKpw=; b=cuhllGlp2MOrdGub8Xg9DSnbN4UNbu5MAj+tu2g8/hUaiRvqMMOHfTNwMUyS5pk0Wh Cr/5CrT44vV+Lu6MEqICuL5EsXflVt2aB1CYOvw49Ff95R0+EpyudeDA0c1SjKiSBgvJ j392DdO8k5wtN6+t0Mq4Pin3skB6EB7fqWabfD22XoO9Zau3MU3BJhMVCPaEwzZDcctL 3Z1utSLzZkSKBXiuC7y0bwtRfMC6JHyQJ4KI6FWcJD3QstGxSDpCFQt7SWa9ffXb7iM8 Ka/YoQxle3ll0z8qQj2WsoJL1cViPtFo+jeRDT45DkakRyYbR2vwrsjhDwiP9OSANs1/ 05gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=GEliFawsGnvWaq/wjC8o7X+uw8pCAUzjjDt3si5wKpw=; b=MKPOlmkOMaoDAE//GqL1B5GW4zJT1+NmPgmO6iXa38XKEAqASgWqVdUoFtH/MkKy7z Av6OxMe1P+CwTfS1kVODE5hDlrwNgnQjNPHhkFEJW1dl8X8bUpe+yimfLE/k1EJIWE5e UVGQbhJpfqXGWtRRI6ElRUCTvfZ6zZvo5saRQbTPpFvfyhSTFI0gp6FCy5y+j3IMGD0V iVKGPPT0Cc88mJ5l+GIUuJLIMveFjkaC4i7v+Tfu7ANv1+ZrUkR8aV6GtHO/vSzeYEqY mQhI3B792CO7a5S83VxExFu3bEx8Tckb7g4kORqliEupJGNbwS20ksVjtsqvu5Xtagh4 gRtw== X-Gm-Message-State: APjAAAXCgvcB67a00PNALe37a0gkwDNhwiqGhbxbX7tkP5IvAWzHGl/Y OIFMfYn3xaeQS+UxkH8fhEtLtw== X-Received: by 2002:aa7:da59:: with SMTP id w25mr44834467eds.143.1568365983857; Fri, 13 Sep 2019 02:13:03 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id oo23sm3092469ejb.64.2019.09.13.02.13.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Sep 2019 02:13:03 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id 3271B10160B; Fri, 13 Sep 2019 12:13:05 +0300 (+03) Date: Fri, 13 Sep 2019 12:13:05 +0300 From: "Kirill A. Shutemov" To: Anshuman Khandual Cc: Christophe Leroy , linux-mm@kvack.org, Andrew Morton , Vlastimil Babka , Greg Kroah-Hartman , Thomas Gleixner , Mike Rapoport , Jason Gunthorpe , Dan Williams , Peter Zijlstra , Michal Hocko , Mark Rutland , Mark Brown , Steven Price , Ard Biesheuvel , Masahiro Yamada , Kees Cook , Tetsuo Handa , Matthew Wilcox , Sri Krishna chowdary , Dave Hansen , Russell King - ARM Linux , Michael Ellerman , Paul Mackerras , Martin Schwidefsky , Heiko Carstens , "David S. Miller" , Vineet Gupta , James Hogan , Paul Burton , Ralf Baechle , Gerald Schaefer , linux-snps-arc@lists.infradead.org, linux-mips@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V2 2/2] mm/pgtable/debug: Add test validating architecture page table helpers Message-ID: <20190913091305.rkds4f3fqv3yjhjy@box> References: <1568268173-31302-1-git-send-email-anshuman.khandual@arm.com> <1568268173-31302-3-git-send-email-anshuman.khandual@arm.com> <502c497a-9bf1-7d2e-95f2-cfebcd9cf1d9@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <502c497a-9bf1-7d2e-95f2-cfebcd9cf1d9@arm.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 13, 2019 at 02:32:04PM +0530, Anshuman Khandual wrote: > > On 09/12/2019 10:44 PM, Christophe Leroy wrote: > > > > > > Le 12/09/2019 ? 08:02, Anshuman Khandual a ?crit?: > >> This adds a test module which will validate architecture page table helpers > >> and accessors regarding compliance with generic MM semantics expectations. > >> This will help various architectures in validating changes to the existing > >> page table helpers or addition of new ones. > >> > >> Test page table and memory pages creating it's entries at various level are > >> all allocated from system memory with required alignments. If memory pages > >> with required size and alignment could not be allocated, then all depending > >> individual tests are skipped. > >> > > > > [...] > > > >> > >> Suggested-by: Catalin Marinas > >> Signed-off-by: Anshuman Khandual > >> --- > >> ? arch/x86/include/asm/pgtable_64_types.h |?? 2 + > >> ? mm/Kconfig.debug??????????????????????? |? 14 + > >> ? mm/Makefile???????????????????????????? |?? 1 + > >> ? mm/arch_pgtable_test.c????????????????? | 429 ++++++++++++++++++++++++ > >> ? 4 files changed, 446 insertions(+) > >> ? create mode 100644 mm/arch_pgtable_test.c > >> > >> diff --git a/arch/x86/include/asm/pgtable_64_types.h b/arch/x86/include/asm/pgtable_64_types.h > >> index 52e5f5f2240d..b882792a3999 100644 > >> --- a/arch/x86/include/asm/pgtable_64_types.h > >> +++ b/arch/x86/include/asm/pgtable_64_types.h > >> @@ -40,6 +40,8 @@ static inline bool pgtable_l5_enabled(void) > >> ? #define pgtable_l5_enabled() 0 > >> ? #endif /* CONFIG_X86_5LEVEL */ > >> ? +#define mm_p4d_folded(mm) (!pgtable_l5_enabled()) > >> + > > > > This is specific to x86, should go in a separate patch. > > Thought about it but its just a single line. Kirill suggested this in the > previous version. There is a generic fallback definition but s390 has it's > own. This change overrides the generic one for x86 probably as a fix or as > an improvement. Kirill should be able to help classify it in which case it > can be a separate patch. I don't think it worth a separate patch. -- Kirill A. Shutemov