[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-9.0.3 56/69] target/arm: Update translation regime comment for n
From: |
Michael Tokarev |
Subject: |
[Stable-9.0.3 56/69] target/arm: Update translation regime comment for new features |
Date: |
Fri, 6 Sep 2024 14:13:05 +0300 |
From: Peter Maydell <peter.maydell@linaro.org>
We have a long comment describing the Arm architectural translation
regimes and how we map them to QEMU MMU indexes. This comment has
got a bit out of date:
* FEAT_SEL2 allows Secure EL2 and corresponding new regimes
* FEAT_RME introduces Realm state and its translation regimes
* We now model the Cortex-R52 so that is no longer a hypothetical
* We separated Secure Stage 2 and NonSecure Stage 2 MMU indexes
* We have an MMU index per physical address spacea
Add the missing pieces so that the list of architectural translation
regimes matches the Arm ARM, and the list and count of QEMU MMU
indexes in the comment matches the enum.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20240809160430.1144805-2-peter.maydell@linaro.org
(cherry picked from commit 150c24f34e9c3388c0f0ad04ddd997e5559db800)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(Mjt: pick this one for stable-9.0 so the next commit applies cleanly)
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index bc0c84873f..7c721f22bd 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -2687,8 +2687,14 @@ bool write_cpustate_to_list(ARMCPU *cpu, bool kvm_sync);
* + NonSecure EL1 & 0 stage 2
* + NonSecure EL2
* + NonSecure EL2 & 0 (ARMv8.1-VHE)
- * + Secure EL1 & 0
- * + Secure EL3
+ * + Secure EL1 & 0 stage 1
+ * + Secure EL1 & 0 stage 2 (FEAT_SEL2)
+ * + Secure EL2 (FEAT_SEL2)
+ * + Secure EL2 & 0 (FEAT_SEL2)
+ * + Realm EL1 & 0 stage 1 (FEAT_RME)
+ * + Realm EL1 & 0 stage 2 (FEAT_RME)
+ * + Realm EL2 (FEAT_RME)
+ * + EL3
* If EL3 is 32-bit:
* + NonSecure PL1 & 0 stage 1
* + NonSecure PL1 & 0 stage 2
@@ -2720,10 +2726,12 @@ bool write_cpustate_to_list(ARMCPU *cpu, bool kvm_sync);
* table over and over.
* 6. we need separate EL1/EL2 mmu_idx for handling the Privileged Access
* Never (PAN) bit within PSTATE.
- * 7. we fold together the secure and non-secure regimes for A-profile,
+ * 7. we fold together most secure and non-secure regimes for A-profile,
* because there are no banked system registers for aarch64, so the
* process of switching between secure and non-secure is
* already heavyweight.
+ * 8. we cannot fold together Stage 2 Secure and Stage 2 NonSecure,
+ * because both are in use simultaneously for Secure EL2.
*
* This gives us the following list of cases:
*
@@ -2735,14 +2743,15 @@ bool write_cpustate_to_list(ARMCPU *cpu, bool kvm_sync);
* EL2 EL2&0 +PAN
* EL2 (aka NS PL2)
* EL3 (aka S PL1)
- * Physical (NS & S)
- * Stage2 (NS & S)
+ * Stage2 Secure
+ * Stage2 NonSecure
+ * plus one TLB per Physical address space: S, NS, Realm, Root
*
- * for a total of 12 different mmu_idx.
+ * for a total of 14 different mmu_idx.
*
* R profile CPUs have an MPU, but can use the same set of MMU indexes
* as A profile. They only need to distinguish EL0 and EL1 (and
- * EL2 if we ever model a Cortex-R52).
+ * EL2 for cores like the Cortex-R52).
*
* M profile CPUs are rather different as they do not have a true MMU.
* They have the following different MMU indexes:
--
2.39.2
- [Stable-9.0.3 47/69] nbd/server: CVE-2024-7409: Cap default max-connections to 100, (continued)
- [Stable-9.0.3 47/69] nbd/server: CVE-2024-7409: Cap default max-connections to 100, Michael Tokarev, 2024/09/06
- [Stable-9.0.3 44/69] vvfat: Fix reading files with non-continuous clusters, Michael Tokarev, 2024/09/06
- [Stable-9.0.3 48/69] nbd/server: CVE-2024-7409: Drop non-negotiating clients, Michael Tokarev, 2024/09/06
- [Stable-9.0.3 49/69] nbd/server: CVE-2024-7409: Close stray clients at server-stop, Michael Tokarev, 2024/09/06
- [Stable-9.0.3 50/69] nbd/server: CVE-2024-7409: Avoid use-after-free when closing server, Michael Tokarev, 2024/09/06
- [Stable-9.0.3 51/69] net: Fix '-net nic, model=' for non-help arguments, Michael Tokarev, 2024/09/06
- [Stable-9.0.3 52/69] hw/core/ptimer: fix timer zero period condition for freq > 1GHz, Michael Tokarev, 2024/09/06
- [Stable-9.0.3 53/69] block/blkio: use FUA flag on write zeroes only if supported, Michael Tokarev, 2024/09/06
- [Stable-9.0.3 54/69] target/i386: Do not apply REX to MMX operands, Michael Tokarev, 2024/09/06
- [Stable-9.0.3 55/69] target/arm: Clear high SVE elements in handle_vec_simd_wshli, Michael Tokarev, 2024/09/06
- [Stable-9.0.3 56/69] target/arm: Update translation regime comment for new features,
Michael Tokarev <=
- [Stable-9.0.3 57/69] target/arm: Fix usage of MMU indexes when EL3 is AArch32, Michael Tokarev, 2024/09/06
- [Stable-9.0.3 58/69] module: Prevent crash by resetting local_err in module_load_qom_all(), Michael Tokarev, 2024/09/06
- [Stable-9.0.3 59/69] target/hexagon: don't look for static glib, Michael Tokarev, 2024/09/06
- [Stable-9.0.3 60/69] linux-user: Preserve NULL hit in target_mmap subroutines, Michael Tokarev, 2024/09/06
- [Stable-9.0.3 61/69] target/sparc: Restrict STQF to sparcv9, Michael Tokarev, 2024/09/06
- [Stable-9.0.3 62/69] crypto/tlscredspsk: Free username on finalize, Michael Tokarev, 2024/09/06
- [Stable-9.0.3 63/69] hw/nvme: fix leak of uninitialized memory in io_mgmt_recv, Michael Tokarev, 2024/09/06
- [Stable-9.0.3 64/69] virtio-pci: Fix the use of an uninitialized irqfd, Michael Tokarev, 2024/09/06
- [Stable-9.0.3 65/69] migration/multifd: Free MultiFDRecvParams::data, Michael Tokarev, 2024/09/06
- [Stable-9.0.3 66/69] linux-user: Handle short reads in mmap_h_gt_g, Michael Tokarev, 2024/09/06