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

[RFC XEN PATCH v6 3/5] x86/pvh: Add PHYSDEVOP_setup_gsi for PVH dom0


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jiqian Chen <Jiqian.Chen@xxxxxxx>
  • Date: Thu, 28 Mar 2024 14:34:00 +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=Be2hEGsTRGFzCRd5+cpODeHi2HnqaMir4kjvUmtAU34=; b=Ja3LQ4mG6J+ADzJ1/dZ3KQ3pmOxNBM5OjCVLdsRh83oKv5y6r6UmggAK+92a4rTu/PUD3jHWsdwTfaiZQBDAE7bHfD+nCr7hNgF9iz6bBsSQE6xUioaTYjNr1aLF5SS6mcn+K3G8GBilv6dF9D2SMXrkko1lJ0s5uQb8i3539fsAcrCEfBflvRrEo65dXZH7UkSwzyxy8Cj9R10BYANcverfoo1NdICAh+P+lvnmLN5HChhJxzGRkkXjKPWi4ZKux2lXp1CKv3X1hxJt1g4sTzRkZrQVEitWZ7e7LHnMbhhga5RLGX53l9ZopkS/5S3TtQ4I1gFIL3aJsv5IMrImNg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cRD5/CNo8tEudCDKDsIuQIcWFFaQUnVDVi/iXBdPM+NWzo65vVR57KqiFEzk9Cn+b+vSXOuoWjp0H/xw7BdWuRC1OMKeikZ8ffYTsl99a/iTCvJ/87vDIDF+E0gxSfhUfoeCjwWIyU27Vd1M9URAsJKf6JdXVP2yUd2yc5vP9ykJmbNS81mzSpw7IpbD+iyxY/M6CFsrE4YU9ZyaqXTeOMzaedAHDsrEPHXNIHC5zDz4UQZoExkfXYgRUJ1qOsP4R0XTMHx7r12FnCAEQakgp8zomuGE1uCUy/l7m+lhrxrSSeT2eKAJxskW9ehglO1Sg1KYnckKPWjDByG2aEDlcw==
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, "Juergen Gross" <jgross@xxxxxxxx>, "Daniel P . Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, Stewart Hildebrand <Stewart.Hildebrand@xxxxxxx>, Huang Rui <Ray.Huang@xxxxxxx>, Jiqian Chen <Jiqian.Chen@xxxxxxx>, Huang Rui <ray.huang@xxxxxxx>
  • Delivery-date: Thu, 28 Mar 2024 06:34:39 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On PVH dom0, the gsis don't get registered, but
the gsi of a passthrough device must be configured for it to
be able to be mapped into a hvm domU.
On Linux kernel side, it calles PHYSDEVOP_setup_gsi for
passthrough devices to register gsi when dom0 is PVH.
So, add PHYSDEVOP_setup_gsi for above purpose.

Signed-off-by: Huang Rui <ray.huang@xxxxxxx>
Signed-off-by: Jiqian Chen <Jiqian.Chen@xxxxxxx>
---
 xen/arch/x86/hvm/hypercall.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/xen/arch/x86/hvm/hypercall.c b/xen/arch/x86/hvm/hypercall.c
index 493998b42ec5..7d4e41f66885 100644
--- a/xen/arch/x86/hvm/hypercall.c
+++ b/xen/arch/x86/hvm/hypercall.c
@@ -76,6 +76,11 @@ long hvm_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) 
arg)
     case PHYSDEVOP_unmap_pirq:
         break;
 
+    case PHYSDEVOP_setup_gsi:
+        if ( !is_hardware_domain(currd) )
+            return -EOPNOTSUPP;
+        break;
+
     case PHYSDEVOP_eoi:
     case PHYSDEVOP_irq_status_query:
     case PHYSDEVOP_get_free_pirq:
-- 
2.34.1




 


Rackspace

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