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

RE: [PATCH 12/37] xen/x86: decouple nodes_cover_memory from E820 map


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Wei Chen <Wei.Chen@xxxxxxx>
  • Date: Thu, 27 Jan 2022 09:27:15 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=9StqRPKe9C0ovEdHmfCHPIqa19prN36+omMW4Wnpe/E=; b=evfj7Bhw0MzRurZ6YJxXtguslt8REHurqAz6cbznH6vUA/yGXcOXn2RYq+iuVx/RLUuoxhQZ1PwA63IVVd7ELhrFqydiEcZSCeuXZqCSnkKlifiHQy8NYpc0zDOVwenzjZkJlSn2x3URM0hJGZHUPw4HURLmjotZl3PzU6F2S7/DkyEaw8ygJcHgx3FmovxZFylr0fw0gkvVEgkkQK2rrU5zNj9lpCfGBf+pI5q9et6/QlvcH52IxbXcfcq4Qo379d8YaApdPimN+NwOPWTuZnpVbyyTmmoEJFQ03Hg/PU4/3fK8TwgJPEDam8AIL8W01zey/jSR2U9P3vjk7/Xo0g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VCIkc3ovlA5w9LMgxQhSUbVxYxa326RGbUhxQMnXUDJpoRlLyDjTHm9CW3oPWicODbhDeeaEO0wPwbZK5Kj9hQyGR12UDtpeEKS/Kh5TZPRG7HVb4Y33KGPTIkX6GgsXQnhp2MfNoR28rLl70QMcGXOI76CVU2FBah0eURSb8KgPMFvkmyEGJ48Pol8ldMN867CgKBynMlJIyRqp+fC25jZf4PyodianBGKZa/1nuVVecN9XNQmBo+KdsZOtFM4Nj3DnikORKllDZyGpShZx3nv1hbp7dYzTEnt98HFpd2oQVtQ3b6vNIcaykrDg2QfjlhT6WtFPJg5GT0SkF30DdA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>
  • Delivery-date: Thu, 27 Jan 2022 09:27:30 +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: AQHXsHMWLK2Lk+nkCEuQGshEHTFFNqxzJoSAgAQcdmCAAAZJgIAADE6ggAAIWICAAAEtwA==
  • Thread-topic: [PATCH 12/37] xen/x86: decouple nodes_cover_memory from E820 map

Hi Jan,

> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: 2022年1月27日 17:22
> To: Wei Chen <Wei.Chen@xxxxxxx>
> Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>; xen-
> devel@xxxxxxxxxxxxxxxxxxxx; sstabellini@xxxxxxxxxx; julien@xxxxxxx
> Subject: Re: [PATCH 12/37] xen/x86: decouple nodes_cover_memory from E820
> map
> 
> On 27.01.2022 10:03, Wei Chen wrote:
> >> From: Jan Beulich <jbeulich@xxxxxxxx>
> >> Sent: 2022年1月27日 16:09
> >>
> >> On 27.01.2022 09:03, Wei Chen wrote:
> >>>> From: Jan Beulich <jbeulich@xxxxxxxx>
> >>>> Sent: 2022年1月25日 0:59
> >>>>
> >>>> On 23.09.2021 14:02, Wei Chen wrote:
> >>>>> We will reuse nodes_cover_memory for Arm to check its bootmem
> >>>>> info. So we introduce two arch helpers to get memory map's
> >>>>> entry number and specified entry's range:
> >>>>>     arch_get_memory_bank_number
> >>>>>     arch_get_memory_bank_range
> >>>>
> >>>> I'm sorry, but personally I see no way for you to introduce the term
> >>>> "memory bank" into x86 code.
> >>>
> >>> In my latest changes, I have updated these two helpers to:
> >>> uint32_t __init arch_meminfo_get_nr_bank(void)
> >>> __init arch_meminfo_get_ram_bank_range(...)
> >>> I am sorry, I forgot to change the commit log accordingly.
> >>> I will update it in next version.
> >>
> >> I'm sorry for the ambiguity of my earlier reply, but my objection was
> >> against "bank", not "memory". As an aside, you also don't want the
> >
> > How about arch_meminfo_get_nr_map/ arch_meminfo_get_map_range?
> > I am sorry, I am not very familiar with e820 map, could you
> > give me some suggestions?
> 
> First of all I don't think you need a "get_nr" function at all, which
> eliminates the need to find a good name for it. The "get_range" function
> can easily provide back a unique indicator when the passed in index is
> beyond the number of regions. For this function's name, how about
> arch_get_memory_map() or arch_get_memory_map_block() or
> arch_get_memory_map_range() (in order of my personal preference)?
> 

Thanks, I will try to use arch_get_memory_map for x86 and arm.

> Jan


 


Rackspace

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