[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 10:21:25 +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=hRgYvTj8wV8X8LLf91UC7F94WM1Aew4R1zcWAuUR9rI=; b=LIz61pTiK/l2u8/z2/rOGM3qPvBevjF0kx5RK+87gWecSNbdXJwaJ1+DH8r5jDAIkK+9tafbf/MCL8bJzVS1uXLJxp7h6NV0rL+fd9gQCsFqjrXtnqwBLUGfJk4dUclNZPwrA0v16VVGDmJnAteuH7jWybEuSRflL9YrYzXt/YibshmLVX1p+jxXUr1PpebiT+kXrVvZKowSKYMRMTl3BflFd3prT/ikwegqpjUioL2UF0CU3cZ4lXuIMRBlD4u2c9PQgIhYTPWcj1NPyZqlm9zhCZOVUyStcmbr8lZ8ak3AeyQe3AIHzDph8dS4TIc91svcpWG9QkP+JGK3DKzTbA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kdNXKPMXmZ9ryeumSi6bEVG2Jg+VtBeE8FAqQB25i9q2ff1MMW38P0lRDC1IqyV7eWUe9E4TR2UYVq+tfjj2k1ProBaaPzmE0llJaGonuoJlctG2kWDoSe7JMyK0q0uwMvGmJWDoI6Py2w6BcG5ImbScL0XIoF+cNOKj1WCq5LaK7cF8N+tcTZ6oXq8PYx1GS1BQGDV5LKzN3dejBOjsnxNYxIttuefwWVvyODkanQdaroVLK3zTxUIWERK/cE2i8z9ywbnddJcL+Fbq09lQXn1PSOqy609BN1mR33B0OECneFxi5dpTuJknMbdXUv0YnuKG6H+RAA0WjmAGw6sjWQ==
  • 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 10:21:51 +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/oAgAADOQCAAA0rAIAAAUAA
  • 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 18:16, Julien Grall <julien@xxxxxxx> wrote:
> On 21/08/2023 10:29, Henry Wang wrote:
>>> On Aug 21, 2023, at 17:18, Julien Grall <julien@xxxxxxx> wrote:
>>> 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.
> 
> The sentence also need to be reworded. How about:
> 
> "Use ENTRY() for ... as they will be used externally."

Sure, I will use the suggested sentence.

> 
>>> 
>>> 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.
> 
> Sure. Reviewed-by: Julien Grall <jgrall@xxxxxxxxxx>

Thanks!

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®.