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

[RFC PATCH 06/10] arm: setup: disable preemption during startup


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Date: Tue, 23 Feb 2021 02:34:57 +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-SenderADCheck; bh=ZXx2B0ALYb183P5HVU3xyAVbUZAXMNspxc3XMEA+DN0=; b=MWpOqoNz4KU/wu/bP6KfsIS0TEsUSMSClO3p4gBuITAXlXsZw0YgreYE51mefXNtx/vrv+Ex/XywPqTCEJhXF6pe/LuMC6hz/peNpkFw7vIKTzelCCo0czVUbSn1Xzr14NZ4Q7HAqWmqlWYswaSvhnsfZ7lx6/GqLr9wugtdMUpwHLtD8JdmSdA9Hwt0QO3Lb6W0J64nKOpVVBhjzLwQk+9MH+ncBLdGLieDRUiOTflKLHwO+VemP7MQW8skIv+tdV7LH9YYY9tprp89M4P91UMu3d5uLBvya4A6PiRfL4EOM7tmOSQx/g1yC/uxPczmXc8AscFs00O1Q4s43L+zfw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LTYi1KQbJDEeKaNrH+9ZtzE8sQo9fUaORjGHgdOBdARb2sqabg1zjHLer1dQcSoG3XRHIKE78LuNikZfsJROfhzRpToPesYTfDXQFX+drh7OXUGViT09G5HFGQa18UhGQAc7FYvsGfj+NB58B9WdTyIuwYMj+XFRVhyrv6ICTz60AmZcfTDHqO/zdez3sCzNP2M+y5ODBO+JlYDIiMrZoIFTBoCPtMV2teHLn82l4a6bzumgFgBkbF0zqEGV7sASrNYQnUPLcu6wV7YwokkYY56x5g4n3NoVfh9vPbzc1i7FvjdiGxrYZRQdkIBOTdlfQr4iqOhKjexy/B5FL23Bfg==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=epam.com;
  • Cc: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 23 Feb 2021 02:35:23 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHXCYx5K2kzQwNs80ySE93i7jtdRg==
  • Thread-topic: [RFC PATCH 06/10] arm: setup: disable preemption during startup

In the subsequent patches we will enable preemption in the hypervisor
mode. But we don't want any preemption attempts while system is
still not ready to call scheduler. So we should disable preemption
during early boot stages and enable it only when we switched to idle
vCPU stack.

Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>
---
 xen/arch/arm/setup.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 2532ec9739..15a618b87c 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -78,6 +78,9 @@ static __used void init_done(void)
     unregister_init_virtual_region();
 
     free_init_memory();
+
+    preempt_enable();
+
     startup_cpu_idle_loop();
 }
 
@@ -920,6 +923,7 @@ void __init start_xen(unsigned long boot_phys_offset,
 
     setup_system_domains();
 
+    preempt_disable();
     local_irq_enable();
     local_abort_enable();
 
-- 
2.29.2



 


Rackspace

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