[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v7 05/12] arm/sve: save/restore SVE context switch


  • To: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Wed, 24 May 2023 09:47:27 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IgzGKZTLSJ2OF9q6yjz06r5nx+NFpp6mUw96GiZbv/M=; b=UkYTfrd/cwcAo/zq+bmfbDIaF92coAZ/4tzG204Ov3bCvLY03Te20I7bcQmHbo3nZvjRc3mzNvUX06XhdFxNlSYjUBZ32uSqYamxCuq5bqcaukSqOleCFCpxRWLoc60foJIFBW0AKpQJcBUBtLr+2iQIjagUEYjVUl4JvNoC5qqrj13JmyJwpX1cF5o5l3ruVlEEUiJx0LaqVVdlfgBJxxezCqUUMJH6TItNNZ5ftlkHRMj1sdt+dJGD35Gp6fjaDBYUZWqt9cHdeNq9p21pgfx9/eSHgkJIPZAQSpJAttHEzFpWWqx3o2yteazI5ymwSRvIMu7bJmLjvumeosvPrg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h3K4NHFFwWEvn1do8M8BFIp4GKwBm3LyoVrutgvxl7tZjNJMDRUiZj7+0V6zHAv67Px0Hhy01cuxqQdlSUirbXcWQXcBaPNRqo295TfYq81T9AicyY4vEprfxgmgfbgbIDeMPDGiTjZ9D9gw36kIz89XYTb29aPK5gseg65mVod1kVhCDG+0O0zX9bSQcq96xluLiEZqSj/M06ASbNJZTb6omjovftgFViOyK1AniLWERjoaDHHEtieO9l3FA5Vk2/5HQbMv90md6ciVVu6vaSPA5PDgG7HJ+uXtXs3RJ52k8rAd1jAO0uMyWMElwfHA1AjROSzChYyeSwQ3hghf7Q==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Wed, 24 May 2023 09:47:50 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZjUpTyDGNoUFbjUSAMdNsQrEV069pLt6A
  • Thread-topic: [PATCH v7 05/12] arm/sve: save/restore SVE context switch

Hi Luca,

> On 23 May 2023, at 09:43, Luca Fancellu <Luca.Fancellu@xxxxxxx> wrote:
> 
> Save/restore context switch for SVE, allocate memory to contain
> the Z0-31 registers whose length is maximum 2048 bits each and
> FFR who can be maximum 256 bits, the allocated memory depends on
> how many bits is the vector length for the domain and how many bits
> are supported by the platform.
> 
> Save P0-15 whose length is maximum 256 bits each, in this case the
> memory used is from the fpregs field in struct vfp_state,
> because V0-31 are part of Z0-31 and this space would have been
> unused for SVE domain otherwise.
> 
> Create zcr_el{1,2} fields in arch_vcpu, initialise zcr_el2 on vcpu
> creation given the requested vector length and restore it on
> context switch, save/restore ZCR_EL1 value as well.
> 
> List import macros from Linux in README.LinuxPrimitives.
> 
> Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>
Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>

Just ...

> ---
> Changes from v6:
> - Add comment for explain why sve_save/sve_load are different from
>   Linux, add macros in xen/arch/arm/README.LinuxPrimitives (Julien)
> - Add comments in sve_context_init and sve_context_free, handle the
>   case where sve_zreg_ctx_end is NULL, move setting of v->arch.zcr_el2
>   in sve_context_init (Julien)
> - remove stubs for sve_context_* and sve_save_* and rely on compiler
>   DCE (Jan)
> - Add comments for sve_save_ctx/sve_load_ctx (Julien)
> Changes from v5:
> - use XFREE instead of xfree, keep the headers (Julien)
> - Avoid math computation for every save/restore, store the computation
>   in struct vfp_state once (Bertrand)
> - protect access to v->domain->arch.sve_vl inside arch_vcpu_create now
>   that sve_vl is available only on arm64
> Changes from v4:
> - No changes
> Changes from v3:
> - don't use fixed len types when not needed (Jan)
> - now VL is an encoded value, decode it before using.
> Changes from v2:
> - No changes
> Changes from v1:
> - No changes
> Changes from RFC:
> - Moved zcr_el2 field introduction in this patch, restore its
>   content inside sve_restore_state function. (Julien)
> 
> fix patch 5
> 
> Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>
> Change-Id: Ief65b2ff14fd579afa4fd110ce08a19980e64fa9

You have a signed off and a change-id that should not be here.
They are in the comment section so should be removed during push so might be ok 
:-)

Cheers
Bertrand




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.