kabi: reserve space for arm64 SME in thread_struct
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4QPLR CVE: NA Reference: https://patchwork.kernel.org/project/linux-arm-kernel/cover/20211210184133.320748-1-broonie@kernel.org/ ------------------------------- Reserve space for arm64 SME in thread_struct. According to the implementation of SME, we need to reserve space for the following fields like this: +enum vec_type { + ARM64_VEC_SVE = 0, + ARM64_VEC_SME, + ARM64_VEC_MAX, +}; + struct thread_struct { struct cpu_context cpu_context; /* cpu context */ @@ -149,8 +155,6 @@ struct thread_struct { unsigned int fpsimd_cpu; void *sve_state; /* SVE registers, if any */ - unsigned int sve_vl; /* SVE vector length */ - unsigned int sve_vl_onexec; /* SVE vl after next exec */ unsigned long fault_address; /* fault info */ unsigned long fault_code; /* ESR_EL1 value */ struct debug_info debug; /* debugging */ @@ -162,6 +166,11 @@ struct thread_struct { u64 sctlr_tcf0; u64 gcr_user_incl; #endif + void *za_state; /* ZA register, if any */ + unsigned int vl[ARM64_VEC_MAX]; /* vector length */ + unsigned int vl_onexec[ARM64_VEC_MAX]; /* vl after next exec */ + u64 svcr; + u64 tpidr2_el0; }; This requires at least five 64bit spaces, other three for expansion. Signed-off-by: NWang ShaoBo <bobo.shaobowang@huawei.com> Reviewed-by: NCheng Jian <cj.chengjian@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录