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

RE: [PATCH v3 3/4] xen/arm: mm: Rename xenheap_* variable to directmap_*


  • To: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Wed, 7 Sep 2022 10:53:23 +0000
  • Accept-language: zh-CN, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • 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=2; 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=Fb/XEvmuxNWXiPnyUv/3Sruj6Sd9xw1voR7XZPSYG0o=; b=D1UhnOa7Gi8GHX7mrZwxPPvJL3JGzjJx85uzgW3GmskNSrgRMNWcAT33w+M1oFcaG5rHFtG4iStx8sxBIdMcof6DXiI/KRY17t4pnLMFqw2/IPbmVbjRyIo4o+8z2xJmUDkrsyntHqnctK3cPkkoc/QJtjyyw7WHYUdhNcOcLMp5MFSzEaNRS0HEyUw4LFjspfZTiF26MGAU134IpZfWrJasLWzPig48cVlaWM5UZBdAC6U+kCtn9pTNwWRYliuY8myEtc3iK1zwgsjT26vr6izhaNKjiZ1zhAtbQIooT/6sni9c2ZZhD4YLeVhLr9U+Jd6bWIVTcDhbChgV9vt5eA==
  • 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=Fb/XEvmuxNWXiPnyUv/3Sruj6Sd9xw1voR7XZPSYG0o=; b=WdOSS4EElH0jNtZp23tGlQ075OpG1f2qolez3bmQZT9tfm7wnAO48sZBr7Mqo5hnOOyYCxLq5AMSG0Lv4CDu+B0wJAOq6/coAU2tuX4z1STTicPtsZNi5fZjruTtAD9fqgAOPeMjTM/oJPWSZhDKPaAMRRByUzKJ2q1oLpP+RAqZyVQF8dZNOSqNPeHd/IMwn3hxWdY6uQiOU8bJsC+5YSmfRDU8sMEfu3s05cJ83tmuT1l0G9+6LQbO0sfjoS717Lsvrjhs2QyuuMus1do7uW3AEG6Lgbh22C+SLeQXVPnVOtmasSknkSq4Qx0JMxEXQhOwz70ztGP8pV0KAsKk3Q==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=YJeaJG2rjR8p5tITeRE85b36kEdpUQRlcb2urinBsNAQzAceffHP51mGZB5bsuaP7PgDgEKw4PutA1ceoN01vmQwdHPmM2+v4Ii9opVTHDKYGuIc8sJjADRYiJWpbtqZrJVHrW36Un6J3UuCoX7Zf8yZVtUUp3FQ1DBkuUZWtqrrKWiRPvHGziqEg5LjmJHSMjJxVXbUB7deReTbeEodjUl4BaGixcM8LHe+L16qLTt/NxmVX64krx52BOTeCv7edqLAOuuK6vE1BViym0ziO0hIEE7t+D1YXzizAfunM+86vfVAhx5mjltQamtwppcTvp3EBM9BBxW8DQJ4Ws06EA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jFi7qdCkqQdCz0DsonLfKLpdK1oNqhmQYfV4H3UTphzu/7i/6XrVI4erNhMYf+pYynpm0cy6IVS5GL1thBDYhDVNqNQMGFkQlYoiaXxhyCtb/a6e3+5wFyVqnW8PA2YNJKGzYwTg9bSYXs3hmgAsh6Z93mE1g5bZd9ggOpYd/MCT0cU7R4r8+YleHGR+o2o5t2ehMMhHAii+xwqC05bwUfYCxSUf0LWasKuXgI6YG8R/Pu4KHX5GNjLEhV1HE79+rDA8SNdpgo9PF37DVfj0FThJi3CeZIEa0oTX4ZNPaqTbey/AOflAx8rMugQ842AQtiea7BSiRvn93A+ZEN0vdA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Wed, 07 Sep 2022 10:53:40 +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: AQHYwpULGFLWtgCBlkSkZYDaahDS7q3TxKQAgAAEM/A=
  • Thread-topic: [PATCH v3 3/4] xen/arm: mm: Rename xenheap_* variable to directmap_*

Hi Julien,

> -----Original Message-----
> From: Julien Grall <julien@xxxxxxx>
> Subject: Re: [PATCH v3 3/4] xen/arm: mm: Rename xenheap_* variable to
> directmap_*
> 
> Hi Henry,
> 
> On 07/09/2022 09:36, Henry Wang wrote:
> > diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
> > index 7f5b317d3e..4a70ed2986 100644
> > --- a/xen/arch/arm/mm.c
> > +++ b/xen/arch/arm/mm.c
> > @@ -132,12 +132,12 @@ uint64_t init_ttbr;
> >   static paddr_t phys_offset;
> >
> >   /* Limits of the Xen heap */
> > -mfn_t xenheap_mfn_start __read_mostly = INVALID_MFN_INITIALIZER;
> > -mfn_t xenheap_mfn_end __read_mostly;
> > -vaddr_t xenheap_virt_end __read_mostly;
> > +mfn_t directmap_mfn_start __read_mostly = INVALID_MFN_INITIALIZER;
> > +mfn_t directmap_mfn_end __read_mostly;
> > +vaddr_t directmap_virt_end __read_mostly;
> >   #ifdef CONFIG_ARM_64
> > -vaddr_t xenheap_virt_start __read_mostly;
> > -unsigned long xenheap_base_pdx __read_mostly;
> > +vaddr_t directmap_virt_start __read_mostly;
> > +unsigned long directmap_base_pdx __read_mostly;
> >   #endif
> >
> >   unsigned long frametable_base_pdx __read_mostly;
> > @@ -609,7 +609,7 @@ void __init setup_xenheap_mappings(unsigned
> long base_mfn,
> 
> I think the function also want to be renamed to match the code below.

Hmmm, renaming the name to "setup_directmap_mappings" would
somehow lead me to think of we are getting rid of the name "xenheap"
completely in the code, which seems a little bit scary to me...

But I just checked there is a comment
"/* Set up the xenheap: up to 1GB of contiguous, always-mapped memory."
above the function and the declaration so I guess we are fine?

> 
> >           panic("Unable to setup the xenheap mappings.\n");
> 
> Likely, I think this wants to be s/xenheap/directmap/

Ok.

> 
> >
> >       /* Record where the xenheap is, for translation routines. */
> 
> Same here because you set directmap_virt_end.

Ok.

> 
> > -    xenheap_virt_end = XENHEAP_VIRT_START + nr_mfns * PAGE_SIZE;
> > +    directmap_virt_end = XENHEAP_VIRT_START + nr_mfns * PAGE_SIZE;
> 
> I would be OK to keep "XENHEAP_*" for now.

Thanks for your confirmation.

> 
> >   }
> >   #else /* CONFIG_ARM_64 */
> >   void __init setup_xenheap_mappings(unsigned long base_mfn,
> > @@ -618,12 +618,12 @@ void __init setup_xenheap_mappings(unsigned
> long base_mfn,
> >       int rc;
> >
> >       /* First call sets the xenheap physical and virtual offset. */
> 
> s/xenheap/directmap/ I haven't looked if there are other instances in
> the function.

Don't bother, I will take care of the rest.

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