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

From: Fuad Tabba

Date: Tue Nov 17 2026 - 14:27:55 EST


Hi Oliver,

On Tue, 17 Nov 2026 18:12:47 +0000, Oliver Upton <oupton@xxxxxxxxxx> 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)
> > {
[...]
> > +#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.

Yes, it's because of the kvm_err(), as printk() isn't available in the
hyp object. WARN() calls __warn_printk(), which isn't available there
either. WARN_ON() works, so I'll use that in v2 and drop the ifdef.
The warning won't have the register's name or the bits, though.

I'll wait until next week before respinning, in case you or others
have more feedback.

Cheers,
/fuad