diff mbox series

[RFC,QEMU,18/18] xen: translate irq of host pci device to gsi

Message ID 20230312092244.451465-19-ray.huang@amd.com (mailing list archive)
State New, archived
Headers show
Series Add VirtIO GPU and Passthrough GPU support on Xen | expand

Commit Message

Huang Rui March 12, 2023, 9:22 a.m. UTC
From: Chen Jiqian <Jiqian.Chen@amd.com>

Use the new interface in the kernel to map pirq for qemu.

Signed-off-by: Chen Jiqian <Jiqian.Chen@amd.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
---
 hw/xen/xen-host-pci-device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/hw/xen/xen-host-pci-device.c b/hw/xen/xen-host-pci-device.c
index 8c6e9a1716..6ca841a967 100644
--- a/hw/xen/xen-host-pci-device.c
+++ b/hw/xen/xen-host-pci-device.c
@@ -9,6 +9,7 @@ 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu/cutils.h"
+#include "hw/xen/xen_common.h"
 #include "xen-host-pci-device.h"
 
 #define XEN_HOST_PCI_MAX_EXT_CAP \
@@ -368,7 +369,7 @@  void xen_host_pci_device_get(XenHostPCIDevice *d, uint16_t domain,
     if (*errp) {
         goto error;
     }
-    d->irq = v;
+    d->irq = xc_physdev_gsi_from_irq(xen_xc, v);
 
     xen_host_pci_get_hex_value(d, "class", &v, errp);
     if (*errp) {