[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 25/42] target/arm: Implement helper_mte_check1
From: |
Peter Maydell |
Subject: |
Re: [PATCH v7 25/42] target/arm: Implement helper_mte_check1 |
Date: |
Fri, 19 Jun 2020 14:44:29 +0100 |
On Wed, 3 Jun 2020 at 02:13, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Fill out the stub that was added earlier.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> target/arm/internals.h | 47 +++++++++++++++
> target/arm/mte_helper.c | 126 +++++++++++++++++++++++++++++++++++++++-
> 2 files changed, 172 insertions(+), 1 deletion(-)
> +/*
> + * For TBI, ideally, we would do nothing. Proper behaviour on fault is
> + * for the tag to be present in the FAR_ELx register. But for user-only
> + * mode, we do not have a TLB with which to implement this, so we must
> + * remote the top byte.
"remove"
> + */
> +static inline uint64_t useronly_clean_ptr(uint64_t ptr)
> +{
> + /* TBI is known to be enabled. */
> +#ifdef CONFIG_USER_ONLY
> + ptr = sextract64(ptr, 0, 56);
> +#endif
> + return ptr;
> +}
> +
> +/* No-fault version of mte_check1, to be used by SVE for MemSingleNF. */
> +bool mte_probe1(CPUARMState *env, uint32_t desc, uint64_t ptr, uintptr_t ra)
If this is a no-fault version, why do we need to pass in the ra ?
> +{
> + int bit55 = extract64(ptr, 55, 1);
> +
> + /* If TBI is disabled, the access is unchecked. */
> + if (unlikely(!tbi_check(desc, bit55))) {
> + return true;
> + }
> +
> + return mte_probe1_int(env, desc, ptr, ra, bit55);
> +}
thanks
-- PMM
- Re: [PATCH v7 20/42] target/arm: Implement the access tag cache flushes, (continued)
- [PATCH v7 18/42] target/arm: Simplify DC_ZVA, Richard Henderson, 2020/06/02
- [PATCH v7 19/42] target/arm: Implement the LDGM, STGM, STZGM instructions, Richard Henderson, 2020/06/02
- [PATCH v7 23/42] target/arm: Add gen_mte_check1, Richard Henderson, 2020/06/02
- [PATCH v7 25/42] target/arm: Implement helper_mte_check1, Richard Henderson, 2020/06/02
- [PATCH v7 26/42] target/arm: Implement helper_mte_checkN, Richard Henderson, 2020/06/02
- [PATCH v7 22/42] target/arm: Move regime_tcr to internals.h, Richard Henderson, 2020/06/02
- [PATCH v7 24/42] target/arm: Add gen_mte_checkN, Richard Henderson, 2020/06/02
- [PATCH v7 27/42] target/arm: Add helper_mte_check_zva, Richard Henderson, 2020/06/02
- [PATCH v7 28/42] target/arm: Use mte_checkN for sve unpredicated loads, Richard Henderson, 2020/06/02