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

[PATCH] x86/pod: fix decrease_reservation() clearing of M2P entries


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Wed, 10 Dec 2025 10:35:13 +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=BF2tLEa1ciGn4FPlLPIZRHS9g5i/rlx0nNwf49e0PUY=; b=AWhfakboagIiiUdqsF2BMrjBkfWndl1s26ClKtz0a+GR/SWK4XI4i4FO5eZ5FbWQkf8zT6gCtTePOSUGIeuI6nZPZVqNiJDwzxWfQofH36vJIjAabAr40U5FvKiSGDNrhq8KWgAb87Y3g5IQgTEuM1/m7/OQiq2qBPXr2IfcrBbxjhBaH4pxFr39rQ5e4BB27lDNeDJNOKAe4QN85SeeYysIE9fzfx4hMvl7t0jjaNohFGqpE3MWDQs26I93TDuV74Lu5aRwpTvKz7ofkUZIcB8qBazsIXTQba/F/WhdlAMyrMZP0eZrdnyahj7c7eiJphLvAcR1/SeizAOrppTIQQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=n/bPlColAkYYETPlvd4wUvhJQb2wpiKWaPM4dMS5ZzrrFQqmv22E89Vv9IRGtytw3sWBOTIzcPKqxs4fUTdzBsvak0s2kV6So91KYRFCb8j02eRsybrC2O9U1lpxHVWXLypnVhY+ioBIMjPcdYwGG/TvOQxKwek1UXnzKageAjJ+r1YY5siJAP6nZypkVGh5+MWhi/vUglQDTpck2XaLi3UCxneoy0+2zvetmzQI0/dU+WsQofd/I4uE9+e0seIdNprQhy5m5t3xIe8lMbQmwHt2a5hBvjYYBBlGnK5QDAnNJVdlmTc44cDEUN8oQNt3pblnG7CpSxEj7Lksg+zvHQ==
  • 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>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Wed, 10 Dec 2025 09:35:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Add the missing index increase in the M2P clearing loop, otherwise the loop
keeps pointlessly setting the same MFN entry repeatedly.  This seems to be
an oversight from the change that introduced support to process high order
pages in one go.

Fixes: 3c352011c0d3 ("x86/PoD: shorten certain operations on higher order 
ranges")
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
 xen/arch/x86/mm/p2m-pod.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/mm/p2m-pod.c b/xen/arch/x86/mm/p2m-pod.c
index 05633fe2ac88..22dde913cc3c 100644
--- a/xen/arch/x86/mm/p2m-pod.c
+++ b/xen/arch/x86/mm/p2m-pod.c
@@ -655,7 +655,7 @@ decrease_reservation(struct domain *d, gfn_t gfn, unsigned 
int order)
             }
             p2m_tlb_flush_sync(p2m);
             for ( j = 0; j < n; ++j )
-                set_gpfn_from_mfn(mfn_x(mfn), INVALID_M2P_ENTRY);
+                set_gpfn_from_mfn(mfn_x(mfn) + j, INVALID_M2P_ENTRY);
             p2m_pod_cache_add(p2m, page, cur_order);
 
             ioreq_request_mapcache_invalidate(d);
-- 
2.51.0




 


Rackspace

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