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

[PATCH 1/3][4.17?] x86/pv-shim: correctly ignore empty onlining requests


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 28 Oct 2022 09:21:51 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=YIhWJYPncYb8h4kWhPCveJpPZuHkPif4kdTPxSU2Ykg=; b=QZUyx5uiObIxM1V5G7249iHsNDqtsQYm6a5rdV8d8GVpkHVs7GVxb7+gWsKSpOLtp0NIelOGr51z0BwfMeOsvI0VrthesU1CGrtZffxTehIfIXq2w44zFpseSuPoTkdW9NRywalD6FLStgFT8fCwj0QSS2VagPs/lMKl5GUzIrdMz3aHHcUFM1EB8iak4yimRqPR6/VR7rO1siAv+5tMvEz7x9gvvisBx6W8EkAt8N2CTo3/+ki9/XqZxaB7AtYAD6mulhXvjJz5JWdqMRPlVX5u0T2ayU5wWw7k1xYO7mvz2TPrPLL6e2r8d4HB4UjxZP07x0tREaoDxlepV8zP2w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MV5erz9oEQdMcoEAm3htOgDfSAXy6K5nmnLq48x7fXdZcRS8i63DziepT2Mkuw8hl2Tk9lPlsAybmptrLfOodvkQxo7RE5lQeHbqXP6j/w/m5lJt9uvG6fXQKBYvFJJeHPX4YouAOE6MbCwvpjZN5pvkzJiuPSJ1ZSG18aM7L+vlU4Z6GWboPpGOeZdev4yCD+9N/Lk87fwMj9ipPMRJkyy7gpIxQ5ViqbitBeTtxggMIUCP+VdGSArUyXyMycz1yrvJH1uF3k98vJtNxgavBadg3lBmijL1bUOZx6oR1Xs89Y47DMUvo9+INis98XILfZocLFXbXCh7v295FmKg7g==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>
  • Delivery-date: Fri, 28 Oct 2022 07:21:59 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

From: Igor Druzhinin <igor.druzhinin@xxxxxxxxxx>

Mem-op requests may have zero extents. Such requests need treating as
no-ops. pv_shim_online_memory(), however, would have tried to take 2³²-1
order-sized pages from its balloon list (to then populate them),
typically ending when the entire set of ballooned pages of this order
was consumed.

Note that pv_shim_offline_memory() does not have such an issue.

Fixes: b2245acc60c3 ("xen/pvshim: memory hotplug")
Signed-off-by: Igor Druzhinin <igor.druzhinin@xxxxxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/arch/x86/pv/shim.c
+++ b/xen/arch/x86/pv/shim.c
@@ -944,6 +944,9 @@ void pv_shim_online_memory(unsigned int
     struct page_info *page, *tmp;
     PAGE_LIST_HEAD(list);
 
+    if ( !nr )
+        return;
+
     spin_lock(&balloon_lock);
     page_list_for_each_safe ( page, tmp, &balloon )
     {




 


Rackspace

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