Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp2705829rwp; Fri, 14 Jul 2023 10:02:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlHA2Tmg1NXgl814C/TDKzuwNO8FejNhvz2nmWRzC7TlxYEWUbdi+lOtq04xzrPVoomljkP5 X-Received: by 2002:a2e:a410:0:b0:2b6:e7ce:4e7d with SMTP id p16-20020a2ea410000000b002b6e7ce4e7dmr4353191ljn.43.1689354121696; Fri, 14 Jul 2023 10:02:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689354121; cv=none; d=google.com; s=arc-20160816; b=F1D2fS+6VVB5m3QkNRAvG9nm4kaPvp5V/mroGHRZw5Va217W0N4ewGM9wG5ZOG+6J3 OsNZzUGyuycbMoiCuo+q6yGJBEJGa5bhucd4Dtf9mts3IU8g7cagx7qe1d2Xw5r/zxFH nhoDaj7BGAxhJaWC7epXUTsepDr9BUbVMk/WwIKgLxJy9OhQls5+XM56JrE9JfW0+TWl 0UZlB6hFbWWMJOf5qNV5FdKZxlX9Q3imOAVIDVp48bFT+4PqhWjIz78n4dZIPj3O3puu BzFSB+DvmZ6WB5adppIDbJ9B3QNB9R4vuKxx5893kfctV56FjTPc0pTLKNxXmdGwgL6J EIcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=QQ1uI9q9sU2ZQAZveePTsLb5K8q5kCpO4NQiP7h7UI4=; fh=CNkdKMjnSsMGtrkx7f/i88MELp5rjn8befyxgJTrFC8=; b=nuGQksThFXVOkVWfskoaFOu2emrPYBg/D4yd4MwUIU80ajNi2bR7tz/PnAKodyZexW sxuzdMZ8HEwb73c5OOwXdvfJ0PlBOXDRR4XHYNgKVYkJ/PxYFou3J9JW4E/IMJijXeVz v4HMIasPpYqm5GqR2GpLgU4I9eyT+cCKTDUAfLXzf6Xs6d448/4xozvImiVZZDgQHhxO 3wP0ZpWrmZt4kxTGzsCzRLqBQBC+KAVtALwDNaymPGxfcgvrhs4h6oY1g3jb6YPCpOdt qRiuR1dMqowHFUdm0j94/tkjpkJiOXWD0E41vMIx/tumyrEi53dSKmjbfe8i+qFHYqJ4 h0Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=okKHAWGl; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w17-20020a1709067c9100b0098e2aa0bb92si9307491ejo.137.2023.07.14.10.01.36; Fri, 14 Jul 2023 10:02:01 -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=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=okKHAWGl; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229557AbjGNQgv (ORCPT + 99 others); Fri, 14 Jul 2023 12:36:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235332AbjGNQgu (ORCPT ); Fri, 14 Jul 2023 12:36:50 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D49A2D48 for ; Fri, 14 Jul 2023 09:36:48 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-666ecf9a081so2036759b3a.2 for ; Fri, 14 Jul 2023 09:36:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1689352608; x=1689957408; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=QQ1uI9q9sU2ZQAZveePTsLb5K8q5kCpO4NQiP7h7UI4=; b=okKHAWGl0HU/dDrm6Nylyw0ZW/1JCHS/YMnhiAbqBiwVuC7bV22VAGkf0/nuqrB3uU Yf1l+ZCIuKAn94NDuPC1XHoJvcrFPq0jcjOED2EfZtC7m1tuPSxaeoEqhIfjyQqtZNfu ++h6EsvmIkc82XsLvzI+3JciPpWTaYKHDf0tbTGqzGIr1ho8NYiRaYeZHRRWhWtJmczL wTBb+W3qmkk9UThIjLWQUorLv3HScFA/HrAJGclQDgwHpRU/o3FzuyfIK4JrdszVHwNs Z3y+v4PsYLeiInACqeCeScTBn2paFWDP5917TuipB4tZxbxDQW2Gt4DG9rUa37w2czQB m9Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689352608; x=1689957408; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=QQ1uI9q9sU2ZQAZveePTsLb5K8q5kCpO4NQiP7h7UI4=; b=mESHEgJGE6iaT+4Zvyp13hxp8oqukXs+UHDmWidGOzwd1eG0USt/CsFW17Wr+d06ON U1yv0ThfjbBofLNA3Jo8YQCefXB4ZTrSpY8LvA7hn/++ir/C83HLRL0IItDy2wgbo8ZD /RTblXt+Csx4u2Zg+lV4ROIr9tA4kWb/fi6HGXdpkYEFhMnFLis8nTnCJMjcf5O2MJHv 7kUF02+fwWZsqmpdToX3uQKiJHA9ByelaRc6DOs4FI0OLQKZy72UkBzNHR5qfj/d6Dxl nh0GtdezgV3kZ6i/xMAq8crvjCYuS1w085MrJHeSn85O3SdPqcxh01otMv6DIr+8DdBm +Piw== X-Gm-Message-State: ABy/qLYEuqsQ779bG12FIHTuksLWpvk77Ht+GVpjPXcMLhLl51I7dM7J 7RMOEvGwGOByK1nJFoFkAdAa1A== X-Received: by 2002:a05:6a00:16c4:b0:676:399f:346b with SMTP id l4-20020a056a0016c400b00676399f346bmr6889692pfc.1.1689352607578; Fri, 14 Jul 2023 09:36:47 -0700 (PDT) Received: from ghost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id fm10-20020a056a002f8a00b00640f51801e6sm7373618pfb.159.2023.07.14.09.36.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jul 2023 09:36:47 -0700 (PDT) Date: Fri, 14 Jul 2023 09:36:45 -0700 From: Charlie Jenkins To: Conor Dooley Cc: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, paul.walmsley@sifive.com, palmer@rivosinc.com, aou@eecs.berkeley.edu, anup@brainfault.org, konstantin@linuxfoundation.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, mick@ics.forth.gr, jrtc27@jrtc27.com, rdunlap@infradead.org, alexghiti@rivosinc.com Subject: Re: [PATCH v5 0/4] RISC-V: mm: Make SV48 the default address space Message-ID: References: <20230714001430.75798-1-charlie@rivosinc.com> <20230714-hangnail-stinking-60f9725ac0d5@spud> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230714-hangnail-stinking-60f9725ac0d5@spud> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On Fri, Jul 14, 2023 at 12:17:00PM +0100, Conor Dooley wrote: > On Thu, Jul 13, 2023 at 05:13:59PM -0700, Charlie Jenkins wrote: > > Make sv48 the default address space for mmap as some applications > > currently depend on this assumption. Users can now select a > > desired address space using a non-zero hint address to mmap. Previously, > > requesting the default address space from mmap by passing zero as the hint > > address would result in using the largest address space possible. Some > > applications depend on empty bits in the virtual address space, like Go and > > Java, so this patch provides more flexibility for application developers. > > The patchwork automation failed to apply this, what is the base for the > series? I forgot to pull in the changes to the riscv selftests so the conflict is in that Makefile. I will send out a v6 with the correct base. > > > > > -Charlie > > > > --- > > v5: > > - Minor wording change in documentation > > - Change some parenthesis in arch_get_mmap_ macros > > - Added case for addr==0 in arch_get_mmap_ because without this, programs would > > crash if RLIMIT_STACK was modified before executing the program. This was > > tested using the libhugetlbfs tests. > > > > v4: > > - Split testcases/document patch into test cases, in-code documentation, and > > formal documentation patches > > - Modified the mmap_base macro to be more legible and better represent memory > > layout > > - Fixed documentation to better reflect the implmentation > > - Renamed DEFAULT_VA_BITS to MMAP_VA_BITS > > - Added additional test case for rlimit changes > > --- > > > > Charlie Jenkins (4): > > RISC-V: mm: Restrict address space for sv39,sv48,sv57 > > RISC-V: mm: Add tests for RISC-V mm > > RISC-V: mm: Update pgtable comment documentation > > RISC-V: mm: Document mmap changes > > > > Documentation/riscv/vm-layout.rst | 22 +++ > > arch/riscv/include/asm/elf.h | 2 +- > > arch/riscv/include/asm/pgtable.h | 20 ++- > > arch/riscv/include/asm/processor.h | 46 +++++- > > tools/testing/selftests/riscv/Makefile | 2 +- > > tools/testing/selftests/riscv/mm/.gitignore | 1 + > > tools/testing/selftests/riscv/mm/Makefile | 21 +++ > > .../selftests/riscv/mm/testcases/mmap.c | 133 ++++++++++++++++++ > > 8 files changed, 234 insertions(+), 13 deletions(-) > > create mode 100644 tools/testing/selftests/riscv/mm/.gitignore > > create mode 100644 tools/testing/selftests/riscv/mm/Makefile > > create mode 100644 tools/testing/selftests/riscv/mm/testcases/mmap.c > > > > -- > > 2.41.0 > >