[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: |
Peter Maydell |
Subject: |
Re: [PATCH v8 32/45] target/arm: Add arm_tlb_bti_gp |
Date: |
Thu, 25 Jun 2020 13:29:35 +0100 |
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 ?
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
- [PATCH v8 27/45] target/arm: Add helper_mte_check_zva, (continued)
- [PATCH v8 27/45] target/arm: Add helper_mte_check_zva, Richard Henderson, 2020/06/23
- [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
- Re: [PATCH v8 32/45] target/arm: Add arm_tlb_bti_gp,
Peter Maydell <=
- [PATCH v8 34/45] target/arm: Add mte helpers for sve scalar + int stores, 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 36/45] target/arm: Handle TBI for sve scalar + int memory ops, Richard Henderson, 2020/06/23
- [PATCH v8 38/45] target/arm: Complete TBI clearing for user-only for SVE, Richard Henderson, 2020/06/23