aboutsummaryrefslogtreecommitdiff
path: root/arch/arm64/kvm/nested.c
diff options
context:
space:
mode:
authorMarc Zyngier <[email protected]>2024-06-14 15:45:50 +0100
committerOliver Upton <[email protected]>2024-06-19 08:14:38 +0000
commit0cb8aae2267687a13e22cf906d1ee1e9840bbe27 (patch)
treead241fa7bcf8551abbe1db8a36a3c8fda8a95de5 /arch/arm64/kvm/nested.c
parent809b2e6013a51352e407c3071219f12ecceed47f (diff)
KVM: arm64: nv: Add handling of outer-shareable TLBI operations
Our handling of outer-shareable TLBIs is pretty basic: we just map them to the existing inner-shareable ones, because we really don't have anything else. The only significant change is that we can now advertise FEAT_TLBIOS support if the host supports it. Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
Diffstat (limited to 'arch/arm64/kvm/nested.c')
-rw-r--r--arch/arm64/kvm/nested.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm64/kvm/nested.c b/arch/arm64/kvm/nested.c
index 1860ed4a4c00..63bc8d5022fe 100644
--- a/arch/arm64/kvm/nested.c
+++ b/arch/arm64/kvm/nested.c
@@ -805,9 +805,12 @@ static u64 limit_nv_id_reg(u32 id, u64 val)
switch (id) {
case SYS_ID_AA64ISAR0_EL1:
- /* Support everything but TME, O.S. and Range TLBIs */
+ /* Support everything but TME and Range TLBIs */
+ tmp = FIELD_GET(NV_FTR(ISAR0, TLB), val);
+ tmp = min(tmp, ID_AA64ISAR0_EL1_TLB_OS);
val &= ~(NV_FTR(ISAR0, TLB) |
NV_FTR(ISAR0, TME));
+ val |= FIELD_PREP(NV_FTR(ISAR0, TLB), tmp);
break;
case SYS_ID_AA64ISAR1_EL1: