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

[PATCH 08/19] xen/arm: Add rcu_barrier() before enabling non-boot CPUs on resume


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>
  • Date: Fri, 7 Oct 2022 10:32:48 +0000
  • Accept-language: en-US
  • 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=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=OuYmDBIoJgpH/JRiy2BHsIcRVjjzqDnzn/1O+5H48U0=; b=OSNDEGUQVPz1HG4nEXlGTSRs3xXX4fvL50TcYrBNTprUjNpt31kf0xP9E6yS5TIQzkWu/KMyiYF5HogrE42AViDmsRXGfaOf93i9c3AS9cAe4ZJeJDsC7r//Y9QemIpccrqBqBo4TTf8pdRmUFJgPn3fB4+uwx7Z5jjM5/MF3CBiM+uiocWilko76DGJGd10wvComcO3uO5k0yWt4hU8ixrFTmm6jffDoGRlMg2Ajvh+9TB2+j6QLqNDEfxzvFUXOS0aFP47/EF8me/eoQ9Jzdp9rsS6Qa8ufZHIwFhzahCUDNnDQkSodo2exuLefRSiWVeKGljxjCsDlTMYSC96Xg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GFdeaqti3itEfcRNOl6e2Xxcxqwn8DhavTcQNLU9ztKarmPjEg1Yk9mGfwjPN7/Zi5Ft3MvizZuQH2f5Kq+F/P30yUQz39Yftr53LoMVPnkE4toYmctHqdM8y2uX2A/WuWHnGS3COD/K4pjuZ1YL8J1kDGVW1k+H+Uyt2QFc7y+eCN91Nko7h+YzOvk8BEV0DbORoJ2tqd2M7j9eaeP8d5NwDG0EqFovC5+XW8S0fqdI3Gr9gWAak8u8vjSeEpuD2j9jI+Hpr6VdQMmrt7HGnuhoqwiAxFdiJYFDGL5zCoABSlkU0ZDWQM0aUaAfDxNUhs8xIdvBpQfH8EFx8XA7sw==
  • Cc: Mirela Simonovic <mirela.simonovic@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Saeed Nowshadi <saeed.nowshadi@xxxxxxxxxx>
  • Delivery-date: Fri, 07 Oct 2022 10:33:05 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHY2jglpD72HLvPXkazM/pUUGVcBQ==
  • Thread-topic: [PATCH 08/19] xen/arm: Add rcu_barrier() before enabling non-boot CPUs on resume

From: Mirela Simonovic <mirela.simonovic@xxxxxxxxxx>

The rcu_barrier() has to be added to ensure that the per cpu area is
freed before a non-boot CPU tries to initialize it (_free_percpu_area()
has to be called before the init_percpu_area()). This scenario occurs
when non-boot CPUs are hot-unplugged on suspend and hotplugged on resume.

Signed-off-by: Mirela Simonovic <mirela.simonovic@xxxxxxxxxx>
Signed-off-by: Saeed Nowshadi <saeed.nowshadi@xxxxxxxxxx>
---
 xen/arch/arm/suspend.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/arch/arm/suspend.c b/xen/arch/arm/suspend.c
index 0784979e4f..0c16cfc750 100644
--- a/xen/arch/arm/suspend.c
+++ b/xen/arch/arm/suspend.c
@@ -153,6 +153,7 @@ static long system_suspend(void *data)
     system_state = SYS_STATE_resume;
 
 resume_nonboot_cpus:
+    rcu_barrier();
     enable_nonboot_cpus();
     thaw_domains();
     system_state = SYS_STATE_active;
-- 
2.37.1



 


Rackspace

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