Re: [PATCH v1 05/11] KVM: arm64: nVHE: Run the source checker under C=2

Vincent Donnefort <[email protected]>
Newsgroups org.infradead.lists.linux-arm-kernel,dev.linux.lists.kvmarm,org.kernel.vger.linux-kernel,org.kernel.vger.linux-trace-kernel
Message-ID <[email protected]>
On Mon, Jul 20, 2026 at 05:13:37PM +0100, Fuad Tabba wrote:
> The custom %.nvhe.o rule reuses rule_cc_o_c, which hooks the source
> checker only for C=1, and that only when the object is rebuilt. The
> C=2 hook, cmd_force_checksrc, hangs off the standard %.o rule that
> nVHE objects do not use, so "make C=2" silently skips every nVHE
> source file. Call cmd_force_checksrc after the compile rule, as the
> standard rule does.
> 
> Fixes: 7621712918ad4 ("KVM: arm64: Add build rules for separate VHE/nVHE object files")
> Signed-off-by: Fuad Tabba <[email protected]>

Nice, I have wanted to fix this annoying issue for a while now!

Reviewed-by: Vincent Donnefort <[email protected]>
Tested-by: Vincent Donnefort <[email protected]>

> ---
>  arch/arm64/kvm/hyp/nvhe/Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/kvm/hyp/nvhe/Makefile b/arch/arm64/kvm/hyp/nvhe/Makefile
> index f57450ebcb498..ccc1fe8394094 100644
> --- a/arch/arm64/kvm/hyp/nvhe/Makefile
> +++ b/arch/arm64/kvm/hyp/nvhe/Makefile
> @@ -49,6 +49,7 @@ targets += $(hyp-obj) kvm_nvhe.tmp.o kvm_nvhe.rel.o hyp.lds hyp-reloc.S hyp-relo
>  #    avoids file name clashes for files shared with VHE.
>  $(obj)/%.nvhe.o: $(src)/%.c FORCE
>  	$(call if_changed_rule,cc_o_c)
> +	$(call cmd,force_checksrc)
>  $(obj)/%.nvhe.o: $(src)/%.S FORCE
>  	$(call if_changed_rule,as_o_S)
>  
> -- 
> 2.39.5
> 

-- 
Vincent
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.