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

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


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jiqian Chen <Jiqian.Chen@xxxxxxx>
  • Date: Fri, 19 Apr 2024 11:53:38 +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=cppfuA3qPefeFbRlxjFzL7F92H5/rzEberk3T4m9jZg=; b=fpFEUKq8FBX2rq/0BUyjXDTyt7IYl2a6+4fzGhCNG17Yew2jkyZLIX3xyYQXYM1b4ct41t4tYW4ykkY8jsfk/py74T2LdwhZmHnD5ZB+gbBS1uHjMG1lEmfwn6nCdTdrsQ7YJPhSf3JM1vA6AwqHjvCtPE7/AdYAWUly3pibviazhNCLcNzt5fMDrM0rqserR1L0elVZUT/WQ9rrMldcnVWz2NtsJSeVZNVfvfwmQdPl3suemY8pmsfE080YEVlnpDxB2aMz/s4Zh8NAdPw5ielLu64Xmd5/Rh9i9fv0GQKHSUbZkzbfbjPMD3bVh/m6qTwW45WKeZh01qnSWIy28A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ncl4CsZ+fl/HWOKsSp7YSU9XocqxKQeoOYdugeZrnJgRqHXv6/v8ApNIbCCuRE5kDS+Zj2ZRpPUDA8lqeaxWBiQMa6/BnAWsPzwGAuXtO2CFGR8A+tWEdLAnb0okeRWVRscaTzCON9k2lor8x5SP6TdOSJlng0xztbMpKyxGq5/1TnqbleXQvPzyDYhtPMxAJkccwXMG+KvswFSCFM1jQHZ3h44ovmQFID7XyOlzgB9D+AUuzy2SusGPFCnw5Z1Nwo/TfS451DLv9YHn+W4eY7ANAWJawtKALmhiFh4mh+3DqFS1/sM2iPGUzFD0mFJ4uZ7Bw6rmfQA3niS0LyIYrQ==
  • 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, 19 Apr 2024 03:54:38 +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 d49fb8b548a3..98e3c6b176ff 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®.