Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3008961rwi; Fri, 21 Oct 2022 10:19:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM71xmg4EpwNwbpwUWRNBH7TRS1VN8A3YoznCFbHiR4+nowHXgXZCaQ2T2yvvmBa4SD3eVs9 X-Received: by 2002:a05:6402:27d4:b0:45d:a69e:336d with SMTP id c20-20020a05640227d400b0045da69e336dmr18325408ede.298.1666372796774; Fri, 21 Oct 2022 10:19:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666372796; cv=none; d=google.com; s=arc-20160816; b=LVDQXglBG7vfCaHRcqoVDbjshFgHxxvh/ct+PJqH7VY1RV4U0Cc/O+ifCHVYUnN1XG gwNDh4uosdJcxq1mXRv98wbrMrNejjUla32xvLfOQGyG15T3QufnW7DSb51jbRP7fUKV v96tHy2NiQ7uLH+jc218OgCqWrR68N80sJxVablgL/BhZrPJGnPcPmNR6zb/VPYC1YNT vzaMWaxnM+++bFuc97sf45XDtGRajEoggYluSsmteUwGwJp6zJz7pIJREcjLJPekV6DK L0LOqdjpQEy0m7KyrWaqd9NG6kqV9o9TF9nNrH1+0PIntIYNFATMI3LO3SKO5Bt0PqHw /BkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=aZtBH3hoHoyLKHZRtw1whotmEhRsDJhNWbtzAg1Amnw=; b=AbAL5pzaRAtfHNfsFP5YQngfB1cbHXiWTIG3+WG9EiFCdiKi7YkDk/1XmpR/mgpXTj P4Pftx4kKi5BkpZFj4p24NTmJ1cK0iNIfS+HDxHKiDO1QTgvDLE9dI1E8IdZm4ML/LXQ qIMKsAQqKcMLsJQB/ufXP71QLBuyPB2EWnxl7eE+PIDdrg/xsePdFLHZW849JS4a7o7I s0vm/Fouuc5zDoX8KKCX3IJrQlXGM3d3cQ0Bpx2QQvjsEiqQlPYoB5kJVtJ4Vaf3bGlv GiWObJHaK1uXfZHCRyXfxg+qTqW3fWGr4Xuz5X6iYOfWPI0r+GpQURHMl6Zv063UCI6z LpBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=hgVq1BGI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w2-20020a05640234c200b00450bda7e3fdsi22441332edc.28.2022.10.21.10.19.31; Fri, 21 Oct 2022 10:19:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=hgVq1BGI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231459AbiJUQlA (ORCPT + 99 others); Fri, 21 Oct 2022 12:41:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231334AbiJUQjN (ORCPT ); Fri, 21 Oct 2022 12:39:13 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B71328B1B2 for ; Fri, 21 Oct 2022 09:37:54 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id f9-20020a25b089000000b006be298e2a8dso3756312ybj.20 for ; Fri, 21 Oct 2022 09:37:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=aZtBH3hoHoyLKHZRtw1whotmEhRsDJhNWbtzAg1Amnw=; b=hgVq1BGI9uAPQNPd5svcoZ0uICUDeObQg8sjHrHyUINwI5zeVQNqGOHjoo/I6apJKi k/JHaeZ4Yl0qrBsh6RDFwRouNrgEUvtGuCUfpRfpfN4sO+Xf2T8PiR1oaMkO0yS/UNTz 23yBS9W01SZ1r6pO17zULLRSmQAG2HfnAL6Oj1CQ5zD5aGiHW6MLxM2mYGGk74xNkJVY PqQQmAGOeK1qbySxR4UJaQgs9hCNXsrXirmumCJnGX6I+NXqom+pwXFznBlBrvL3S+zD jT93upMwLSjpb8myFKnMEGe3Y5MDjPbD5ykOxmhldKIp5uvY/jR4K4NRBGpRWxnp01tl jMzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aZtBH3hoHoyLKHZRtw1whotmEhRsDJhNWbtzAg1Amnw=; b=0tAWEkzxssSMde6OIaUykJVpz1t9uMOAg0ko8Ek2ZJC+MbQFrQVv0LkR8Dyd61WANH R5XEs6+XfUgtI+G9sNaBA4rps00+HiQN0H0UlUeGApVyuF45BB2+RHetlPamUS/HSId2 GozY6Kvon5LWTAIQrmY9rf6VJTGRlxE5Af47M8RSmXCGGBRBG/5ieKnimCrJRoE/NhKO X8ufjwbAxZNm0p8gQSheKWKTrSoqeHSEOO52ckioy5WpER+AFcSbFRw2i/uWeLueaLHZ aoDyarFRvnOYWO80CDQLjLiTq6EfThB/OwbzBqNB1okzD3WdJc1LStLh0+e6HIhrMb4W vpwA== X-Gm-Message-State: ACrzQf0QSXuZYp0CkXO6A9MW3UsEpDkkZo+ruqUOo23xJ83qGX3JKedu dfoP0+/tT1vbzk8Qo75IE60xvREDpAoHznwC X-Received: from jthoughton.c.googlers.com ([fda3:e722:ac3:cc00:14:4d90:c0a8:2a4f]) (user=jthoughton job=sendgmr) by 2002:a05:6902:1083:b0:6c0:7c4f:f093 with SMTP id v3-20020a056902108300b006c07c4ff093mr17523772ybu.25.1666370273909; Fri, 21 Oct 2022 09:37:53 -0700 (PDT) Date: Fri, 21 Oct 2022 16:36:56 +0000 In-Reply-To: <20221021163703.3218176-1-jthoughton@google.com> Mime-Version: 1.0 References: <20221021163703.3218176-1-jthoughton@google.com> X-Mailer: git-send-email 2.38.0.135.g90850a2211-goog Message-ID: <20221021163703.3218176-41-jthoughton@google.com> Subject: [RFC PATCH v2 40/47] hugetlb: x86: enable high-granularity mapping From: James Houghton To: Mike Kravetz , Muchun Song , Peter Xu Cc: David Hildenbrand , David Rientjes , Axel Rasmussen , Mina Almasry , "Zach O'Keefe" , Manish Mishra , Naoya Horiguchi , "Dr . David Alan Gilbert" , "Matthew Wilcox (Oracle)" , Vlastimil Babka , Baolin Wang , Miaohe Lin , Yang Shi , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, James Houghton Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that HGM is fully supported for GENERAL_HUGETLB, x86 can enable it. The x86 KVM MMU already properly handles HugeTLB HGM pages (it does a page table walk to determine which size to use in the second-stage page table instead of, for example, checking vma_mmu_pagesize, like arm64 does). We could also enable HugeTLB HGM for arm (32-bit) at this point, as it also uses GENERAL_HUGETLB and I don't see anything else that is needed for it. However, I haven't tested on arm at all, so I won't enable it. Signed-off-by: James Houghton --- arch/x86/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 6d1879ef933a..6d7103266e61 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -124,6 +124,7 @@ config X86 select ARCH_WANT_GENERAL_HUGETLB select ARCH_WANT_HUGE_PMD_SHARE select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP if X86_64 + select ARCH_WANT_HUGETLB_HIGH_GRANULARITY_MAPPING select ARCH_WANT_LD_ORPHAN_WARN select ARCH_WANTS_THP_SWAP if X86_64 select ARCH_HAS_PARANOID_L1D_FLUSH -- 2.38.0.135.g90850a2211-goog