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

[PATCH 02/15] xen/arm/gic: Enable interrupt assignment to running VM


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <xin.wang2@xxxxxxx>
  • Date: Wed, 24 Apr 2024 11:34:36 +0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=mRz8rsYNOg7W8p6WCOVFtK/rtd0GqejAmZ7U+c2Atjk=; b=VwBwgNovkKBfqeElHufhdZxuS3xablGa4lsGyQHKMOh3n9T6rjlChgX23rXQqOu1GOzyHakJ2uJZYmxCYr6tGe+jo/Yfw6exJjQI7x0kXOsJqnUF3xPFnjFV4u3SGwBdu0svzFqpc5sHG3qllg1mkjorbdrA5VS4hHP5AwTBiupS1nBJf1Mjqe35MNf9+hDkdg9J9Efc3Ue4ECU4CbUuXUUHuXI9Li8Wf5uw5B2XlJJ4EdQEV3QDvbmSZSX5TLC7t/51vbxWeex1QG70WSUY9f4hOGFArmtWlvQnMLobrqt109OLpbF2yFinFWaNRl6z9coGfpr9DyFgaG1TUvfjcQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JoPK4Jtfc5aTxJoZP3cA2KnDZXMZ16X2SN3dByJU4IAZJ3gu1npJCvlcgX9LFBfK335WhG/nSdR/xdSdcm5tESkD4i0Wqx7nqmmQBiIwA5dkoJzr6Ro5OmGoWNWcfNAHYK7AtuW6eGzg/XBWSDkdh6CRgK719ff1LbW9TXBzthSKHS5UXT3k56WEF7xnbDnOaMqmo8JEmCrYvm4LZ6oxQpqhekh24uHXsfnxgmG47cjQxttBu+yG7lRjoh6oFPJPGYoopKVzboHY24RBE3oYd7KQELiPqYWddga2Yr2o38iDSVS6Ce8rF8P+cw61PLehWjO7nqw1DrmC1wiJiPUzOQ==
  • Cc: Vikram Garhwal <fnu.vikram@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>, Henry Wang <xin.wang2@xxxxxxx>
  • Delivery-date: Wed, 24 Apr 2024 03:35:12 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

From: Vikram Garhwal <fnu.vikram@xxxxxxxxxx>

Enable interrupt assign/remove for running VMs in CONFIG_OVERLAY_DTB.

Currently, irq_route and mapping is only allowed at the domain creation. Adding
exception for CONFIG_OVERLAY_DTB.

Signed-off-by: Vikram Garhwal <fnu.vikram@xxxxxxxxxx>
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
Signed-off-by: Henry Wang <xin.wang2@xxxxxxx>
---
 xen/arch/arm/gic.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index 44c40e86de..a775f886ed 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -140,8 +140,10 @@ int gic_route_irq_to_guest(struct domain *d, unsigned int 
virq,
      * back to the physical IRQ. To prevent get unsync, restrict the
      * routing to when the Domain is been created.
      */
+#ifndef CONFIG_OVERLAY_DTB
     if ( d->creation_finished )
         return -EBUSY;
+#endif
 
     ret = vgic_connect_hw_irq(d, NULL, virq, desc, true);
     if ( ret )
@@ -171,8 +173,10 @@ int gic_remove_irq_from_guest(struct domain *d, unsigned 
int virq,
      * Removing an interrupt while the domain is running may have
      * undesirable effect on the vGIC emulation.
      */
+#ifndef CONFIG_OVERLAY_DTB
     if ( !d->is_dying )
         return -EBUSY;
+#endif
 
     desc->handler->shutdown(desc);
 
-- 
2.34.1




 


Rackspace

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