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

Re: [PATCH v7 3/5] xen/riscv: align __bss_start


  • To: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 12 May 2023 09:45:28 +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=Ue930GgMb0OzNyelI18ojsmGR6aRJTnwoO0VsjMJKw8=; b=MzVo2gRXXa5L3PM14E+xYwmzAP13hKIqAkDtmdkSkTtD4oZ0gfk1UWqQ1ZE1og8vBmBrg96yAvyFzVpHuBFKsgo5Mdo3G1yCgL7gmiijQ64twlO3NW9RH2eu4Qu0TqAHaEZ+a6s0xrExHB7wdiQZv3r6/fddecjqeLFXzu8C0ZijTzmE2bAo+tnNSepMa9qi4VZ49HA46YKnp8wqGI6sT5VS47bF9lGG4LFDVJdaOlonvWMrGh3C9bG8culkMoird0FGc5P327zQZUuRNmYhtF+mf1tehiA21Yp2VIVsPWO7aWF2Mwm0xp/sVGAMG+5KTzjm7HBSFTvUj//4mSdEWw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HPz6FQmvy/10do14R5N/drPQvvI18oQ6JjwERipX4tn0wBTuyxNOTnNtOqGKEGDfPnOuLbtC725MCf6NL5M+jUWbBDLxuyXA4tedFR41Q+AfwjFb95d3hXYZNl4sn9vnTWXCRUeCxYCBth+2n0Z+7ExSK78Y/B1mUA8Qo/EX/TAPUoJBGKkPA9HGBL96mH7ibEKzGrlRZmmYTkUvGmXEuksz/507CsLU9nOuEY6Yz+jAIf5pfeoujXdKtqy7Hyc6FaJO2RBdz6BK1yfTdrJAAoJVIG16Gd/PL35OjguTwLia6pa39y/TaYf9gUdeQj5IAFOY1sngKzKJPopFb+Eyxg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Julien Grall <julien@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Gianluca Guida <gianluca@xxxxxxxxxxxx>, Bob Eshleman <bobbyeshleman@xxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 12 May 2023 07:45:49 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 11.05.2023 19:09, Oleksii Kurochko wrote:
> bss clear cycle requires proper alignment of __bss_start.
> 
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
with two remarks, though:

While probably not very important yet for RISC-V (until there is at
least enough functionality to, say, boot Dom0), you may want to get
used to add Fixes: tags in cases like this one.

> --- a/xen/arch/riscv/xen.lds.S
> +++ b/xen/arch/riscv/xen.lds.S
> @@ -137,6 +137,7 @@ SECTIONS
>      __init_end = .;
>  
>      .bss : {                     /* BSS */
> +        . = ALIGN(POINTER_ALIGN);
>          __bss_start = .;
>          *(.bss.stack_aligned)
>          . = ALIGN(PAGE_SIZE);

While independent of the change here, this ALIGN() visible in context
is unnecessary, afaict. ALIGN() generally only makes sense when
there's a linker-script-defined symbol right afterwards. Taking the
case here, any contributions to .bss.page_aligned have to specify
proper alignment themselves anyway (or else they'd be dependent upon
linking order). Just like there's (correctly) no ALIGN(STACK_SIZE)
ahead of *(.bss.stack_aligned).

The change here might be a good opportunity to drop that ALIGN() at
the same time. So long as you (and the maintainers) agree, I guess
the adjustment could easily be made while committing.

Jan



 


Rackspace

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