diff options
author | Marc Zyngier <[email protected]> | 2024-05-28 11:06:32 +0100 |
---|---|---|
committer | Marc Zyngier <[email protected]> | 2024-05-30 17:36:22 +0100 |
commit | 47eb2d68d10208e6a9e89d10b66018e8d6ca0623 (patch) | |
tree | 9c05975661ffb10b2c99a60bbf353a7f9bbf4ba6 | |
parent | 41011e2de3480f9adb6420b35b67628b2d903355 (diff) |
KVM: arm64: nv: Expose BTI and CSV_frac to a guest hypervisor
Now that we expose PAC to NV guests, we can also expose BTI (as
the two as joined at the hip, due to some of the PAC instructions
being landing pads).
While we're at it, also propagate CSV_frac, which requires no
particular emulation.
Fixes: f4f6a95bac49 ("KVM: arm64: nv: Advertise support for PAuth")
Reviewed-by: Oliver Upton <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Marc Zyngier <[email protected]>
-rw-r--r-- | arch/arm64/kvm/nested.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm64/kvm/nested.c b/arch/arm64/kvm/nested.c index 6813c7c7f00a..bae8536cbf00 100644 --- a/arch/arm64/kvm/nested.c +++ b/arch/arm64/kvm/nested.c @@ -58,8 +58,10 @@ static u64 limit_nv_id_reg(u32 id, u64 val) break; case SYS_ID_AA64PFR1_EL1: - /* Only support SSBS */ - val &= NV_FTR(PFR1, SSBS); + /* Only support BTI, SSBS, CSV2_frac */ + val &= (NV_FTR(PFR1, BT) | + NV_FTR(PFR1, SSBS) | + NV_FTR(PFR1, CSV2_frac)); break; case SYS_ID_AA64MMFR0_EL1: |