On 3/4/25 1:09 PM, Milan Đokić wrote:
diff --git a/xen/arch/riscv/arch.mk b/xen/arch/riscv/arch.mk
index 17827c302c..f4098f5b5e 100644
--- a/xen/arch/riscv/arch.mk
+++ b/xen/arch/riscv/arch.mk
@@ -23,13 +23,17 @@ $(eval $(1) := \
$(call as-insn,$(CC) $(riscv-generic-flags)_$(1),$(value $(1)-insn),_$(1)))
endef
+h-extension-name := $(call cc-ifversion,-lt,1301, hh, h)
+$(h-extension-name)-insn := "hfence.gvma"
+$(call check-extension,$(h-extension-name))
+
zbb-insn := "andn t0$(comma)t0$(comma)t0"
$(call check-extension,zbb)
zihintpause-insn := "pause"
$(call check-extension,zihintpause)
-extensions := $(zbb) $(zihintpause)
+extensions := $(value $(h-extension-name)) $(zbb) $(zihintpause)
extensions := $(subst $(space),,$(extensions))
This patch should take into account another one patch series
(https://lore.kernel.org/xen-devel/cover.1740071755.git.oleksii.kuroc...@gmail.com/T/#t)
update for which I am going to sent today.
Also, these changes would be better to move into separate commit with
explanation why what is so specific with 1301 and why it is needed to introduce
'hh'.
I believe that these changes were taken based on my
patch:https://gitlab.com/xen-project/people/olkur/xen/-/commit/154f75e943f1668dbf2c7be0f0fdff5b30132e89
Probably it will make sense just to get it and rebase on top of mentioned above
patch series.
Yes, it is based on your patch. Sorry, I was not aware that you
already have an active patch series which contains this part.
In that case we'll wait for your patch series to be merged first. And
we'll split it into 2 commits where first one will only introduce h
extension handling in arch.mk and the second one with
copy_from/to_guest functionallity
This is not really contains this part directly but that another one patch
series will affect these changes.
So the final changes should look like:
https://gitlab.com/xen-project/people/olkur/xen/-/commit/eb75bc3482ffe025cf36c320e2e13a77deeea883
I planned to send this patch to upstream on Monday.
Best regards,
Oleksii