diff options
author | Marc Zyngier <maz@kernel.org> | 2022-04-19 19:27:52 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2022-04-20 13:24:45 +0100 |
commit | 06e0b802583d7bbc075476d90da995ee3e6053d5 (patch) | |
tree | c6c162cca82b98c238ed5f3dbf4f80ae01da1dec /arch/arm64/kvm/sys_regs.c | |
parent | a3fb59651449d8bd4dc4ed5413888819932c740b (diff) | |
download | lwn-06e0b802583d7bbc075476d90da995ee3e6053d5.tar.gz lwn-06e0b802583d7bbc075476d90da995ee3e6053d5.zip |
KVM: arm64: Expose the WFXT feature to guests
Plumb in the capability, and expose WFxT to guests when available.
Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20220419182755.601427-8-maz@kernel.org
Diffstat (limited to 'arch/arm64/kvm/sys_regs.c')
-rw-r--r-- | arch/arm64/kvm/sys_regs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c index 7b45c040cc27..cc9a77546cc0 100644 --- a/arch/arm64/kvm/sys_regs.c +++ b/arch/arm64/kvm/sys_regs.c @@ -1144,6 +1144,8 @@ static u64 read_id_reg(const struct kvm_vcpu *vcpu, if (!vcpu_has_ptrauth(vcpu)) val &= ~(ARM64_FEATURE_MASK(ID_AA64ISAR2_APA3) | ARM64_FEATURE_MASK(ID_AA64ISAR2_GPA3)); + if (!cpus_have_final_cap(ARM64_HAS_WFXT)) + val &= ~ARM64_FEATURE_MASK(ID_AA64ISAR2_WFXT); break; case SYS_ID_AA64DFR0_EL1: /* Limit debug to ARMv8.0 */ |