From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41BB0C001DE for ; Fri, 14 Jul 2023 16:36:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BC7B390000B; Fri, 14 Jul 2023 12:36:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B7784900006; Fri, 14 Jul 2023 12:36:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A3EC090000B; Fri, 14 Jul 2023 12:36:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 91BA5900006 for ; Fri, 14 Jul 2023 12:36:51 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 2EB71A032B for ; Fri, 14 Jul 2023 16:36:51 +0000 (UTC) X-FDA: 81010771422.26.AB3E2E4 Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by imf28.hostedemail.com (Postfix) with ESMTP id F31BAC002B for ; Fri, 14 Jul 2023 16:36:48 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=okKHAWGl; dmarc=none; spf=pass (imf28.hostedemail.com: domain of charlie@rivosinc.com designates 209.85.210.182 as permitted sender) smtp.mailfrom=charlie@rivosinc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689352609; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=QQ1uI9q9sU2ZQAZveePTsLb5K8q5kCpO4NQiP7h7UI4=; b=sttNihlhgoAwV6Sy2TC9uO8jgWavPKiWLG9TGkhilmIZJKs4q+I3obv9KDnNdOW5DcURPG RHEAcpaY0j+mcSsiXCVfx3WHWdpTu0+vcU3250H02ulsRzFvBZlep4X6ElS0z4UKeF853z ssbuG5/JM2Ba31e1OgDerO45RFhRXxM= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=okKHAWGl; dmarc=none; spf=pass (imf28.hostedemail.com: domain of charlie@rivosinc.com designates 209.85.210.182 as permitted sender) smtp.mailfrom=charlie@rivosinc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689352609; a=rsa-sha256; cv=none; b=YiLJUdruL53IsfdRoLylQSKeCNXzuBVCndJX+8/Cf+mPoOka1X55lGrRZSDsHUd+AH4CdM auQFrqR9dSu/ZfuZ4mQE4arp+L1TS16Er3tKp/diVaRnzO/8HTJO9Vd6shaQ8wtCZzvj6g NzzV6o3mn+7OOkkB2nr4RwpJnExJsy0= Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-6687446eaccso2038693b3a.3 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=W+9A7z67n6fRnQtBYcLZzbXHAAMVFKHX6u9UNGFOVr6tsOUmXn/W+QV49J4hnsNYuv 6a4qgt3imzQVqdJY2+NVKilCwWjqftZ2aLBREUgbOh+bO9aB2V3TGZP81xI3VMnjCOCj 9IIUWwQdFYC3NdioRpzpSDWI9tbzK+FOExUaP8ZJulN9x66WR/flPviveQa0Jctmgdtu GmJK3cSxFlKN4Wa2fdMTeOnW9Jqi4D5m9QQq262FLjYs82eec/byEz8ph/pAESheqRvM e4MgYSSJHZ0qSjZGi6hXSjJn6uf1ldCgtWdK89I+BaXQ9+b58ByBCo62wacrvTua9VDH 2h3g== X-Gm-Message-State: ABy/qLbAidzxe9RdcMMgqybs90CDJac7g+DNV4iPm6pKwxDbd93Asic+ EvattJ7y8gEmZXjqR4Q3nQbY/A== X-Google-Smtp-Source: APBJJlHRd1gLk7JPxHUtTov1qnh114x9KwaDQ/5sltZxt9EHRLviBFeaGdLonEvrSgYBN3Wzgzxgfg== 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-Rspamd-Queue-Id: F31BAC002B X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: ab5wqoinxco3j1j4gzaku7wyhdoto18p X-HE-Tag: 1689352608-914978 X-HE-Meta: U2FsdGVkX18mdeaT3Svhkl0u2nHl+iuvM563X7+ekXOb4rD/jXsyi9WGJA6H8hKIuKWMtEOLccH7H6ZeTswG17GzbQyHfxScHmNhwcI4oGZw2vOH9QAsM52iGgueWW2P8NfQ3KSgGfPdVtdCgd2gPlPsnYPQ+BF8lh9qVv5356zU12xDzwOdFiN4/6TGV12EI0aRVvNug2XjmmYWeldj4cjurXmaLP9N6dVKflRrxDJaee5GawfhGyj5jox/WE6muiB1pw22nNMOSKyg8iE7Yvk5di/BnAvmZ/PempcrLF5s+rR3dm6gvD8Hd6y0vDZ8wMPv5SJtkh4UEMoKYdWz2a0cfno/BDFtprsPujRsAwgQibp6EmtDqFJx/U3X2Zk/WlTWylMWQPhxCrUFm3Y3H0wo8j0n4fogk60s+PjARXGHcm0Vtl+9PkUPhoGyJGTCavl3WcO457K1QxrOgnXr6QVWb3o0aoBhfw0l3HHdgH2XjyDxUWjhThfytkTEQvyiHVblsiEkZFsEl9m0ZRVD+FRDy3Mfg3fowtif1eLnObtU45FHwRf0ZMdDaDtSXQ9iPeu/C4uFKe6WS6DfvjwT5KnZLx+ZbOoZh/I1WPp8A86RQG25cIxQaLzPNwPJYBfJC3q+pCFDL36/Bfi8gGc0t+2viza7Ur/a52WhEULJ0XvYPBFdG9g39g92lTkTYjR8s1b6ICV5Lm/G/sZQVUbN0XeoYM7v+Q+WlBEYEx0T/mZNJRronr1JFym1KIMOJnAeXFk4ULHaImOcPeETmI/Hj7KPypKZoB6SEf8WGec+abgHXlAwqXhOh/WILXe1Y2JZeHsyg10PGJXagKfxwyERIkW6ZtPBIheUL+KpfAdtobyMEFodrKobI7OsCeQ68esEQF5SpqoAdvJH4ngCQ/wGv5aseCCHJcWqnLEJqdxB9wrjfIaQuDV6Zwj//ulOM2GNlkJWWPiZPWvif0Xy4Ng TmsEy6AG sQGd0+bAQqrszEvQs8d/H4ub5alQUCA/Uz66aPLsIjnDouKSqmJiKGWOfNnoT35BDsfq5bbe+qyqBxvst5OHhaO9zAwBOJqgbeAcPWky3PZ6oqetC8ecCTLvi+eWo0DU0u6o1k6l0I22mZy/9fhg/dHT2H2SksYKxzVgZEFhOFXRL/dX1yOaJ6V/VGQgI85/j6zZu6VME+zOuUs+xuMmu1BLwtMgnD7KtCasiRhQg2DrUhMRfYhLWgirYo6FBaqEL9JBTI4JxgCzXJcIzwy3taOnMs8u5MH3x7paJsuYnyYv5IWlRdIl+YiVs5KRqXB/V07kxT6+QQKktqi7LcEHtY3OUDAnB90gCeMOnh9yqtLk9pq1df3xr7fOZIqdeWSIxWEuipfSVvQM81TVarBppJ6rvdg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 > >