[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 13/18] target/arm: Fix TLBIRange.base for 16k and 64k pages
From: |
Richard Henderson |
Subject: |
[PATCH v4 13/18] target/arm: Fix TLBIRange.base for 16k and 64k pages |
Date: |
Tue, 1 Mar 2022 11:59:53 -1000 |
The shift of the BaseADDR field depends on the translation
granule in use.
Fixes: 84940ed8255 ("target/arm: Add support for FEAT_TLBIRANGE")
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/helper.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/target/arm/helper.c b/target/arm/helper.c
index 31c2a716f2..e455397fb5 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -4538,10 +4538,11 @@ static TLBIRange tlbi_aa64_get_range(CPUARMState *env,
ARMMMUIdx mmuidx,
ret.length = (num + 1) << (exponent + page_shift);
if (regime_has_2_ranges(mmuidx)) {
- ret.base = sextract64(value, 0, 37) << TARGET_PAGE_BITS;
+ ret.base = sextract64(value, 0, 37);
} else {
- ret.base = extract64(value, 0, 37) << TARGET_PAGE_BITS;
+ ret.base = extract64(value, 0, 37);
}
+ ret.base <<= page_shift;
return ret;
}
--
2.25.1
- [PATCH v4 03/18] target/arm: Fault on invalid TCR_ELx.TxSZ, (continued)
- [PATCH v4 03/18] target/arm: Fault on invalid TCR_ELx.TxSZ, Richard Henderson, 2022/03/01
- [PATCH v4 05/18] target/arm: Pass outputsize down to check_s2_mmu_setup, Richard Henderson, 2022/03/01
- [PATCH v4 06/18] target/arm: Use MAKE_64BIT_MASK to compute indexmask, Richard Henderson, 2022/03/01
- [PATCH v4 08/18] target/arm: Prepare DBGBVR and DBGWVR for FEAT_LVA, Richard Henderson, 2022/03/01
- [PATCH v4 10/18] target/arm: Implement FEAT_LPA, Richard Henderson, 2022/03/01
- [PATCH v4 07/18] target/arm: Honor TCR_ELx.{I}PS, Richard Henderson, 2022/03/01
- [PATCH v4 09/18] target/arm: Implement FEAT_LVA, Richard Henderson, 2022/03/01
- [PATCH v4 12/18] target/arm: Introduce tlbi_aa64_get_range, Richard Henderson, 2022/03/01
- [PATCH v4 11/18] target/arm: Extend arm_fi_to_lfsc to level -1, Richard Henderson, 2022/03/01
- [PATCH v4 14/18] target/arm: Validate tlbi TG matches translation granule in use, Richard Henderson, 2022/03/01
- [PATCH v4 13/18] target/arm: Fix TLBIRange.base for 16k and 64k pages,
Richard Henderson <=
- [PATCH v4 17/18] target/arm: Provide cpu property for controling FEAT_LPA2, Richard Henderson, 2022/03/01
- [PATCH v4 15/18] target/arm: Advertise all page sizes for -cpu max, Richard Henderson, 2022/03/01
- [PATCH v4 16/18] target/arm: Implement FEAT_LPA2, Richard Henderson, 2022/03/01
- [PATCH v4 18/18] hw/arm/virt: Disable LPA2 for -machine virt-6.2, Richard Henderson, 2022/03/01