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

[PATCH v2 2/2] xen/mm: reject XENMEM_claim_pages when using LLC coloring


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Wed, 24 Dec 2025 20:40:35 +0100
  • 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=ibB7GBK4esDTfWKH202Z+KOXHrBuNaaGhAz82G4CK3I=; b=WT4Ec+09QQLEZ8+MvDNWT0DAU3awFSGLSn2osx5JElnTYh8Wr2DwVazNtVjzLENQMdWh4vq6+KhWRkb6HStbSyf2WJXOKw7pCJVu3NUvxhIJGVMMCMsXDxH2QiRm4mXf/O/1iwLGzJiRSHmvURSDpgpgD961oY1Vhlo2DgHpqDehASp4awOl1vqOkXJ0OHOrNhPB8GfrXuwtW46MBPXk20He7lzMYNMN7iJfxBJy+sOurhQak7vNP2NtI7vB9liAYaUCCcwudlNeIXRoENBAMK9+hNVKaas7VjcoBpITfKVNSbIKia/pPGYm9VYfwDXEVg+WnFojd21yNAIOAb9jFQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FNYSBPm5XghbdV784WDNnxii09yXwxm4RkNLg0anI/GC0D6nHWLePAvJMxlwGqledod6qNM2LhVdnb+E2Mb2pgIISrQRQiMWTed4E2UiHqnEwuPOp9Ivz/xeiswAiPkrXvEye254DcdHMGbhpnAl5CH8XWYGb25OmvHXO8ofoWRpFrF9H/9MtcDnGYzQb895DS598y/A9KkLcvzdbcgmOhp1xgBuqARdwThOGXJtVQ9Sq35JDocOzeFrE+5/yNwAUNQaTrZghdXHtvr4K1wWgix/cHoc0SWC8yWWIZ7PjS18EKI5nUg1DXiWpUpk9YyJBMRaIsD1zffYevNKmzA+wA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Wed, 24 Dec 2025 19:40:58 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

The coloring allocator ignores claims, reject the usage of the hypercall if
LLC coloring is enabled.  Note that the usage of alloc_color_heap_page() is
selected at boot time, and it's a system wide decision.  Once enabled all
domains will use alloc_color_heap_page() for allocations, which ignores any
outstanding claims.

The hypercall can be enabled if/when LLC coloring is adjusted to support
claims.

Fixes: 95debe51a936 ("xen: add cache coloring allocator for domains")
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
 xen/common/memory.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/common/memory.c b/xen/common/memory.c
index ae805ccbe4d1..3d978227276a 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -1660,6 +1660,9 @@ long do_memory_op(unsigned long cmd, 
XEN_GUEST_HANDLE_PARAM(void) arg)
         break;
 
     case XENMEM_claim_pages:
+        if ( llc_coloring_enabled )
+            return -EOPNOTSUPP;
+
         if ( unlikely(start_extent) )
             return -EINVAL;
 
-- 
2.51.0




 


Rackspace

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