Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2407113rdb; Wed, 21 Feb 2024 06:54:20 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV61IfnLoj/hXIrMUokDA58DPxuHq0HGMClsChK0RqLTQAj/LF+Y9bn9jl4MBW4hJJhbC8qlXSyMW5jm9+c7qWfLR7orj7/e9WSiYat4w== X-Google-Smtp-Source: AGHT+IGorlLIpDSCHWtGImQrMz0sHdNS4hzkXTDCWROb81TeK3hbyPSWZRdiKzDVanS5OKVB5aRO X-Received: by 2002:a05:6a20:c992:b0:1a0:9117:5892 with SMTP id gy18-20020a056a20c99200b001a091175892mr16671340pzb.15.1708527260096; Wed, 21 Feb 2024 06:54:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708527260; cv=pass; d=google.com; s=arc-20160816; b=SNrACXduKbxk0WpNqb6m45GZ8bme024MyS4CA+AINO2JaAwDdiDAN0LhQwvM5QKX8A PUL8JBANsjsT7GOch3o5yVhlj7fpQpP1RMVa+dGbdWPHXem99lsYNWx+SURRBxhx+fd6 d4sto+5nh/s120YEiA0YTu4yzAt9+RbC6EVgaHUhttLV2r2YQ8mnTTEPA8/BbTGoi/Tz KLcbH/+jNGWAo76/1IzgNlCw8kELrjh6pIir3tvCCTxGo6iaBvj5Q/VwPgfDYVm9Zbpx d5i2GA8anWJ59y1GcfPQx9W83x/5IMXwhk5K2re+hXT0IP6Xm7AscS8z9ZtFoCjwT+Qm reGw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=HPUPYQyaExW8zA3yPaGmJKIXa5Geol1ui08QSwOJ+e8=; fh=NjQwcLvIEFNSOVbdcEDJ4VnpwaRkeKv17mwqbTg7bd4=; b=yzbCJVF4bXNm3RuDMu6WIVKCg8Fy7meWLusQV/Hk3i7nSQIDABD11fXn/5Zf99kj9N ewd9yiUL4EtItLnF7QjyPB7x2zn24x0sshuUgC5eJpJPScKickBDbQFMHnvMYCs7F5kA /9nRLQKMa4PjsCrCgSW+Z/spk7NDpogb0yaAIZs/407YonBj/DhnZOw32vbUsqle22eV X2hCjvQSWwUgJn7eRSxeLk81vY86a8ytBzt8u22xoAdrfkP7DPRBav5QSFBiZeSBhdYK 0Mm7pX0ykOK+I0Cwt3BO8FH6MQmXxS/kZGMzh97FpOW3KSEE2JCALBo2m9/o+zClg5xb sdQg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dMFnpjLX; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-74942-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74942-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u18-20020a170902e5d200b001dba53ce5c9si6924419plf.226.2024.02.21.06.54.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 06:54:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74942-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dMFnpjLX; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-74942-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74942-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A160E287753 for ; Wed, 21 Feb 2024 14:52:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6B52F7FBCA; Wed, 21 Feb 2024 14:51:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dMFnpjLX" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8FC1B3D393; Wed, 21 Feb 2024 14:51:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708527111; cv=none; b=pl3Ns5jUtmm86bdGY89hO91m3zs5zb0emq7JunUIDPsfPeyLRkobRi3hKtCnDaA6AbitpGXbpg6WXRhtp9cYZkQlakdGhQb2xXOR/eggr+2ZZo+jzAQJDZh14FVxM5GGqZUk1gY1WGKkmwmDA3/GE7NazQTAKL54Ul1chjOeD1o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708527111; c=relaxed/simple; bh=HPUPYQyaExW8zA3yPaGmJKIXa5Geol1ui08QSwOJ+e8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Oh++fXAcZdF0pi19hWZAlz0XkqaV5QzNljL91UPWdRxEEJ7VWQppKbWk0n50htiEmXBre3QXL1VJItIuqk4BQy8hu4pusvohs4MMEDe1+8vk6u4U5f6RwVWyOoJYfb+OJXeBYhQRV51hShOgR53HTbzkgxaU8eRJLlcu8FsCUyQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dMFnpjLX; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACE38C433C7; Wed, 21 Feb 2024 14:51:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708527111; bh=HPUPYQyaExW8zA3yPaGmJKIXa5Geol1ui08QSwOJ+e8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dMFnpjLXedjM59DSIP7iXzY0WAdOEKWw2u/GS9ufpmMUhyN1gq2g56jJr1k5cb6me ndysQF7iAZHjVGkxJl2V/twPaSZxqgpBWSG/5mJYAUw71cd0FPPz7UvcHNaAaYvbP2 hCl9qtJuDmcpRxM2uSR7CoNhU60gCMgSxl75YS+dcLs8NvtMmXH/jcfLfoTxla6Eam 4dGj5WLY8810xEziHMVbFfO3CV5HbXz1e5ojaa/UFlnVAbanhfqAuR0ETEC1wbqWTL nlYTECKP+aLri0NjRU/zScHoCyXQzwcaWAtm3Wa2kgdC6Iqzs/IdkfsR62xmNe2RO9 t2iypTiwEKWqQ== Date: Wed, 21 Feb 2024 14:51:46 +0000 From: Conor Dooley To: =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= Cc: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Robin Ehn , Charlie Jenkins , Stefan O'Rear , Jessica Clarke Subject: Re: [PATCH v2] riscv: hwprobe: export largest userspace address Message-ID: <20240221-pacifism-seismic-589dbbcbf38b@spud> References: <20240220110950.871307-1-cleger@rivosinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="XafRae+w6EWwmvjz" Content-Disposition: inline In-Reply-To: <20240220110950.871307-1-cleger@rivosinc.com> --XafRae+w6EWwmvjz Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 20, 2024 at 12:09:46PM +0100, Cl=E9ment L=E9ger wrote: > Some userspace applications (OpenJDK for instance) uses the free MSBs > in pointers to insert additional information for their own logic and > need to get this information from somewhere. Currently they rely on > parsing /proc/cpuinfo "mmu=3Dsvxx" string to obtain the current value of > virtual address used bits [1]. Since this reflect the raw MMU mode > supported, it might differ from the logical one used internally. > Exporting the maximum mmappable address through hwprobe will allow a > more stable interface to be used. For that purpose, add a new hwprobe > key named RISCV_HWPROBE_MAX_KEY which will export the maximum mmappable > userspace address. >=20 > Link: https://github.com/openjdk/jdk/blob/master/src/hotspot/os_cpu/linux= _riscv/vm_version_linux_riscv.cpp#L171 [1] > Signed-off-by: Cl=E9ment L=E9ger Doesn't build for nommu: https://patchwork.kernel.org/project/linux-riscv/patch/20240220110950.87130= 7-1-cleger@rivosinc.com/ Cheers, Conor. --XafRae+w6EWwmvjz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZdYOAgAKCRB4tDGHoIJi 0obVAQC6GAs9ZIYjcC3yuuwCX/HL09UmNvDXdYBZhG/lJ6OKywEAp01wPF8n5uxf K6XtGuHbFpAbomgUMPBexQpL2ieUxgM= =gv0b -----END PGP SIGNATURE----- --XafRae+w6EWwmvjz--