Re: [PATCH v3 01/42] target/arm: Split s2walk_secure from ipa_secure in get_phys_addr

2022-10-07 Thread Peter Maydell
On Thu, 6 Oct 2022 at 21:58, Richard Henderson wrote: > > On 10/6/22 11:55, Peter Maydell wrote: > > On Thu, 6 Oct 2022 at 19:20, Richard Henderson > > wrote: > >> > >> On 10/6/22 08:22, Peter Maydell wrote: > >>> Yeah, cleared-at-start is fine. But here we're also relying on > >>> the stage 2

Re: [PATCH v3 01/42] target/arm: Split s2walk_secure from ipa_secure in get_phys_addr

2022-10-06 Thread Richard Henderson
On 10/6/22 11:55, Peter Maydell wrote: On Thu, 6 Oct 2022 at 19:20, Richard Henderson wrote: On 10/6/22 08:22, Peter Maydell wrote: Yeah, cleared-at-start is fine. But here we're also relying on the stage 2 call to get_phys_addr_lpae() not setting it to 1, because we pass that the same

Re: [PATCH v3 01/42] target/arm: Split s2walk_secure from ipa_secure in get_phys_addr

2022-10-06 Thread Peter Maydell
On Thu, 6 Oct 2022 at 19:20, Richard Henderson wrote: > > On 10/6/22 08:22, Peter Maydell wrote: > > Yeah, cleared-at-start is fine. But here we're also relying on > > the stage 2 call to get_phys_addr_lpae() not setting it to 1, > > because we pass that the same 'result' pointer, not a fresh

Re: [PATCH v3 01/42] target/arm: Split s2walk_secure from ipa_secure in get_phys_addr

2022-10-06 Thread Richard Henderson
On 10/6/22 08:22, Peter Maydell wrote: Yeah, cleared-at-start is fine. But here we're also relying on the stage 2 call to get_phys_addr_lpae() not setting it to 1, because we pass that the same 'result' pointer, not a fresh one. I clear it first: that patch is already merged:

Re: [PATCH v3 01/42] target/arm: Split s2walk_secure from ipa_secure in get_phys_addr

2022-10-06 Thread Peter Maydell
On Thu, 6 Oct 2022 at 16:10, Richard Henderson wrote: > > On 10/6/22 07:27, Peter Maydell wrote: > > On Sat, 1 Oct 2022 at 17:24, Richard Henderson > > wrote: > >> > >> The starting security state comes with the translation regime, > >> not the current state of arm_is_secure_below_el3(). > >> >

Re: [PATCH v3 01/42] target/arm: Split s2walk_secure from ipa_secure in get_phys_addr

2022-10-06 Thread Richard Henderson
On 10/6/22 07:27, Peter Maydell wrote: On Sat, 1 Oct 2022 at 17:24, Richard Henderson wrote: The starting security state comes with the translation regime, not the current state of arm_is_secure_below_el3(). Create a new local variable, s2walk_secure, which does not need to be written back

Re: [PATCH v3 01/42] target/arm: Split s2walk_secure from ipa_secure in get_phys_addr

2022-10-06 Thread Peter Maydell
On Sat, 1 Oct 2022 at 17:24, Richard Henderson wrote: > > The starting security state comes with the translation regime, > not the current state of arm_is_secure_below_el3(). > > Create a new local variable, s2walk_secure, which does not need > to be written back to result->attrs.secure -- we

[PATCH v3 01/42] target/arm: Split s2walk_secure from ipa_secure in get_phys_addr

2022-10-01 Thread Richard Henderson
The starting security state comes with the translation regime, not the current state of arm_is_secure_below_el3(). Create a new local variable, s2walk_secure, which does not need to be written back to result->attrs.secure -- we compute that value later, after the S2 walk is complete.