[PATCH v2 09/20] KVM: arm64: Report an incomplete feature map with WARN_ON()
From: Fuad Tabba
Date: Wed Nov 25 2026 - 10:42:26 EST
At init, check_feature_map() reports with kvm_err() any feature map
that doesn't account for every bit of its register. The next patch
builds config.c into nVHE hyp, which has no printk(), so the check
would need an #ifdef to keep it out of hyp.
Use WARN_ON() instead, which doesn't need printk().
Signed-off-by: Fuad Tabba <fuad.tabba@xxxxxxxxx>
---
arch/arm64/kvm/config.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/arm64/kvm/config.c b/arch/arm64/kvm/config.c
index c65cf1dd27330..eef5ca50fc382 100644
--- a/arch/arm64/kvm/config.c
+++ b/arch/arm64/kvm/config.c
@@ -1409,9 +1409,7 @@ static void __init check_feat_map(const struct reg_bits_to_feat_map *map,
if (!((map[i].flags & FORCE_RESx) && (map[i].bits & resx)))
mask |= map[i].bits;
- if (mask != ~resx)
- kvm_err("Undefined %s behaviour, bits %016llx\n",
- str, mask ^ ~resx);
+ WARN_ON(mask != ~resx);
}
static u64 reg_feat_map_bits(const struct reg_bits_to_feat_map *map)
--
2.47.3