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

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


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jiqian Chen <Jiqian.Chen@xxxxxxx>
  • Date: Fri, 12 Jan 2024 14:13:15 +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=QdiTH6i1r8SUyWtxRAbifltVDLUobikXsc/LwaGqRtA=; b=Qm5TDkFVsawzxNgwfR35mZNaLLRaH54LWSqiR5CvwC5w7Cqt4dsSyUYphT1GJHxUB7wxvBcXGJ7S5+MvdhzsDe66nMjAhKY3qi1/poQmwc0lMhDezJdFyXMXJx6PNqnwXP5FyXnf0QvtoByvG/nngHQfppMvrq8yLIig+Lnw68DZ3hhlqnsdb+OALxAqWc+PjxzP3vYBMUk815tx1bt2mi7gZTN5NDVOXiu69KJGAelK1WpDeON8Md6n28VPgr/VL0LV2vJXSJvoUEUJiT6jtOU1i0+Qn2khZa8T7oN7AnGkxEVm38+x9eI/zzIbdWAVv91AbwF6ddoWJjh/i2Lrfg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N0VsFMxWNGHW+cNTDprSeMNEDXJZvXLGx5MZJRFTHz2IBvk6u/YK1VE63OnexPC8e87TGNDrD7PH1GRSAu5UPxqq+jVN82dTdOpd6MzqqPJsTHd18hDgP+SGc/tJCQCUkT/2GFgpcSzjjBetd4q85AdiOhZDIQUoOnkrfiuNvs7tgvCbDORB3V6mTLEK6GkqOF3V86Vx4iD8JdN8i9hZsoTHUAdysiBgVEulB3GSMU3fS+p5DNPn/lWSEJ+At6DIY4kgNnX0Y7ne9fj1iDEDsdV648VjrcacoyFfzG8r2LNiyRa0t2QzRgvwbzlTjJis3jq+rIEn4NJND4+SD3fJ3g==
  • 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: Fri, 12 Jan 2024 06:15:20 +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.

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

diff --git a/xen/arch/x86/hvm/hypercall.c b/xen/arch/x86/hvm/hypercall.c
index 493998b42ec5..46f51ee459f6 100644
--- a/xen/arch/x86/hvm/hypercall.c
+++ b/xen/arch/x86/hvm/hypercall.c
@@ -76,6 +76,12 @@ 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;
+        ASSERT(!has_pirq(currd));
+        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®.