arm64: cpufeature: Extend comment to describe absence of field info
authorWill Deacon <will@kernel.org>
Tue, 5 May 2020 10:45:21 +0000 (11:45 +0100)
committerWill Deacon <will@kernel.org>
Tue, 5 May 2020 10:45:21 +0000 (11:45 +0100)
When a feature register field is omitted from the description of the
register, the corresponding bits are treated as STRICT RES0, including
for KVM guests. This is subtly different to declaring the field as
HIDDEN/STRICT/EXACT/0, so update the comment to call this out.

Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/cpufeature.c

index c1d44d127baa99bb8897959d8fdad7fca26522b8..9b05843d67affa8481dd25ee1f329424453b850c 100644 (file)
  *   arbitrary physical CPUs, but some features not present on the host are
  *   also advertised and emulated. Look at sys_reg_descs[] for the gory
  *   details.
+ *
+ * - If the arm64_ftr_bits[] for a register has a missing field, then this
+ *   field is treated as STRICT RES0, including for read_sanitised_ftr_reg().
+ *   This is stronger than FTR_HIDDEN and can be used to hide features from
+ *   KVM guests.
  */
 
 #define pr_fmt(fmt) "CPU features: " fmt