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

Re: [PATCH v2 1/2] xen/pdx: account for frametable_base_pdx in generic pdx_to_page/page_to_pdx


  • To: Michal Orzel <michal.orzel@xxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Mon, 4 May 2026 17:28:29 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=7JAb9tEbw9b2g2PZcWBDD4654VCnxzMyv7lXoltvcyE=; b=l2wpPga0YNMXdAxzP5x6P4sntkfWliTir+DvDN+1ZKRoUQomYmRhNffe7qHTasJZrHDjVDe8Dz6V+z8HLs0/h+WII94LWVtggN8ebi2yUhKtUeJ9Wnvjsdb1kQtB88oJ807VEQ4n7bzTPzL6hPlo/EpHMa5Za1sKn6+TGiD3ggxhGA16M2DQ8+fSZeTMIzlXroi2sYGW6ipPZLVWUdd7vmTItjceXJ9XjN9iaVT+KP/7rvLonyMHAWPsvpsGa259JSMzTkruFFh+5PHStREZin5L/wzbI8AQzd95GcCwp6Q0ADc7wdeyTE8882VO/RBDnkYf90n47KbdSg8hyPo7mQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ecBERiwbEX7cCaGadpqgDDjvr0B3CEEMTFfyd/9/7ksB7AVBfAJ9e/02gRVvQUL1jWZR5Nb31CYYqzdgCbjsX3n3OJ17NgkmgQnkchd3kjHvWwBLdA5WyHuCcTTjcP8x9eJyZUb+4ex3ECp5uh9JG1AHaFMrpmkhxpcOJDta4YOOdVRylbTNQRqMYY22JdjNMVP6v+SaBC3l00xM+OgBS0lGRifK8zU47SNaCkb9t+08slGFSB1eiUxRyczuX0nbBrKj0ep91HAEBAOBZLTsUDcH2jzfC1mgFAm67M2tmY1JnUp03gZHGcH61TKSJSbneG5qoXEd1fu4vf9Qu10O3A==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=citrix.com header.i="@citrix.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=citrix.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Timothy Pearson <tpearson@xxxxxxxxxxxxxxxxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>
  • Delivery-date: Mon, 04 May 2026 15:28:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Apr 30, 2026 at 02:51:02PM +0200, Michal Orzel wrote:
> The generic pdx_to_page() and page_to_pdx() macros in xen/pdx.h assume
> the frame table starts at PDX 0, which is only true on x86. ARM
> uses a non-zero frametable_base_pdx to offset into the frame table (PPC also
> defines it).
> 
> Fix the generic macros to subtract/add frametable_base_pdx, defaulting
> to 0 when the arch does not define it. This makes the generic macros
> correct for all architectures, even though they are only used on x86
> today.

Hm, I assume this offset was added because the original mask PDX
compression won't (usually) compress the gap between 0 and the start
of RAM.  However the newish offset PDX compression should be able to
compress from 0 to start of RAM, and hence you don't need to apply
an extra PDX offset there?

If that's indeed the case it might be better to integrate
frametable_base_pdx into the mask compression algorithm itself, so
that on some arches it's a mask plus a decrease.

Thanks, Roger.



 


Rackspace

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