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

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


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jiqian Chen <Jiqian.Chen@xxxxxxx>
  • Date: Fri, 7 Jun 2024 16:11:25 +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=qcD0xWxQTGxAvBu0zi4mdkVlNKBayZWA9asqiHxXLZ0=; b=NdDIdTi6WfnTckXMO/obfujg9++1F5704rj8CgtGKjf7gq435AD99/2jwvYPPUIafhFar+cIgiwDut6yZUIGCs/9tRearg65OaLw1f/lCWPoHVf4MVwGhRWUS/sBQvgMKKaxNz5NwBwHhuXQPURxI91TJbNmE1v/F+aFNAOh8rA+9pCerw44tv6Ohf19C9HSVoWgc3aoVChnbSwpE/kOHVMVjWBjzPj5Qk9Yij+fJe/Y1KBtknqtCCSVkKMXoZIMVB7qQMbwP0e7wyTLf6FdTVwNH8Rm0mRyBJkMBmbYZwN1Fz7/bcXh8Qm+JvWa8vX7iEn2q/bUCZzDL/mgaS1MHw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SQcdtiN7rUK6mSpewwdeSJlYpoNEXzHlbbXRQzb7XCGBZqLqg7GH6NBTmFa3nBImgVXizzx0mp33JqtbOY5TVEN9s7WVz+Lr/+Pq4o+EAegsGs8Zhw1zemYXpPeiwG7sOz7u+dHzwMqir0Yvvo7zIWpELE9jl9OhdLga5B6VF0N6r3yyE4rdaHRE3Gi3XvKXeZ+HvVRYxL0xXsayRpEzrNromD52LPuaRqbY/SZ1KV7n4UwW3bQ2LssBDoGojcKARrGiCnfizEZJdIlYXzW0D0SXrUXKx/LMSK3rYgkA2HFSAGAOQm1R6HESgzhcPHGqbG6FyO31Rerh3EFsRe4GPQ==
  • 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@xxxxxxxxxxxxxx>, "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: Fri, 07 Jun 2024 08:12:14 +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>
---
The code link that will call this hypercall on linux kernel side is as follows
https://lore.kernel.org/lkml/20240607075109.126277-3-Jiqian.Chen@xxxxxxx/T/#u
---
 xen/arch/x86/hvm/hypercall.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/arch/x86/hvm/hypercall.c b/xen/arch/x86/hvm/hypercall.c
index fa5d50a0dd22..164f4eefa043 100644
--- a/xen/arch/x86/hvm/hypercall.c
+++ b/xen/arch/x86/hvm/hypercall.c
@@ -86,6 +86,7 @@ long hvm_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
             return -ENOSYS;
         break;
 
+    case PHYSDEVOP_setup_gsi:
     case PHYSDEVOP_pci_mmcfg_reserved:
     case PHYSDEVOP_pci_device_add:
     case PHYSDEVOP_pci_device_remove:
-- 
2.34.1




 


Rackspace

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