On 20.03.2024 20:44, Conor Dooley wrote: > On Wed, Mar 20, 2024 at 07:58:05PM +0100, Oleksii wrote: >> On Mon, 2024-03-18 at 17:58 +0100, Jan Beulich wrote: >>> On 15.03.2024 19:05, Oleksii Kurochko wrote: >>>> Currently, RISC-V requires two extensions: _zbb and _zihintpause. >>> >>> Do we really require Zbb already? >> After an introduction of Andrew C. patches [1] it is requited for >> __builtin_ffs{l} >> >> [1] >> https://lore.kernel.org/xen-devel/20240313172716.2325427-1-andrew.coop...@citrix.com/T/#t >>> >>>> This patch introduces a compiler check to check if these extensions >>>> are supported. >>>> Additionally, it introduces the riscv/booting.txt file, which >>>> contains >>>> information about the extensions that should be supported by the >>>> platform. >>>> >>>> In the future, a feature will be introduced to check whether an >>>> extension >>>> is supported at runtime. >>>> However, this feature requires functionality for parsing device >>>> tree >>>> source (DTS), which is not yet available. >>> >>> Can't you query the CPU for its features? >> I couldn't find such reg ( or SBI call ) in the spec. > > There isn't. > >> SBI call sbi_probe_extension() exists, but it doesn't check for every >> possible extension. As far as I understand it checks only for that one >> which are present in SBI spec. > > Yeah, it only checks for SBI extensions, not ISA extensions.
And there was never a consideration to add, at the architecture level, some straightforward way for all layers of software to be able to easily detect availability of extensions? I find the lack thereof pretty surprising ... Jan