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

Re: [PATCH v2 2/6] xen/riscv: introduce reset_stack() function


  • To: Oleksii <oleksii.kurochko@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 7 Jul 2023 11:33:00 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=Wz1crOwYzBFGsGkYUaPG69JYQEtQrUtNxrg74IC0P0U=; b=OqKgATJ7UuML5hQKidDlmm90tj4cgZc6t7lAwEWJskpG8gZhAZSmoS3gNxwQEXTgn+8aqzP8Dh43bmmCAEsK4PeSfcIs9yJ/o6P10MCpkijhqBqgeDTJTrp4g9jM7HnSwA05JBWKzu6e1ECoip0SgZ2z/DVKuUvryo6YMq16cQC4SVCa66dVuJXChApMV7BB/4PCntGvynMAn65cRudSoI5s81t4MXRKWbR7mH8BFooZJKqKf4UU6/KIY4dkrv3Z1WsfS0zMCXJlGL/vOVY0DLFGYjnicC3OOAFZWkX3GPYASMtBIuhtRahMasDIUWjL3HpypI4+GbP7bddPlc/SeQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D+vv7H8hizUgys2OGFUDwNXKeQfHa8aKApj5CuX1FAHmYJeHuKcdYoN9easNChqpfDC+gFsTLWR/iZENqtOhzcEtlGizJasvZo5IyFJ+AirUMP4nLEtPfID7GJq2gjzfSr2VhRHEjMe8TIi9ZcVydQfbP+L5MN43ZbuDepLeh2w32MZvASTUoNeTp0oA1PzUVEAbUpa0Bd1Aw8ugv3tWY5MyADoZh4YILkxOpTRJswtNVOWomUHT2QPbp1pYyOgYyOTfHmxKY62CPjdiRxd630lbww4pqddwSZMHHgPDppckfqONwpiSycQhU5zpjEcShU/kwv1wPC9e9MPC187yzg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bob Eshleman <bobbyeshleman@xxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 07 Jul 2023 09:33:19 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 07.07.2023 11:08, Oleksii wrote:
> On Thu, 2023-07-06 at 13:17 +0200, Jan Beulich wrote:
>> On 19.06.2023 15:34, Oleksii Kurochko wrote:
>>> --- a/xen/arch/riscv/riscv64/head.S
>>> +++ b/xen/arch/riscv/riscv64/head.S
>>> @@ -27,8 +27,16 @@ ENTRY(start)
>>>          add     t3, t3, __SIZEOF_POINTER__
>>>          bltu    t3, t4, .L_clear_bss
>>>  
>>> +        jal     reset_stack
>>> +
>>> +        tail    start_xen
>>> +
>>> +        .section .text, "ax", %progbits
>>> +
>>> +ENTRY(reset_stack)
>>>          la      sp, cpu0_boot_stack
>>>          li      t0, STACK_SIZE
>>>          add     sp, sp, t0
>>>  
>>> -        tail    start_xen
>>> +        ret
>>> +
>>
>> Looking at patch 4 you will want to add a comment here to emphasize
>> that a0 and a1 have to remain unclobbered.
> Thanks for a note. I'll add it in the new patch version

Having seen how things end up by the end of the series, there's an
alternative: You could save a0 and a1 ahead of the 1st call to
reset_stack, rather than immediately afterwards.

Jan



 


Rackspace

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