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

Re: [XEN][PATCH] x86/paging: replace !paging_mode_hap() with paging_mode_shadow()


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
  • Date: Tue, 18 Nov 2025 14:31:58 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.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=CMvhyPEAKxba+6N/I1SQm/Bjz8mnxU/laodn14as4RY=; b=kA06rWR0LKDhh7oy/6ePFt912lFMLW5EQF/akvD4dkMbmFs1sduWJAPCeUmOnJ7rg+xO4xbD0qHq3fQLpVWNciMRFQkX5HWbiBdlq2NcGsTUMesAytqOcVS8XEK3jNhnK86ZNXUbP1rDsGvF2Vcm1AumQL8mDV+H6pvJTil9Mv8WPFE0s8lb2KZzSGP2G28HWMZBux3WfevdaUW7U99uvvD1J2YUxuKYer6xgxfoGrKSbG2sbqV/WKZrotZ9a4c6Z16LWU01leEvQmrHU3SsuHPy81A/IEDhO2Mq+YXIgUy0VJXyYU25blRVE1RSPGMHfVNC3OVc/UoyB1dknaVGRQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=f1S447vu5dioOtvM9IlU0DClQn+T7R9sIXPvgVlG1Q3sBDPrMy9dCe5EBp5i/XnuvT5YVzZlA89m2kAqqOFbxJGkloLVwm7xM9+JzORtn/c1v4cwDAMoD1Z/GphNoSY8fB1KA/tyeFfl00kMh+6lH2Kq/9LHYxT2uMnDp2nJYxvqoJZRMCZ3X+NMn0piznVC7v7o83xYMd1u8rShMmZSHCehqmJJCOdnClYIwabWdXnAjiyEgNqvocwvb7AuumfkiwXV0/e+/KYTg9Ou37F34aKPKqwt3O/D+SA1NJt+KRv/USjAW/BWZql0XKuAUVxwbM+Jg4eUspqwLD11odvqrQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Jason Andryuk <jason.andryuk@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 18 Nov 2025 12:32:29 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Jan,

On 17.11.25 11:47, Jan Beulich wrote:
On 15.11.2025 00:21, Jason Andryuk wrote:
On 2025-11-14 09:44, Grygorii Strashko wrote:
From: Grygorii Strashko <grygorii_strashko@xxxxxxxx>

Now Xen supports only two paging modes: HAP and SHADOW, so
!paging_mode_hap() is actually means paging_mode_shadow().

For HVM, that is. For PV both could produce "false". Luckily the code
changes are all in line with that, but somewhere this detail wants
mentioning imo (as it's also not part of the patch subject). Happy to
make a small adjustment while committing; then ...

Sure. Thank you very much.


For an abstract, future case of there being a 3rd paging mode it is also
better to explicitly mention checked paging mode (SHADOW) instead of using
negative check of another paging mode (HAP).

Hence, s/!paging_mode_hap()/paging_mode_shadow() which also allows DCE drop
unused code when SHADOW_PAGING=n.
The !paging_mode_hap() in hap.c not changed as HAP is checking for itself
to be enabled.

Inspired by [1].

[1] 
https://patchwork.kernel.org/project/xen-devel/patch/20251111200958.3576341-3-grygorii_strashko@xxxxxxxx/
Signed-off-by: Grygorii Strashko <grygorii_strashko@xxxxxxxx>

Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan

--
Best regards,
-grygorii




 


Rackspace

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