[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: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Wed, 24 May 2023 09:55:26 +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=tdIMhJvgEpp6Wnqo5bm/izItqJv5GWw+D3KZTD9sCOY=; b=QCwCgv0S85eh7vkodW4wU5htKYDuO3fS4ZoA1MUJOmqSlZmC3UJT7FJTnt+Thx7yvThGyTTIZxSVGwfhs0Y0dbRbgLFmvP96ra/4MhxpUlT4nKfdLtRBTz0r3omH9eaGOKdP3Z43b77jEu8BzzgZ+dGavD8vcAoZV1xAE925X67YX/CksGEKEGiH5Ymfqf8Z7HlIkmEydAvJrhwktdpoYFoyPqcMSC48jZaEPxoaISkP7n09C720+klzovJMRr1VIEBQ67fq1OsKMvCRU+ri7fikOuBlyGULw45wzLrDthhOo0b2CnEJoTttWeTccerHKHsFUOfRRtdYv9t0VDpojg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jNMKRELRADKQke19diys4E8zzIVqhX2puUTY4tjsOzKAR8Y5hbs2YscEV5qovzRLw+SGvt92dBlVUvQ1F6MSXwYop0BGpZdbR0pr+OGEJ8VSuj9S9xLO6Kd8mexDvEvE5acvD28yh1rkQBmY61krSKHHY4ym9hSQv2IUm2F1MdMtEUGd2FhSbxxLWsXiXPm02S+4BEWiM0sHyW5ufTjqElSilC0k5slF8AnF3W2o8D5VhUpqtNDNfGLKYg42rTzY6ev7pjpQD7VSERm17JU001XnaNDQnZwdDsN9Cn9Km7B0wEDg2h5hrDUBHwdY0iNzVC6Rw8ztLZnu2Ah21D3UXg==
  • 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:55:49 +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: AQHZjUpcuuLAh7YurESbASUYh0J8dK9pLuqAgAACLoA=
  • Thread-topic: [PATCH v7 05/12] arm/sve: save/restore SVE context switch


> On 24 May 2023, at 10:47, Bertrand Marquis <Bertrand.Marquis@xxxxxxx> wrote:
> 
> 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 :-)

Ohh yeah I missed that, probably it’s from a squash! 

> 
> Cheers
> Bertrand



 


Rackspace

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