Merge branch kvm-arm64/fgt-masks into kvmarm-master/next
authorMarc Zyngier <maz@kernel.org>
Fri, 23 May 2025 09:58:15 +0000 (10:58 +0100)
committerMarc Zyngier <maz@kernel.org>
Fri, 23 May 2025 09:58:15 +0000 (10:58 +0100)
* kvm-arm64/fgt-masks: (43 commits)
  : .
  : Large rework of the way KVM deals with trap bits in conjunction with
  : the CPU feature registers. It now draws a direct link between which
  : the feature set, the system registers that need to UNDEF to match
  : the configuration and bits that need to behave as RES0 or RES1 in
  : the trap registers that are visible to the guest.
  :
  : Best of all, these definitions are mostly automatically generated
  : from the JSON description published by ARM under a permissive
  : license.
  : .
  KVM: arm64: Handle TSB CSYNC traps
  KVM: arm64: Add FGT descriptors for FEAT_FGT2
  KVM: arm64: Allow sysreg ranges for FGT descriptors
  KVM: arm64: Add context-switch for FEAT_FGT2 registers
  KVM: arm64: Add trap routing for FEAT_FGT2 registers
  KVM: arm64: Add sanitisation for FEAT_FGT2 registers
  KVM: arm64: Add FEAT_FGT2 registers to the VNCR page
  KVM: arm64: Use HCR_EL2 feature map to drive fixed-value bits
  KVM: arm64: Use HCRX_EL2 feature map to drive fixed-value bits
  KVM: arm64: Allow kvm_has_feat() to take variable arguments
  KVM: arm64: Use FGT feature maps to drive RES0 bits
  KVM: arm64: Validate FGT register descriptions against RES0 masks
  KVM: arm64: Switch to table-driven FGU configuration
  KVM: arm64: Handle PSB CSYNC traps
  KVM: arm64: Use KVM-specific HCRX_EL2 RES0 mask
  KVM: arm64: Remove hand-crafted masks for FGT registers
  KVM: arm64: Use computed FGT masks to setup FGT registers
  KVM: arm64: Propagate FGT masks to the nVHE hypervisor
  KVM: arm64: Unconditionally configure fine-grain traps
  KVM: arm64: Use computed masks as sanitisers for FGT registers
  ...

Signed-off-by: Marc Zyngier <maz@kernel.org>
1  2 
arch/arm64/include/asm/esr.h
arch/arm64/include/asm/kvm_host.h
arch/arm64/kernel/cpufeature.c
arch/arm64/kvm/arm.c
arch/arm64/kvm/handle_exit.c
arch/arm64/kvm/sys_regs.c

Simple merge
index 73b7762b0e7d1e2a29532f30be643cde7060a99a,9239c50a565f6a96e5f36f58f976b84d8101c63c..672ae3c51219114e6daedba31e293aec19adb7f1
@@@ -1590,9 -1634,8 +1636,14 @@@ void kvm_set_vm_id_reg(struct kvm *kvm
  #define kvm_has_s1poe(k)                              \
        (kvm_has_feat((k), ID_AA64MMFR3_EL1, S1POE, IMP))
  
 +static inline bool kvm_arch_has_irq_bypass(void)
 +{
 +      return true;
 +}
 +
+ void compute_fgu(struct kvm *kvm, enum fgt_group_id fgt);
+ void get_reg_fixed_bits(struct kvm *kvm, enum vcpu_sysreg reg, u64 *res0, u64 *res1);
+ void check_feature_map(void);
++
  #endif /* __ARM64_KVM_HOST_H__ */
Simple merge
Simple merge
Simple merge
Simple merge