[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1] xen/riscv: add H extenstion to -march




On 3/11/25 4:48 PM, Jan Beulich wrote:
On 11.03.2025 16:45, Oleksii Kurochko wrote:
--- a/xen/arch/riscv/arch.mk
+++ b/xen/arch/riscv/arch.mk
@@ -9,7 +9,8 @@ riscv-abi-$(CONFIG_RISCV_64) := -mabi=lp64
 riscv-march-$(CONFIG_RISCV_64) := rv64
 riscv-march-y += ima
 riscv-march-$(CONFIG_RISCV_ISA_C) += c
-riscv-march-y += _zicsr_zifencei_zbb
+h-extension-name := $(call cc-ifversion,-lt,1301, hh, h)
Instead of a version check, did you consider probing the compiler? With the
hard-coded version, how are things going to work with Clang?
Initially, it was implemented using:
+$(h-extension-name)-insn := "hfence.gvma"
+$(call check-extension,$(h-extension-name))
with
+h-extension-name := $(call cc-ifversion,-lt,1301, hh, h)
But it seems that we still need this hard-coded version for h-extension-name
because of this behavior that h extensions should be longer then single letter
for some compilers.

Probably, we could consider option to check "hfence.gvma" twice:
h-insn := "hfence.gvma"
$(call check-extension,h)

hh-insn := "hfence.gvma"
$(call check-extension,hh)

And filter-out/skip the second check-extension if the previous one check succeeded.
But it looks a weird.

~ Oleksii




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.