]> git.proxmox.com Git - mirror_qemu.git/commitdiff
target/arm: Advertise support for FEAT_TTL
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 26 Apr 2022 16:04:20 +0000 (17:04 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 28 Apr 2022 12:59:23 +0000 (13:59 +0100)
The Arm FEAT_TTL architectural feature allows the guest to provide an
optional hint in an AArch64 TLB invalidate operation about which
translation table level holds the leaf entry for the address being
invalidated.  QEMU's TLB implementation doesn't need that hint, and
we correctly ignore the (previously RES0) bits in TLB invalidate
operation values that are now used for the TTL field.  So we can
simply advertise support for it in our 'max' CPU.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220426160422.2353158-2-peter.maydell@linaro.org

docs/system/arm/emulation.rst
target/arm/cpu64.c

index 520fd39071e1e6dfbdf186683851ac72f4742943..6ed2417f6fcec09688d8c2eba932fd3c4eeca7b1 100644 (file)
@@ -54,6 +54,7 @@ the following architecture extensions:
 - FEAT_TLBIOS (TLB invalidate instructions in Outer Shareable domain)
 - FEAT_TLBIRANGE (TLB invalidate range instructions)
 - FEAT_TTCNP (Translation table Common not private translations)
+- FEAT_TTL (Translation Table Level)
 - FEAT_TTST (Small translation tables)
 - FEAT_UAO (Unprivileged Access Override control)
 - FEAT_VHE (Virtualization Host Extensions)
index eb44c05822cf82d6f70f88cf6f0d3582ca9653c5..ec2d159163fb18d5206d7e9699e2edb98f547e45 100644 (file)
@@ -839,6 +839,7 @@ static void aarch64_max_initfn(Object *obj)
     t = FIELD_DP64(t, ID_AA64MMFR2, CNP, 1); /* TTCNP */
     t = FIELD_DP64(t, ID_AA64MMFR2, ST, 1); /* TTST */
     t = FIELD_DP64(t, ID_AA64MMFR2, VARANGE, 1); /* FEAT_LVA */
+    t = FIELD_DP64(t, ID_AA64MMFR2, TTL, 1); /* FEAT_TTL */
     cpu->isar.id_aa64mmfr2 = t;
 
     t = cpu->isar.id_aa64zfr0;