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

Re: [PATCH early-RFC 1/5] xen/arm: Clean-up the memory layout


  • To: Julien Grall <julien@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Fri, 18 Mar 2022 08:45:57 +0000
  • Accept-language: en-GB, 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=0vYsQuEsUZwzCWA1Pb2hcmj/8hztnph8Q+lwBvEea5A=; b=ZFIfmyeTlL+7VKz9B+42kIJfI1AQM4+tWAsVUWSDWZMKu7dqYiNZ2P3CsaayM2EvRoeAX9eyR27idt/JmyGZiCqi5Oi+DhFvBXsXJHPBvtBKGRW3JQCooSOVnh/BS2Xd3TpUR2iHqAqAOfL1vn7ZCCTkWQ+6saNIri0R+2xqKEpv7Mx2E4rh1t0JeYS2ax+6fc1Nowok5h9uCiJPOdmMU36PwavY3ecbO597KbPLVaqCsHpld0xk1Xh8M4adeRXsOYKZoPtAjnVZmZJNjT6jbAYEjTRdyMkCNSp6AxrfWDCU2OwA7wDlc8qrl+F6AKZ63ojFPiL1Mx70LmuTGokX4g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mXtqVx/vCDKbf7nG/AtUBXgfpghPqUut0GuSvepxcGb25tyZ11DNU3q3tJVs1I6E0P0er8WKcGVRmGjCW9orLfo2E4xXs9mxDSDMeB+hWRStyuAofNsSjv+u04I6Z7Qmf2krfFku5ow63P1h0P8E+RFcst5lpJfmX5FzRRIi4ne4sFzQqjHtjvHHUF9kkg5AnIO5TnF2/9Ef5RSPQF/b/gBESwtHzKGek2md3/OO7LVaOBbCxCu50oeG+Q/X32ccFkvGrJID4E2dRMxHs3B4IAk1HP9maE6BHPdj5owDeaAfHO5DtcSM15ljr0ur96/oPUSgmqYGMbMOdiyjNKnIaA==
  • 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>, "marco.solieri@xxxxxxxxxxxxxxx" <marco.solieri@xxxxxxxxxxxxxxx>, "lucmiccio@xxxxxxxxx" <lucmiccio@xxxxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Fri, 18 Mar 2022 08:46:14 +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: AQHYM6fgzbIssM9RMEi7y17EBtCCCazDvrYAgABWJYCAAMz/AA==
  • Thread-topic: [PATCH early-RFC 1/5] xen/arm: Clean-up the memory layout

Hi Julien,

> On 17 Mar 2022, at 20:32, Julien Grall <julien@xxxxxxx> wrote:
> 
> 
> 
> On 17/03/2022 15:23, Bertrand Marquis wrote:
>> Hi Julien,
> 
> Hi Bertrand,
> 
>>> On 9 Mar 2022, at 11:20, Julien Grall <julien@xxxxxxx> wrote:
>>> 
>>> From: Julien Grall <jgrall@xxxxxxxxxx>
>>> 
>>> In a follow-up patch, the base address for the common mappings will
>>> vary between arm32 and arm64. To avoid any duplication, define
>>> every mapping in the common region from the previous one.
>>> 
>>> Take the opportunity to add mising *_SIZE for some mappings.
>>> 
>>> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
>> Changes looks ok to me so:
>> Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
>> Only one question after.
>>> 
>>> ---
>>> 
>>> After the next patch, the term "common" will sound strange because
>>> the base address is different. Any better suggestion?
>> MAPPING_VIRT_START ?
> 
> For arm32, I am planning to reshuffle the layout so the runtime address is 
> always at the end of the layout.
> 
> So I think MAPPING_VIRT_START may be as confusing. How about 
> SHARED_ARCH_VIRT_MAPPING?

> 
>> Or space maybe..
> 
> I am not sure I understand this suggestion. Can you clarify?

VIRT_SPACE_START was in my mind at that time but that is also not good

How about using BASE instead of start: MAPPING_COMMON_VIRT_BASE ?

Anyway hard to find a nice name, so your solution with SHARED is ok for me 
unless someone has a better suggestion.

> 
>>> ---
>>> xen/arch/arm/include/asm/config.h | 24 +++++++++++++++++-------
>>> 1 file changed, 17 insertions(+), 7 deletions(-)
>>> 
>>> diff --git a/xen/arch/arm/include/asm/config.h 
>>> b/xen/arch/arm/include/asm/config.h
>>> index aedb586c8d27..5db28a8dbd56 100644
>>> --- a/xen/arch/arm/include/asm/config.h
>>> +++ b/xen/arch/arm/include/asm/config.h
>>> @@ -107,16 +107,26 @@
>>>  *  Unused
>>>  */
>>> 
>>> -#define XEN_VIRT_START         _AT(vaddr_t,0x00200000)
>>> -#define FIXMAP_ADDR(n)        (_AT(vaddr_t,0x00400000) + (n) * PAGE_SIZE)
>>> +#define COMMON_VIRT_START       _AT(vaddr_t, 0)
>>> 
>>> -#define BOOT_FDT_VIRT_START    _AT(vaddr_t,0x00600000)
>>> -#define BOOT_FDT_SLOT_SIZE     MB(4)
>>> -#define BOOT_FDT_VIRT_END      (BOOT_FDT_VIRT_START + BOOT_FDT_SLOT_SIZE)
>>> +#define XEN_VIRT_START          (COMMON_VIRT_START + MB(2))
>>> +#define XEN_SLOT_SIZE           MB(2)
>> I know this is not modified by your patch, but any idea why SLOT is used 
>> here ?
>> XEN_VIRT_SIZE would sound a bit more logic.
> 
> No idea. I can add a patch to rename it.

I think it would be a good idea, we already have a lot of terms in here and 
SLOT is just adding to the confusion I find.

Thanks
Bertrand




 


Rackspace

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