Re: [PATCH] target/arm: Two fixes for secure ptw

2022-11-04 Thread Richard Henderson
On 11/4/22 21:58, Peter Maydell wrote: OK. Do we ever do anything with the attrs for a phys tlb lookup except use them internally for details of the stage 2 tlb walk ? I guess they get used for the memory transaction to do the walk. That matches the old code that just had a local MemTxAttrs in

Re: [PATCH] target/arm: Two fixes for secure ptw

2022-11-04 Thread Peter Maydell
On Thu, 3 Nov 2022 at 20:30, Richard Henderson wrote: > > On 11/4/22 00:19, Peter Maydell wrote: > >> @@ -2671,6 +2671,13 @@ static bool get_phys_addr_with_struct(CPUARMState > >> *env, S1Translate *ptw, > >> bool is_secure = ptw->in_secure; > >> ARMMMUIdx s1_mmu_idx; > >> > >> +

Re: [PATCH] target/arm: Two fixes for secure ptw

2022-11-03 Thread Richard Henderson
On 11/4/22 00:19, Peter Maydell wrote: @@ -2671,6 +2671,13 @@ static bool get_phys_addr_with_struct(CPUARMState *env, S1Translate *ptw, bool is_secure = ptw->in_secure; ARMMMUIdx s1_mmu_idx; +/* + * The page table entries may downgrade secure to non-secure, but + *

Re: [PATCH] target/arm: Two fixes for secure ptw

2022-11-03 Thread Peter Maydell
On Thu, 3 Nov 2022 at 13:19, Peter Maydell wrote: > > On Wed, 2 Nov 2022 at 05:47, Richard Henderson > wrote: > > > > Reversed the sense of non-secure in get_phys_addr_lpae, > > and failed to initialize attrs.secure for ARMMMUIdx_Phys_S. > > > > Fixes: 48da29e4 ("target/arm: Add ptw_idx to

Re: [PATCH] target/arm: Two fixes for secure ptw

2022-11-03 Thread Peter Maydell
On Wed, 2 Nov 2022 at 05:47, Richard Henderson wrote: > > Reversed the sense of non-secure in get_phys_addr_lpae, > and failed to initialize attrs.secure for ARMMMUIdx_Phys_S. > > Fixes: 48da29e4 ("target/arm: Add ptw_idx to S1Translate") > Resolves:

Re: [PATCH] target/arm: Two fixes for secure ptw

2022-11-02 Thread Philippe Mathieu-Daudé
On 2/11/22 06:47, Richard Henderson wrote: Reversed the sense of non-secure in get_phys_addr_lpae, and failed to initialize attrs.secure for ARMMMUIdx_Phys_S. Fixes: 48da29e4 ("target/arm: Add ptw_idx to S1Translate") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1293 Thanks!

[PATCH] target/arm: Two fixes for secure ptw

2022-11-01 Thread Richard Henderson
Reversed the sense of non-secure in get_phys_addr_lpae, and failed to initialize attrs.secure for ARMMMUIdx_Phys_S. Fixes: 48da29e4 ("target/arm: Add ptw_idx to S1Translate") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1293 Signed-off-by: Richard Henderson --- target/arm/ptw.c | 15