Re: [PATCH v7 31/42] target/arm: Add mte helpers for sve scalar + int loads

2020-06-19 Thread Richard Henderson
On 6/19/20 7:06 AM, Peter Maydell wrote:
> On Wed, 3 Jun 2020 at 02:14, Richard Henderson
>  wrote:
>>
>> Because the elements are sequential, we can eliminate many tests all
>> at once when the tag hits TCMA, or if the page(s) are not Tagged.
>>
>> Signed-off-by: Richard Henderson 
> 
>> +static inline QEMU_ALWAYS_INLINE
>> +void sve_cont_ldst_mte_check_int(SVEContLdSt *info, CPUARMState *env,
>> + uint64_t *vg, target_ulong addr, int esize,
>> + int msize, uint32_t mtedesc, uintptr_t ra,
>> + mte_check_fn *check)
>> +{
>> +intptr_t mem_off, reg_off, reg_last;
>> +
>> +/* Process the page only if MemAttr == Tagged. */
>> +if (info->page[0].attrs.target_tlb_bit1) {
> 
> It's a bit odd to use this bit here when you don't define what
> it is until patch 40. (Similarly for the next few patches.)

Perhaps.  What do you suggest to resolve this?
Moving the system patches earlier?
Just defining some inline functions for self-documentation?


r~



Re: [PATCH v7 31/42] target/arm: Add mte helpers for sve scalar + int loads

2020-06-19 Thread Peter Maydell
On Wed, 3 Jun 2020 at 02:14, Richard Henderson
 wrote:
>
> Because the elements are sequential, we can eliminate many tests all
> at once when the tag hits TCMA, or if the page(s) are not Tagged.
>
> Signed-off-by: Richard Henderson 

> +static inline QEMU_ALWAYS_INLINE
> +void sve_cont_ldst_mte_check_int(SVEContLdSt *info, CPUARMState *env,
> + uint64_t *vg, target_ulong addr, int esize,
> + int msize, uint32_t mtedesc, uintptr_t ra,
> + mte_check_fn *check)
> +{
> +intptr_t mem_off, reg_off, reg_last;
> +
> +/* Process the page only if MemAttr == Tagged. */
> +if (info->page[0].attrs.target_tlb_bit1) {

It's a bit odd to use this bit here when you don't define what
it is until patch 40. (Similarly for the next few patches.)

thanks
-- PMM