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

RE: [PATCH v1 1/3] xen/arm: generalize per-page GFN storage beyond xenheap pages


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: "Penny, Zheng" <penny.zheng@xxxxxxx>
  • Date: Wed, 1 Apr 2026 07:34:32 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=xfewqG2xAv+N14UNDbtlSiLtkkD0m9BGD8h0UcutuAA=; b=nf+TPeVGJE+X01Jwsfb60GQhnOWI4IZioz48wn3X9ashEWnBOV+sBlx0l+xYRlKvA9s4oPQSIPqlXp4I1NwvSJdBiMnx9h4sKhqYxtX5XObtrJk00N0WHZtr3TuQO0JGU7BUMd2cX+hvCB37/d6C8KX8IXNCeGFkABZh2woMBqgzJllwKQiu98spWWJnZqal4UiHrrX5hCoF1Pk4b2jOsh2g7P47judYw2tLnBOtBYIWklFYjrWMDzKIJH+hIeSDpz2ibY3+oc56C1smf5T7a23/ognRmMQXudmn8bKpXdO0iK5kFWpdR72KK+cW0n0lRZWiWAb21JOgLwN1RjH0+g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=AOD96thFTYQHhpQUneVeA61TprJUZidKZzRJongXjQqkdzGSnwSQPBdRErKJjgwSvNkA5Oa/dPe6ctoMNrzpJUWd/9FI9nQZ/lC3w6HAdGfc0nf9psKkeyszENrAuDNJ9sFs71OJ5tMy7+IoXR3v/3Tr2kIYyHSDOK2x5G87gkqmODjY2BIVB/+wPkdQzO6KgKSBKjza6EEs8atkcee0cy2SJNqRIvRaEucF+PBf37ZvhjINvHRncc3TZaWYOmxgvYrnONkk1OZ8QQfNJclvr82Q49adM8Avpgxazt8shJ3EiW2OCD4G1ShgTtrD+g2+JqbW82E8imi8AtZvxVqmiQ==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:x-ms-exchange-senderadcheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: "Huang, Ray" <Ray.Huang@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, "Orzel, Michal" <Michal.Orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Garcia Vallejo, Alejandro" <Alejandro.GarciaVallejo@xxxxxxx>
  • Delivery-date: Wed, 01 Apr 2026 07:34:47 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Msip_labels: MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_Enabled=True;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_SetDate=2026-04-01T07:34:09.0000000Z;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_Name=Open Source;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_ContentBits=3;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_Method=Privileged
  • Thread-index: AQHcvb8lM85JfRwCbUCtKWTFoK4zzbXHHE8AgAK1uwA=
  • Thread-topic: [PATCH v1 1/3] xen/arm: generalize per-page GFN storage beyond xenheap pages

[Public]

Hi,

> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Monday, March 30, 2026 9:49 PM
> To: Penny, Zheng <penny.zheng@xxxxxxx>
> Cc: Huang, Ray <Ray.Huang@xxxxxxx>; Stefano Stabellini
> <sstabellini@xxxxxxxxxx>; Julien Grall <julien@xxxxxxx>; Bertrand Marquis
> <bertrand.marquis@xxxxxxx>; Orzel, Michal <Michal.Orzel@xxxxxxx>; Volodymyr
> Babchuk <Volodymyr_Babchuk@xxxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx;
> Garcia Vallejo, Alejandro <Alejandro.GarciaVallejo@xxxxxxx>
> Subject: Re: [PATCH v1 1/3] xen/arm: generalize per-page GFN storage beyond
> xenheap pages
>
> On 27.03.2026 08:50, Penny Zheng wrote:
> > As preparation for fixing mfn_to_gfn() on ARM, we extend the existing
> > GFN field in page_info's type_info to be usable for not only xenheap ones.
> > Another usage will be introduced later for stolen pages in memory exchaging.
> >
> > Introduce general-purpose page_get_gfn() and page_set_gfn() helpers
> > that read and write the GFN stored in type_info. The old
> > page_get_xenheap_gfn() and page_set_xenheap_gfn() are retained as thin
> > wrappers with their xenheap ASSERTs, so all current callers remain 
> > unchanged.
>
> Why was this GFN setting limited to Xenheap pages back at the time? Depending 
> on
> the reasons, retaining the old accessors may or may not be a good idea.
>

The only call site is to set shared_info gfn. I assumed GFN setting could be 
uniformly available.
FWIT, the only limitation is that it shall not be applied to shared pages. In 
arm, I think it's static shared memory.

> > Also introduce PGT_INVALID_GFN as the general sentinel, with
> > PGT_INVALID_XENHEAP_GFN aliased to it for backward compatibility.
>
> This I view as unnecessary, if not confusing.
>
> > --- a/xen/arch/arm/include/asm/mm.h
> > +++ b/xen/arch/arm/include/asm/mm.h
> > @@ -113,18 +113,21 @@ struct page_info
> >  #define PGT_count_mask    PG_mask(3, 3)
> >
> >  /*
> > - * Stored in bits [28:0] (arm32) or [60:0] (arm64) GFN if page is xenheap 
> > page.
> > + * Stored in bits [28:0] (arm32) or [60:0] (arm64) GFN if page is
> > + xenheap page,
> > + * or stolen ones in memory exchanging.
> >   */
>
> Does the purpose really need limiting like this? If the field covered by 
> PGT_gfn_* is
> uniformly available (see the question above), I don't see why a new 
> constraint would
> need spelling out. If it's not uniformly available, then likely the 
> description needs
> expanding as to when the new accessors are okay to use. If uniformly 
> available,
> what may want spelling out is under what conditions one can expect the field 
> to be
> properly set (until such time where it's set correctly on all guest-owned 
> pages).
>
> Jan

 


Rackspace

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