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

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


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jiqian Chen <Jiqian.Chen@xxxxxxx>
  • Date: Fri, 5 Jan 2024 15:09:18 +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=OmRlmS0ceKu4lnk3o9j1hrAbxc9dIx9eF+B0pjAKXWo=; b=VYnTDX+t8pHDViXX3/gxOpVYMMaCULWa8vfADn3jhZ+jnihCg9xasSU/ftjq8B8pYnJKt+DYfPQn632f+gpx4hWx5NK0hqJ/oR59rDkJbQMXSkwqT715KHMY67WH37gTW3H0VcVgvA6eJsym+vMqtYDYm0f30v5iK9ALwE0ULokdieLPHvYqs3+7XJSTBUIQTDRSZYyiCd9s2oTibnDZsN/73RQ1KFxroNb1qPqGtpYkd0DviGVTvqAcSSEeT97ILRVJcemYSFnVj+7ztXwjIEQtRwUpUlia7ZkiQsZYdxfGeyeQ5oO3dqO4gilGtgIXapHyFGe9k9SmqfpTgyUk/w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cWNNWv8hN34QhIJMkKPtzV0FPc7MvzmLSMCmy9gPv+Nxjj/xFJKoVIkdm1HOp+TQpHp1srsmu7wUZPQK0vgbAG/hjEnjt8xnWjyPe0xema9kAtjRyjtOtCZqZXNn4Ro076uZnlJMZxUVZ5mzl+NDNKb0YEKpwOsONjjc60fEPrh/K79hvyUcLZZS1Ud813WuHdqy+sCpSrriXhwi49l4IxfHDc21DeseuraMYJwbMUXjWw3bNmqjUXam7mxNGZHYa//QFri4nnnHs2SK1bvrL4lhJr3LLMZ90DywXbtncgvPfju40mcS+ZzuCqEE1b7dv9qlG06bCPJLu+ZA92Ul+Q==
  • 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>, Stewart Hildebrand <Stewart.Hildebrand@xxxxxxx>, Huang Rui <Ray.Huang@xxxxxxx>, Jiqian Chen <Jiqian.Chen@xxxxxxx>, Huang Rui <ray.huang@xxxxxxx>
  • Delivery-date: Fri, 05 Jan 2024 07:10:06 +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 632a68be3cc4..e27d3ca15185 100644
--- a/xen/arch/x86/hvm/hypercall.c
+++ b/xen/arch/x86/hvm/hypercall.c
@@ -97,6 +97,12 @@ long hvm_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) 
arg)
         break;
     }
 
+    case PHYSDEVOP_setup_gsi:
+        if ( is_hardware_domain(currd) && !has_pirq(currd) )
+            break;
+        else
+            return -ENOSYS;
+
     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®.