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

Re: [PATCH 04/22] xen/numa: vmap the pages for memnodemap


  • To: Julien Grall <julien@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 20 Dec 2022 16:25:31 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=9lBWF8t2CEwhyzo6gGlJGOj0vvWlIpLrhjHvCAleW80=; b=ZBo/bq60oeqk3Mp9LNl1BjirkjEmuwGoLJzG8M8ZMGXtfuiwU0/Kj61N0wLt0ns9XXhjG+HHV9M72D0FT3LqqN1c53W+YrYGqeLzqIEEKJ5u7I/jkTpdcNsoo2RucokxwDQKDy43xJTm2FBQyJ4aRT/KAACOVTnHk3SzySpdFXxKuota2Jk8UxRoZ31JnaSx9aechzfxLAZg3oDutCGhCZX3HrZIChJWcKdsUtzldPV+ADvXZYvVteP5nOOF2LFV/JR4Qc3duulMglYwOa8MzzN2krQJMYlWdwHNMi+cbkiaGwPknbLcaZequawqGiMpdqZUFtQk6tI3m2wIkTizaA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bi0cYmDekGsVY1GZWxmaJGzY37jMMBHtAv+vfDTaz7avmZioia+T05bYIlr6RRtMYvTftVowjArF6n0jW5uGpY82HZlTKmTWv9h82w/Fc8Gu4E0HdMlr4bfybdea8dtcFqsWkrFtfmPQL6uqIQP42IDYpqGuYFgbdjZOXgCCYZN9mrzdrGtTWKeWUv0xqRRqUF2i0M0wgMfP4Uv1SLJCTWWqO/FSUVFs9s2mxIOvcvZ5tEs4zM7gQVLrogj50rPtoIEv+1ecmbfv/cr7SpW/Rh6+nbZxMaRRVPObPSiGNj9UiF2n/2DWeKowFY7REEgz2ze9qAyPbSls810hm+48Cg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Hongyan Xia <hongyxia@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 20 Dec 2022 15:25:37 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 16.12.2022 12:48, Julien Grall wrote:
> From: Hongyan Xia <hongyxia@xxxxxxxxxx>
> 
> This avoids the assumption that there is a direct map and boot pages
> fall inside the direct map.
> 
> Clean up the variables so that mfn actually stores a type-safe mfn.
> 
> Signed-off-by: Hongyan Xia <hongyxia@xxxxxxxxxx>
> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
(obviously remains valid across ...

> --- a/xen/common/numa.c
> +++ b/xen/common/numa.c
> @@ -424,13 +424,13 @@ static int __init populate_memnodemap(const struct node 
> *nodes,
>  static int __init allocate_cachealigned_memnodemap(void)
>  {
>      unsigned long size = PFN_UP(memnodemapsize * sizeof(*memnodemap));
> -    unsigned long mfn = mfn_x(alloc_boot_pages(size, 1));
> +    mfn_t mfn = alloc_boot_pages(size, 1);
>  
> -    memnodemap = mfn_to_virt(mfn);
> -    mfn <<= PAGE_SHIFT;
> +    memnodemap = vmap_contig_pages(mfn, size);

... a possible rename of this function)

Jan



 


Rackspace

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