Re: [PATCH 07/16] KVM: arm64: Compute a protected vCPU's fine-grained traps at EL2

From: Oliver Upton

Date: Tue Nov 17 2026 - 13:12:58 EST


Hi Fuad,

On Mon, Nov 09, 2026 at 08:31:56AM +0000, Fuad Tabba wrote:
> +#ifndef __KVM_NVHE_HYPERVISOR__
> static void __init check_feat_map(const struct reg_bits_to_feat_map *map,
> int map_size, u64 resx, const char *str)
> {
> @@ -1414,11 +1420,6 @@ static void __init check_feat_map(const struct reg_bits_to_feat_map *map,
> str, mask ^ ~resx);
> }
>
> -static u64 reg_feat_map_bits(const struct reg_bits_to_feat_map *map)
> -{
> - return map->flags & MASKS_POINTER ? (map->masks->mask | map->masks->nmask) : map->bits;
> -}
> -
> static void __init check_reg_desc(const struct reg_feat_map_desc *r)
> {
> check_feat_map(r->bit_feat_map, r->bit_feat_map_sz,
> @@ -1451,6 +1452,7 @@ void __init check_feature_map(void)
> check_reg_desc(&ich_hfgwtr_desc);
> check_reg_desc(&ich_hfgitr_desc);
> }
> +#endif

We already have too much ifdeffery... It isn't mentioned in the
changelog but I take it you're doing this to avoid the printk() in
check_feat_map()?

If yes then just upgrade that thing to a WARN() and carry on, it only
ever runs at init.

Thanks,
Oliver