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

Re: [PATCH v5 04/13] xen/arm64: Split and move MMU-specific head.S to mmu/head.S


  • To: Julien Grall <julien@xxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Mon, 21 Aug 2023 09:29:50 +0000
  • Accept-language: zh-CN, 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=BQxnPckA8TIueSsLHUcrBSNPTsmk8PCrru6F01B/7Vs=; b=We9vW/Stfi7J4pnyTN9bSiwItYeKUKtuAxjg2088jnWp72rC6EdqY+NfedsaaYYgwEyS2i3qrhFbiBbTppa7lyrJKh7D9mMtBEEljoD99A+91RcV7hpuqmc1v+iT7/ZgzQmSGCwI115vd9huNgjnP8kU2JzXX9RAvDY9Z4ydGDxnOI/yubACkgIsdHRsGDctA6Vaq+Vn1Xl6++gnz7kQRILAE5fs3+TXlkaaWbriVrLAipOJpSBsQ4ib9AHaFXJ9n3HFzTlEf7yG3iryjBHQEQObtcU6RWmjCHXSmJEd+yyXUY7vN16mFTG1Sob7bQWL4ebiHBQW2bCBsDMnddCrTw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vs2jttdllGym8hdpLJpm251bnv0sJUzxs3A7afCR0NhhzLu+FPi+XoS7RtF7mnl+Pm68o9vLDAI4KREN7ke+t4VrJL7dsBlWMSwg3qoQCfWDh5Z6sVTgzgnbAgQcNJ9x4IyUhYhq7DFCFf8NyEjKzaPzFLO0V2z6zcwXcuqeiTimt/SS+lfkAjGAPMqM/WmfXUoYpUF35k+RSNXtR3x9MvfjVX7jFqZGr2ezlc96ggRdIIQ7LT67c6JHq7xP+XCVi+ZUMJdmNJCuIIVigadkqd8FBdz2KkEauKP9eZWElis24NZUgTIMSCrJrRSU65KrX6+7O+v2AJv4D5POghk9Kg==
  • 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>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>
  • Delivery-date: Mon, 21 Aug 2023 09:30:41 +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: AQHZzmd/BB25uAPEnE2BQngtG1/sgq/0g/oAgAADOQA=
  • Thread-topic: [PATCH v5 04/13] xen/arm64: Split and move MMU-specific head.S to mmu/head.S

Hi Julien,

> On Aug 21, 2023, at 17:18, Julien Grall <julien@xxxxxxx> wrote:
> 
> Hi Henry,
> 
> On 14/08/2023 05:25, Henry Wang wrote:
>> The MMU specific code in head.S will not be used on MPU systems.
>> Instead of introducing more #ifdefs which will bring complexity
>> to the code, move MMU related code to mmu/head.S and keep common
>> code in head.S. Two notes while moving:
>> - As "fail" in original head.S is very simple and this name is too
>>   easy to be conflicted, duplicate it in mmu/head.S instead of
>>   exporting it.
>> - Use ENTRY() for enable_secondary_cpu_mm, enable_boot_cpu_mm and
>>   setup_fixmap to please the compiler after the code movement.
> 
> I am not sure I understand why you are saying "to please the compiler" here. 
> Isn't it necessary for the linker (not the compiler) to find the function? 
> And therefore there is no pleasing (as in this is not a bug in the toolchain).

Yes it meant to be linker, sorry for the confusion. What I want to express is
without the ENTRY(), for example if we remove the ENTRY() around the
setup_fixmap(), we will have:

```
aarch64-none-linux-gnu-ld: prelink.o: in function `primary_switched':
/home/xinwan02/repos_for_development/xen_playground/xen/xen/arch/arm/arm64/head.S:278:
 undefined reference to `setup_fixmap'
/home/xinwan02/repos_for_development/xen_playground/xen/xen/arch/arm/arm64/head.S:278:(.text.header+0x1a0):
 relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol 
`setup_fixmap'
make[2]: *** [arch/arm/Makefile:95: xen-syms] Error 1
make[1]: *** [build.mk:90: xen] Error 2
make: *** [Makefile:598: xen] Error 2
``` 

I will use the word “linker” in v6 if you agree.

> 
> Other than that, the split looks good to me.

May I please take this as a Reviewed-by tag? I will add the tag if you are
happy with that.

Kind regards,
Henry

> 
> Cheers,
> 
> -- 
> Julien Grall



 


Rackspace

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