Skip to contentSkip to conversation

KVM: arm: add Kbuild FORCE prerequisite for hyp-reloc

PATCH In review Arnd Bergmann 2 participants 2 messages Sep 20, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: arm: add Kbuild FORCE prerequisite for hyp-reloc

From: Arnd Bergmann <[email protected]>

Commit e1f86d7b4b2a ("kbuild: warn if FORCE is missing for if_changed(_dep,_rule) and filechk") added a helpful check for Kbuild, which now notices that a problem with the hyp-reloc rule:

arch/arm64/kvm/hyp/nvhe/Makefile:58: FORCE prerequisite is missing

Do as suggested and add FORCE here.

Fixes 8c49b5d43d4c ("KVM: arm64: Generate hyp relocation data")
---
 arch/arm64/kvm/hyp/nvhe/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kvm/hyp/nvhe/Makefile +1 -1
index 5df6193fc430..8d741f71377f 100644
@@ -54,7 +54,7 @@ $(obj)/kvm_nvhe.tmp.o: $(obj)/hyp.lds $(addprefix $(obj)/,$(hyp-obj)) FORCE
 #    runtime. Because the hypervisor is part of the kernel binary, relocations
 #    produce a kernel VA. We enumerate relocations targeting hyp at build time
 #    and convert the kernel VAs at those positions to hyp VAs.
-$(obj)/hyp-reloc.S: $(obj)/kvm_nvhe.tmp.o $(obj)/gen-hyprel
+$(obj)/hyp-reloc.S: $(obj)/kvm_nvhe.tmp.o $(obj)/gen-hyprel FORCE
 	$(call if_changed,hyprel)
 
 # 5) Compile hyp-reloc.S and link it into the existing partially linked object.
Signature · 1 line
2.29.2
maintainer
#1 lore raw
Quoted 32 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Commit e1f86d7b4b2a ("kbuild: warn if FORCE is missing for if_changed(_dep,_rule)
and filechk") added a helpful check for Kbuild, which now notices that a problem with the hyp-reloc rule:

arch/arm64/kvm/hyp/nvhe/Makefile:58: FORCE prerequisite is missing

Do as suggested and add FORCE here.

Fixes 8c49b5d43d4c ("KVM: arm64: Generate hyp relocation data")
---
 arch/arm64/kvm/hyp/nvhe/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kvm/hyp/nvhe/Makefile +0 -0
index 5df6193fc430..8d741f71377f 100644
@@ -54,7 +54,7 @@ $(obj)/kvm_nvhe.tmp.o: $(obj)/hyp.lds $(addprefix

$(obj)/,$(hyp-obj)) FORCE
# runtime. Because the hypervisor is part of the kernel binary,
relocations
# produce a kernel VA. We enumerate relocations targeting hyp at
build time
# and convert the kernel VAs at those positions to hyp VAs.
-$(obj)/hyp-reloc.S: $(obj)/kvm_nvhe.tmp.o $(obj)/gen-hyprel +$(obj)/hyp-reloc.S: $(obj)/kvm_nvhe.tmp.o $(obj)/gen-hyprel FORCE
$(call if_changed,hyprel)

Quoted 2 lines

# 5) Compile hyp-reloc.S and link it into the existing partially
linked object.

I already have queued [1], which does the same thing.

Thanks,

        M.

[1] https://lore.kernel.org/r/[email protected]

Signature · 1 line
Jazz is not dead. It just smells funny...