[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v7 05/12] arm/sve: save/restore SVE context switch
Hi Luca, On 25/05/2023 11:01, Luca Fancellu wrote: On 25 May 2023, at 10:09, Julien Grall <julien@xxxxxxx> wrote:diff --git a/xen/arch/arm/include/asm/arm64/vfp.h b/xen/arch/arm/include/asm/arm64/vfp.h index e6e8c363bc16..4aa371e85d26 100644 --- a/xen/arch/arm/include/asm/arm64/vfp.h +++ b/xen/arch/arm/include/asm/arm64/vfp.h @@ -6,7 +6,19 @@ struct vfp_state { + /* + * When SVE is enabled for the guest, fpregs memory will be used to + * save/restore P0-P15 registers, otherwise it will be used for the V0-V31 + * registers. + */ uint64_t fpregs[64] __vfp_aligned; + /* + * When SVE is enabled for the guest, sve_zreg_ctx_end points to memory + * where Z0-Z31 registers and FFR can be saved/restored, it points at the + * end of the Z0-Z31 space and at the beginning of the FFR space, it's done + * like that to ease the save/restore assembly operations. + */ + uint64_t *sve_zreg_ctx_end;Sorry I only noticed now. But shouldn't this be protected with #ifdef CONFIG_SVE? Same...register_t fpcr; register_t fpexc32_el2; register_t fpsr; diff --git a/xen/arch/arm/include/asm/domain.h b/xen/arch/arm/include/asm/domain.h index 331da0f3bcc3..814652d92568 100644 --- a/xen/arch/arm/include/asm/domain.h +++ b/xen/arch/arm/include/asm/domain.h @@ -195,6 +195,8 @@ struct arch_vcpu register_t tpidrro_el0; /* HYP configuration */ + register_t zcr_el1; + register_t zcr_el2;... here.Sure I can protect them. It was done on purpose before to avoid ifdefs but I think saving space is better here and also there won’t be any use of them when the config is off. I wasn't thinking about saving space. I was more thinking about catching any (mis)use of the fields in common code. With the #ifdef, the compilation would fail. Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |