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

Re: [Minios-devel] [UNIKRAFT PATCHv3 2/5] arch/arm64: Define the size of callee-saved-registers for thread switch


  • To: Santiago Pagani <Santiago.Pagani@xxxxxxxxx>, "minios-devel@xxxxxxxxxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxxxxxxxxx>, Simon Kuenzer <simon.kuenzer@xxxxxxxxx>, Sharan Santhanam <Sharan.Santhanam@xxxxxxxxx>
  • From: "Justin He (Arm Technology China)" <Justin.He@xxxxxxx>
  • Date: Tue, 29 Oct 2019 09:35:10 +0000
  • Accept-language: en-US, zh-CN
  • 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-SenderADCheck; bh=clueILTdY2IUQ2cooMsOMFPxog0GoJkG9gSvdbTi5/E=; b=mCEFSJC5tQnve9d2XR/s30slsafFhH4k4C88Y9B6SF0ST9LL5xaMd1A5BaGRVt2Z+0g4ARCP6JG02CuOO63tjEZkGhh8ba8MEz3hLHQ/CGYMcBz8IjQQ+J6imMRXWpj4RcgXaGS7DZV5GxvFzUSw6R2A/r3dWJI1p6BbBSkvALn9FKv5mlgCiXIwvgYHSu6wpNIFx1S/zm4lEu/l5Jscjz9sgwE6ovp7Vylcf6Pv2wxm7Lq4xzws1cvGGBZGBWHS19t0dnOqAdapiP8p0OeJGImwBxRW3scIOu+NJNGHYIBsXwXhiSwloq2QMAgbWJs+4zeyUYqsfzvSjGgMTt1Gxw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gUJYYqLSgiVeEBgxSccf1GjJMSi0VaRw3aszr67H5dSi+Cqi1qCrnCsAYIys0BGvRX8w2JWDuFpOTfbkn4AC0mH5tYBlDcVcrlPqTlQEWCH02rqNB0I8OR5GdE8rmCTpk1a276+tu5BrXJcOG2oXdCguGliCWPN2xkOoH0odYn7oYGyJXFwQKUvJQX3Wb9OHQB+ExL3kMEZjs+BqWz8PW1D5JjCilZvyArCRQiOjtgsXz6ZZWO4ytsa6QJs90F9MEopxLXD57GqmyaDRlBkafp6hS4dUFcazTCr0AFHCMLTPAT91NVZIgYW7FABJ7C42yNkoPvNXIHb+J0cxkajnDw==
  • Authentication-results: spf=fail (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; lists.xenproject.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;lists.xenproject.org; dmarc=none action=none header.from=arm.com;
  • Authentication-results-original: spf=none (sender IP is ) smtp.mailfrom=Justin.He@xxxxxxx;
  • Cc: "Kaly Xin \(Arm Technology China\)" <Kaly.Xin@xxxxxxx>, Julien Grall <Julien.Grall@xxxxxxx>, "Jianyong Wu \(Arm Technology China\)" <Jianyong.Wu@xxxxxxx>, "Wei Chen \(Arm Technology China\)" <Wei.Chen@xxxxxxx>
  • Delivery-date: Tue, 29 Oct 2019 09:35:25 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Original-authentication-results: spf=none (sender IP is ) smtp.mailfrom=Justin.He@xxxxxxx;
  • Thread-index: AQHVR0p7SJjD8rqTKE2Pswxm5hkaHqdwWDUAgAGRH+A=
  • Thread-topic: [UNIKRAFT PATCHv3 2/5] arch/arm64: Define the size of callee-saved-registers for thread switch

Hi Santiago

> -----Original Message-----
> From: Santiago Pagani <Santiago.Pagani@xxxxxxxxx>
> Sent: Monday, October 28, 2019 5:38 PM
> To: Justin He (Arm Technology China) <Justin.He@xxxxxxx>; minios-
> devel@xxxxxxxxxxxxxxxxxxxx; Simon Kuenzer <simon.kuenzer@xxxxxxxxx>;
> Sharan Santhanam <Sharan.Santhanam@xxxxxxxxx>
> Cc: Julien Grall <Julien.Grall@xxxxxxx>; Kaly Xin (Arm Technology China)
> <Kaly.Xin@xxxxxxx>; Wei Chen (Arm Technology China)
> <Wei.Chen@xxxxxxx>; Jianyong Wu (Arm Technology China)
> <Jianyong.Wu@xxxxxxx>
> Subject: Re: [UNIKRAFT PATCHv3 2/5] arch/arm64: Define the size of callee-
> saved-registers for thread switch
>
> Hi Justin,
>
> Thanks fort he patch. Please see my comments inline.
>
> On 31.07.19, 04:48, "Jia He" <justin.he@xxxxxxx> wrote:
>
>     From: Wei Chen <wei.chen@xxxxxxx>
>
>     In thread context switch, we will save the callee-saved registers
>     (x19 ~ x28) and Frame Point Register and Link Register to prev's
>     thread stack [1]
>
>     [1]
> http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055b/IHI0055B_aapc
> s64.pdf
>
>     Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
>     Signed-off-by: Jianyong Wu <jianyong.wu@xxxxxxx>
>     Signed-off-by: Jia He <justin.he@xxxxxxx>
>     ---
>      arch/arm/arm64/include/uk/asm/lcpu.h | 24 ++++++++++++++++++++++++
>      1 file changed, 24 insertions(+)
>
>     diff --git a/arch/arm/arm64/include/uk/asm/lcpu.h
> b/arch/arm/arm64/include/uk/asm/lcpu.h
>     index 9eea746..9d839a6 100644
>     --- a/arch/arm/arm64/include/uk/asm/lcpu.h
>     +++ b/arch/arm/arm64/include/uk/asm/lcpu.h
>     @@ -44,6 +44,15 @@
>      #define __TRAP_STACK_SIZE        288
>      #define __SP_OFFSET              272
>      #define __SP_EL0_OFFSET          280
>     +
>     +/*
>     + * In thread context switch, we will save the callee-saved registers
>     + * (x19 ~ x28) and Frame Point Register and Link Register to prev's
>     + * thread stack:
>     + *
> http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055b/IHI0055B_aapc
> s64.pdf
>     + */
>     +#define __CALLEE_SAVED_SIZE    96
>     +
>      #else
>      /*
>       * Change this structure must update TRAP_STACK_SIZE at the same time.
>     @@ -72,6 +81,21 @@ struct __regs {
>       unsigned long sp_el0;
>      };
>
>     +/*
>     + * Change this structure must update __CALLEE_SAVED_SIZE at the
>     + * same time.
>     + */
>     +struct __callee_saved_regs {
>     + /* Callee-saved registers, from x19 ~ x28 */
>     + unsigned long callee[10];
> I would suggest to use uint64_t here. Not that unsigned long is not the
> correct type, just that it makes it very explicit that this is to save 64-bit
> registers.

Ok


--
Cheers,
Justin (Jia He)


IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

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