From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f42.google.com (mail-dl1-f42.google.com [74.125.82.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8281C230BF6 for ; Thu, 5 Mar 2026 00:58:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772672310; cv=none; b=Ma5LX5s7vVio1FV+idehrkasyxUY681YwU3Knih6wwtC0fNYm4ZL1Brp+Tvid/pTUKf6peZdIGamJYQzqC5J1qbIWc2o9o98A3F0OxAMN2lbEKCe1bo6C1G5RzE5eHFr+nqYqIDW1uddnLKrUdpiR/Pi08vE8ppE9gvKGgC0rVc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772672310; c=relaxed/simple; bh=AQXXq0uQopyrREGvz145FMiUaqoDSWDowAKyZKN2+/I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Bz0vV0vEYvti5gygq7FUDvct6Pc+r8iiYfD05A5+glDlLvxN+pqNGYWPZ3vDaDdqihNHlYDDmKgdKXFNkNTKJbCap8uwknOy155P84WWYhDgUCwr9vwRmKfu18aLRGb1L/580Ch/vslcmGY86k5ObUzL9jAipUWuQGI0sZKFbxI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=G8ww1iSS; arc=none smtp.client-ip=74.125.82.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="G8ww1iSS" Received: by mail-dl1-f42.google.com with SMTP id a92af1059eb24-126ea4e9694so3573589c88.1 for ; Wed, 04 Mar 2026 16:58:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772672308; x=1773277108; darn=vger.kernel.org; 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=V18G0dffShMU4z6G97+zCQkLAwnQ6V/WEvHOERsnHVY=; b=G8ww1iSS814R2hESb1sEZQC3EplMoic5+otZTbtYvKnO+zhXUNv7KbQ8cji9Wi4to9 bDAyBZBWE7OdvO0WLpXgyWv2XNFAE+cpuw2skxEDEyP0lyuBREa3oT298tY/N6QCZahX zfhZ8IZ2QyNklPz7PAHe6fxxIO8G2fLgIwR/Q/1pP5cPRRSo4lCwCay8a25Ee63xG6Ac Eg3ZWxQ4k/jO18Rub5cAHunWTkYIa0HtopFjnmkvrzZuDD83/WAC1C+eDTiJzifbiep6 Hv/ScxHPQBodQNmaGyo4JHL3rndjkCNbC0gRqRdyE3nDoa+Cewdis16sYbQ+cn/09wCI FBJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772672308; x=1773277108; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=V18G0dffShMU4z6G97+zCQkLAwnQ6V/WEvHOERsnHVY=; b=POnAxhVxo1ODwSHPDk5zSdhCtVlcvJ34llicEqPyDTFFZPQowl5F8xN+nA04QlHHgF ynNLPGPYh41aI6eNF676CFglG6L2PASjFyhcxVkz4uUe3b/QZjn4NKO6dPzl4Xzv32LT zrFJo5UdeO/KfQfpGQTkwm7h/hL2WvHTtlBs+txzZzSJ9DBW7rbzHoiv/3Ze/o8T/YEP 0J5eNhJD5PPN9PgIPdkuHWUsT1sxLhC3UYQhuoY284fJ78XjreI3z8RbL5jbrP4DQEPV CbDoLnuwuy7WmexeSNZMj5vHu8MBORFKuF94W3Xcl438/BHNDMQhBdS6VCefN6lWkUIU Nefw== X-Gm-Message-State: AOJu0YzI80silbc4H+Z+qJOp4gubWhoxrJZHgVMcgBVKy3M2ATEyIN8A ijYI6VBARaWEyEtCaQjZmgkp0lkLarmqAE1+Qd1+6uUMaCAiiIhKXJEe X-Gm-Gg: ATEYQzy0tLhgJY7DKlWnzCewMpyDpcPTo+nPVmykFnEco3FyCcctx3CC9+2sIYY7zJ9 6UE357rOYCrOVJgKqeasCHejkqADh0D9rLo5hsGvDTh3UixkAKJaIP803m0Oi7utvk9qeblTlb8 3pTgCHwzJMrIjHP0E8vU9enoJvYSG8f49TuoKkTwuGtM5sfVHQ44T73d9ZAtUpzAyvqGSSL/TJq ihJw31n+56cR9/Yc0JoNhQ5I3tmaVtmXu5bLrQBojb+JPjffL/K8H9ckog6Amp8MoYKqA9OgqUc CjzYqjXelyBcZGuzFkjEboyI7Uc4LaPSUeC9VvRrBcQnoqGmkLmQkrEO3cO0FHAQM0/jl2SCY3C ETXnu1VfG3hHcBH5dwUwdTCS9nYExNS1ScNhkbav7x1v05O5ueYD9YbW9z2mWYGVv2r7P5tHsMn jzlwtMlZs67xCGmWCn72N6d6Y= X-Received: by 2002:a05:7022:525:b0:119:e56b:9590 with SMTP id a92af1059eb24-128b70d11bdmr2303907c88.21.1772672307447; Wed, 04 Mar 2026 16:58:27 -0800 (PST) Received: from inky.localdomain ([2601:647:6700:64d0::5c10]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2be381d5ae9sm1164212eec.26.2026.03.04.16.58.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Mar 2026 16:58:26 -0800 (PST) Date: Wed, 4 Mar 2026 16:58:24 -0800 From: Charlie Jenkins To: Andrew Jones Cc: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, kvm-riscv@lists.infradead.org, Paul Walmsley , Palmer Dabbelt , Anup Patel , =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= , Conor Dooley , Guodong Xu , Charlie Jenkins , Samuel Holland Subject: Re: [RFC PATCH v1 00/11] riscv: hwprobe: Introduce rva23u64 base behavior Message-ID: <20260305005824.GA132269@inky.localdomain> References: <20260206002349.96740-1-andrew.jones@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260206002349.96740-1-andrew.jones@oss.qualcomm.com> On Thu, Feb 05, 2026 at 06:23:38PM -0600, Andrew Jones wrote: > Users need a way determine that their harts conform to rva23u64 that > isn't error-prone. While patches 2 and 6 make it possible to determine, > it requires a bunch of probes and checks themselves (see patch9 for the > recipe). This RFC proposes adding an RVA23U64 hwprobe base behavior > (patch8) allowing easy determination. It also proposes adding the bases > to /proc/cpuinfo (patches 10 and 11) -- but those two patches are probably > even more RFCy than the hwprobe proposal... > > The first three patches have been posted previously by their respective > authors and are currently under active review (except patch2 which > appears to have gotten lost in the shuffle). I've collected these > patches into the series since they're necessary for the base and > because I wanted to repost patch2 and patch3 with some changes. patch4 > and patch6 expose more extensions to userspace. patch9 adds a consistency > test for the new hwprobe base behavior bit. Great series! Thanks for pulling these all together, I like this direction. We had dropped patch2 because we were using it for some misaligned access optimizations but then realized that the extension wasn't useful for that so then the patches got lost. In Linux 7.0, patch 1 got applied along with CFI using the first flags of the second key so there is some rebasing to do. I think putting the compatibility info in /proc/cpuinfo is a good idea. There is always hesitance around /proc/cpuinfo because some ill-advised programs try to parse information from it, but it is nice to have an easy way for users to see the compatility and since you also added the hwprobe interface for it this seems reasonable. - Charlie > > Thanks, > drew > > > Andrew Jones (8): > riscv: Add B to hwcap > riscv: hwprobe.rst: Replace tabs with spaces > riscv: Add Ziccamoa, Ziccif, Ziccrse, and Za64rs to hwprobe > riscv: Export have_user_pmlen* booleans > riscv: hwprobe: Introduce rva23u64 base behavior > riscv: selftests: hwprobe: Check rva23u64 consistency > riscv: /proc/cpuinfo: Add rva23 bases to output > riscv: /proc/cpuinfo: Also output rva20 and rva22 isa bases > > Charlie Jenkins (1): > riscv: Standardize extension capitilization > > Jesse Taube (1): > RISC-V: Add Zicclsm to cpufeature and hwprobe > > Paul Walmsley (1): > riscv: hwprobe: add support for RISCV_HWPROBE_KEY_IMA_EXT_1 > > Documentation/arch/riscv/hwprobe.rst | 42 ++- > arch/riscv/include/asm/cpufeature.h | 14 + > arch/riscv/include/asm/hwcap.h | 23 +- > arch/riscv/include/asm/hwprobe.h | 3 +- > arch/riscv/include/asm/switch_to.h | 4 +- > arch/riscv/include/uapi/asm/hwcap.h | 1 + > arch/riscv/include/uapi/asm/hwprobe.h | 9 +- > arch/riscv/kernel/cpu.c | 38 +++ > arch/riscv/kernel/cpufeature.c | 168 ++++++++++-- > arch/riscv/kernel/process.c | 12 +- > arch/riscv/kernel/sys_hwprobe.c | 249 +++++++++++++----- > arch/riscv/kvm/main.c | 2 +- > arch/riscv/kvm/vcpu_fp.c | 28 +- > arch/riscv/kvm/vcpu_onereg.c | 22 +- > arch/riscv/kvm/vcpu_vector.c | 14 +- > .../testing/selftests/riscv/hwprobe/hwprobe.c | 112 +++++++- > .../selftests/riscv/hwprobe/which-cpus.c | 20 +- > 17 files changed, 610 insertions(+), 151 deletions(-) > > -- > 2.43.0 >