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

[RFC XEN PATCH 6/6] tools/libs/light: pci: translate irq to gsi


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "Anthony PERARD" <anthony.perard@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Huang Rui <ray.huang@xxxxxxx>
  • Date: Sun, 12 Mar 2023 15:54:55 +0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=citrix.com 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
  • 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=VvCxL42WhJeLNFutCnPoClf571Zr2l7PD0WD0zKoqR4=; b=DbuNGNdmxAVLa5dBFenuNGRSMQuq8VF0W6LFYCNlrR0TL4var87e/XioH5grLMf/V/mNfRhQ8NT/Bnqt3k4BbzvxxRYel7caM1dhV765hqpXtLSKGV3B1X4uDrNI73dkLTaI4fKc9tmrRuMZ6RMd2NPjhsnTmtBi83HrK+ApmsjTaHLd+5Tu7jOo0EZcWy4cOXUJoi1W31Or1ix3BeDunRaIcmlsaU3UidJZLaleeZFiIaCZ8AzC/gF6nOO2zxpqFl1c4ADcnTjQWsV6i7qXbX4KlxgBjZmD2YEiJq0Dpny2k9oKfNl0K7euZg4RMLRvAPXnAIGx1Ee20Ne73zKhww==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k6od8Ui+8rvQqhsi13zA+X91t8sSne8C6Xqcl5Vi8Ac8Irm6fqaj+YavusP0Q5BF3DfFjRtKaISMJZ72SSre89AwzksVmfitwZRWaCxBO8Cc8sT+fchU0mKxhKxrQEXqmzznLLo5L4ATGQ/Weda8QPVqwiporZTqArpXETcptUdG9i5O09F2d9PYBhruRMo7ZDaD7Xsacxjbq1Kj6U6YWYN4lqCt8214NoANu16TScELTJgdx/dJoaMX55RrYUUjLh7pY6rqlg+2LcQ/scNhYZGcRHSS3bPjmGTjCyG1FArYd7tmfut+qT+n4ecKtJYPYtc1p/2LGinZOlne7EXEIQ==
  • Cc: Alex Deucher <alexander.deucher@xxxxxxx>, Christian König <christian.koenig@xxxxxxx>, "Stewart Hildebrand" <Stewart.Hildebrand@xxxxxxx>, Xenia Ragiadakou <burzalodowa@xxxxxxxxx>, Honglei Huang <honglei1.huang@xxxxxxx>, Julia Zhang <julia.zhang@xxxxxxx>, Chen Jiqian <Jiqian.Chen@xxxxxxx>, Huang Rui <ray.huang@xxxxxxx>
  • Delivery-date: Sun, 12 Mar 2023 07:55:50 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

From: Chen Jiqian <Jiqian.Chen@xxxxxxx>

Use new xc_physdev_gsi_from_irq to get the GSI number

Signed-off-by: Chen Jiqian <Jiqian.Chen@xxxxxxx>
Signed-off-by: Huang Rui <ray.huang@xxxxxxx>
---
 tools/libs/light/libxl_pci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/libs/light/libxl_pci.c b/tools/libs/light/libxl_pci.c
index f4c4f17545..47cf2799bf 100644
--- a/tools/libs/light/libxl_pci.c
+++ b/tools/libs/light/libxl_pci.c
@@ -1486,6 +1486,7 @@ static void pci_add_dm_done(libxl__egc *egc,
         goto out_no_irq;
     }
     if ((fscanf(f, "%u", &irq) == 1) && irq) {
+        irq = xc_physdev_gsi_from_irq(ctx->xch, irq);
         r = xc_physdev_map_pirq(ctx->xch, domid, irq, &irq);
         if (r < 0) {
             LOGED(ERROR, domainid, "xc_physdev_map_pirq irq=%d (error=%d)",
-- 
2.25.1




 


Rackspace

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