aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/pci-host/gpex.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/pci-host/gpex.c b/hw/pci-host/gpex.c
index 83084b9aab..41a884da3f 100644
--- a/hw/pci-host/gpex.c
+++ b/hw/pci-host/gpex.c
@@ -43,6 +43,16 @@ static void gpex_set_irq(void *opaque, int irq_num, int level)
qemu_set_irq(s->irq[irq_num], level);
}
+int gpex_set_irq_num(GPEXHost *s, int index, int gsi)
+{
+ if (index >= GPEX_NUM_IRQS) {
+ return -EINVAL;
+ }
+
+ s->irq_num[index] = gsi;
+ return 0;
+}
+
static void gpex_host_realize(DeviceState *dev, Error **errp)
{
PCIHostState *pci = PCI_HOST_BRIDGE(dev);