summaryrefslogtreecommitdiffstats
path: root/target/arm/tlb_helper.c
diff options
context:
space:
mode:
authorRichard Henderson2020-06-26 05:31:39 +0200
committerPeter Maydell2020-06-26 15:31:12 +0200
commit7e98e21c09871cddc20946c8f3f3595e93154ecb (patch)
tree9d9113256949a7f3a498165cf24d26fe14214f34 /target/arm/tlb_helper.c
parenttarget/arm: Set PSTATE.TCO on exception entry (diff)
downloadqemu-7e98e21c09871cddc20946c8f3f3595e93154ecb.tar.gz
qemu-7e98e21c09871cddc20946c8f3f3595e93154ecb.tar.xz
qemu-7e98e21c09871cddc20946c8f3f3595e93154ecb.zip
target/arm: Always pass cacheattr to get_phys_addr
We need to check the memattr of a page in order to determine whether it is Tagged for MTE. Between Stage1 and Stage2, this becomes simpler if we always collect this data, instead of occasionally being presented with NULL. Use the nonnull attribute to allow the compiler to check that all pointer arguments are non-null. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20200626033144.790098-42-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/tlb_helper.c')
-rw-r--r--target/arm/tlb_helper.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/target/arm/tlb_helper.c b/target/arm/tlb_helper.c
index 522a6442a4..89d90465a3 100644
--- a/target/arm/tlb_helper.c
+++ b/target/arm/tlb_helper.c
@@ -166,6 +166,7 @@ bool arm_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
int prot, ret;
MemTxAttrs attrs = {};
ARMMMUFaultInfo fi = {};
+ ARMCacheAttrs cacheattrs = {};
/*
* Walk the page table and (if the mapping exists) add the page
@@ -175,7 +176,8 @@ bool arm_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
*/
ret = get_phys_addr(&cpu->env, address, access_type,
core_to_arm_mmu_idx(&cpu->env, mmu_idx),
- &phys_addr, &attrs, &prot, &page_size, &fi, NULL);
+ &phys_addr, &attrs, &prot, &page_size,
+ &fi, &cacheattrs);
if (likely(!ret)) {
/*
* Map a single [sub]page. Regions smaller than our declared