target/arm: Fix physical address resolution for Stage2
PATCH 1/1 target/arm: Fix physical address resolution for Stage2
Conversion to probe_access_full missed applying the page offset.
Reported-by Sid Manning <[email protected]>
Fixes f3639a64f602 ("target/arm: Use softmmu tlbs for page table walking")
Signed-off-by Richard Henderson <[email protected]>
--- target/arm/ptw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target/arm/ptw.c +1 -1
@@ -266,7 +266,7 @@ static bool S1_ptw_translate(CPUARMState *env, S1Translate *ptw,if (unlikely (flags &TLB_INVALID_MASK )) { goto fail; } - ptw->out_phys = full->phys_addr; + ptw->out_phys = full->phys_addr | (addr & ~TARGET_PAGE_MASK ); ptw->out_rw = full->prot &PAGE_WRITE ; pte_attrs = full->pte_attrs; pte_secure = full->attrs.secure;
Signature · 1 line
2.34.1
Quoted 15 lines · Richard Henderson
Conversion to
probe_access_fullmissed applying the page offset.Reported-by Sid Manning <[email protected]>Fixes f3639a64f602 ("target/arm: Use softmmu tlbs for page table walking")Signed-off-by Richard Henderson <[email protected]>--- target/arm/ptw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)target/arm/ptw.c +0
-0
target/arm/ptw.c static bool S1_ptw_translate(CPUARMState *env, S1Translate *ptw, · line 272
Quoted 8 lines
target/arm/ptw.c +1
-1@@ -266,7 +266,7 @@ static bool S1_ptw_translate(CPUARMState *env, S1Translate *ptw,if (unlikely (flags &TLB_INVALID_MASK )) { goto fail; } - ptw->out_phys = full->phys_addr; + ptw->out_phys = full->phys_addr | (addr & ~TARGET_PAGE_MASK ); ptw->out_rw = full->prot &PAGE_WRITE ; pte_attrs = full->pte_attrs; pte_secure = full->attrs.secure;
Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Peter Maydell
AppliedQuoted 10 lines · Richard Henderson
Conversion to
probe_access_fullmissed applying the page offset.Reported-by Sid Manning <[email protected]>Fixes f3639a64f602 ("target/arm: Use softmmu tlbs for page table walking")Signed-off-by Richard Henderson <[email protected]>--- target/arm/ptw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to target-arm.next, thanks.
-- PMM