[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 09/51] target/arm: Add the SME ZA storage to CPUARMState
From: |
Peter Maydell |
Subject: |
Re: [PATCH v3 09/51] target/arm: Add the SME ZA storage to CPUARMState |
Date: |
Tue, 21 Jun 2022 21:24:11 +0100 |
On Mon, 20 Jun 2022 at 18:52, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Place this late in the resettable section of the structure,
> to keep the most common element offsets from being > 64k.
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> +
> + /*
> + * SME ZA storage -- 256 x 256 byte array, with bytes in host word order,
> + * as we do with vfp.zregs[]. Because this is so large, keep this toward
> + * the end of the reset area, to keep the offsets into the rest of the
> + * structure smaller.
> + */
> + ARMVectorReg zarray[ARM_MAX_VQ * 16];
Suggested more detailed comment:
/*
* SME ZA storage -- 256 x 256 byte array, with bytes in host word order,
* as we do with vfp.zregs[]. This corresponds to the architectural ZA
* array, where ZA[N] is in the least-significant bytes of env->zarray[N].
* When SVL is less than the architectural maximum, the accessible
* storage is restricted, such that if the SVL is X bytes the guest can
* see only the bottom X elements of zarray[], and only the least
significant
* X bytes of each element of the array. (In other words, the
observable part
* is always square.)
*
* The ZA storage can also be considered as a set of square tiles
of elements
* of different sizes. The mapping from tiles to the ZA array is
architecturally
* defined, such that for tiles of elements of esz bytes, the Nth row (or
* "horizontal slice") of tile T is in ZA[T + N * esz]. Note that this means
* that each tile is not contiguous in the ZA storage because its rows are
* striped through the ZA array.
*
* Because the ZA storage is so large, keep this toward the end of the reset
* area, to keep the offsets into the rest of the structure smaller.
*/
Arguably para 2 is repeating architectural information, but I think it's
helpful as a brief summary (compare the comment earlier in this file about
mappings between S, D and Q views of the vector registers).
thanks
-- PMM
- [PATCH v3 01/51] target/arm: Implement TPIDR2_EL0, (continued)
- [PATCH v3 01/51] target/arm: Implement TPIDR2_EL0, Richard Henderson, 2022/06/20
- [PATCH v3 03/51] target/arm: Add syn_smetrap, Richard Henderson, 2022/06/20
- [PATCH v3 05/51] target/arm: Add SVCR, Richard Henderson, 2022/06/20
- [PATCH v3 02/51] target/arm: Add SMEEXC_EL to TB flags, Richard Henderson, 2022/06/20
- [PATCH v3 07/51] target/arm: Add SMIDR_EL1, SMPRI_EL1, SMPRIMAP_EL2, Richard Henderson, 2022/06/20
- [PATCH v3 04/51] target/arm: Add ARM_CP_SME, Richard Henderson, 2022/06/20
- [PATCH v3 06/51] target/arm: Add SMCR_ELx, Richard Henderson, 2022/06/20
- [PATCH v3 10/51] target/arm: Implement SMSTART, SMSTOP, Richard Henderson, 2022/06/20
- [PATCH v3 08/51] target/arm: Add PSTATE.{SM,ZA} to TB flags, Richard Henderson, 2022/06/20
- [PATCH v3 09/51] target/arm: Add the SME ZA storage to CPUARMState, Richard Henderson, 2022/06/20
- Re: [PATCH v3 09/51] target/arm: Add the SME ZA storage to CPUARMState,
Peter Maydell <=
- [PATCH v3 11/51] target/arm: Move error for sve%d property to arm_cpu_sve_finalize, Richard Henderson, 2022/06/20
- [PATCH v3 12/51] target/arm: Create ARMVQMap, Richard Henderson, 2022/06/20
- [PATCH v3 14/51] target/arm: Generalize cpu_arm_{get, set}_default_vec_len, Richard Henderson, 2022/06/20
- [PATCH v3 16/51] target/arm: Unexport aarch64_add_*_properties, Richard Henderson, 2022/06/20
- [PATCH v3 13/51] target/arm: Generalize cpu_arm_{get,set}_vq, Richard Henderson, 2022/06/20
- [PATCH v3 17/51] target/arm: Add cpu properties for SME, Richard Henderson, 2022/06/20
- [PATCH v3 19/51] target/arm: Add SVL to TB flags, Richard Henderson, 2022/06/20
- [PATCH v3 20/51] target/arm: Move pred_{full, gvec}_reg_{offset, size} to translate-a64.h, Richard Henderson, 2022/06/20
- [PATCH v3 18/51] target/arm: Introduce sve_vqm1_for_el_sm, Richard Henderson, 2022/06/20