[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v8 32/45] target/arm: Add arm_tlb_bti_gp
From: |
Richard Henderson |
Subject: |
Re: [PATCH v8 32/45] target/arm: Add arm_tlb_bti_gp |
Date: |
Thu, 25 Jun 2020 11:59:27 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 |
On 6/25/20 5:29 AM, Peter Maydell wrote:
> On Tue, 23 Jun 2020 at 20:37, Richard Henderson
> <richard.henderson@linaro.org> wrote:
>>
>> Introduce an lvalue macro to wrap target_tlb_bit0.
>>
>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> +/* Helper for the macros below, validating the argument type. */
>> +static inline MemTxAttrs *typecheck_memtxattrs(MemTxAttrs *x)
>> +{
>> + return x;
>> +}
>> +
>> +/*
>> + * Lvalue macros for ARM TLB bits that we must cache in the TCG TLB.
>> + * Using these should be a bit more self-documenting than using the
>> + * generic target bits directly.
>> + */
>> +#define arm_tlb_bti_gp(x) (typecheck_memtxattrs(x)->target_tlb_bit0)
>
> It seems unlikely that we wouldn't get a compile failure if
> we passed something other than a MemTxAttrs* to this macro,
> given the specificity of the field name, but I guess it
> gives us a less confusing compiler error ?
Yes, it's a quite clear error with the function. But you're right, we could
probably get away without it.
r~
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
>
> thanks
> -- PMM
>
- [PATCH v8 28/45] target/arm: Use mte_checkN for sve unpredicated loads, (continued)
- [PATCH v8 28/45] target/arm: Use mte_checkN for sve unpredicated loads, Richard Henderson, 2020/06/23
- [PATCH v8 29/45] target/arm: Use mte_checkN for sve unpredicated stores, Richard Henderson, 2020/06/23
- [PATCH v8 30/45] target/arm: Use mte_check1 for sve LD1R, Richard Henderson, 2020/06/23
- [PATCH v8 31/45] target/arm: Tidy trans_LD1R_zpri, Richard Henderson, 2020/06/23
- [PATCH v8 32/45] target/arm: Add arm_tlb_bti_gp, Richard Henderson, 2020/06/23
- [PATCH v8 34/45] target/arm: Add mte helpers for sve scalar + int stores, Richard Henderson, 2020/06/23
- [PATCH v8 36/45] target/arm: Handle TBI for sve scalar + int memory ops, Richard Henderson, 2020/06/23
- [PATCH v8 33/45] target/arm: Add mte helpers for sve scalar + int loads, Richard Henderson, 2020/06/23
- [PATCH v8 35/45] target/arm: Add mte helpers for sve scalar + int ff/nf loads, Richard Henderson, 2020/06/23
- [PATCH v8 38/45] target/arm: Complete TBI clearing for user-only for SVE, Richard Henderson, 2020/06/23