mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
vfio-user: handle device interrupts
Forward remote device's interrupts to the guest Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com> Signed-off-by: John G Johnson <john.g.johnson@oracle.com> Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Message-id: 9523479eaafe050677f4de2af5dd0df18c27cfd9.1655151679.git.jag.raman@oracle.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
3123f93d6b
commit
08cf3dc611
13 changed files with 298 additions and 12 deletions
13
hw/pci/pci.c
13
hw/pci/pci.c
|
@ -317,6 +317,15 @@ void pci_device_deassert_intx(PCIDevice *dev)
|
|||
}
|
||||
}
|
||||
|
||||
static void pci_msi_trigger(PCIDevice *dev, MSIMessage msg)
|
||||
{
|
||||
MemTxAttrs attrs = {};
|
||||
|
||||
attrs.requester_id = pci_requester_id(dev);
|
||||
address_space_stl_le(&dev->bus_master_as, msg.address, msg.data,
|
||||
attrs, NULL);
|
||||
}
|
||||
|
||||
static void pci_reset_regions(PCIDevice *dev)
|
||||
{
|
||||
int r;
|
||||
|
@ -1212,6 +1221,8 @@ static void pci_qdev_unrealize(DeviceState *dev)
|
|||
|
||||
pci_device_deassert_intx(pci_dev);
|
||||
do_pci_unregister_device(pci_dev);
|
||||
|
||||
pci_dev->msi_trigger = NULL;
|
||||
}
|
||||
|
||||
void pci_register_bar(PCIDevice *pci_dev, int region_num,
|
||||
|
@ -2251,6 +2262,8 @@ static void pci_qdev_realize(DeviceState *qdev, Error **errp)
|
|||
}
|
||||
|
||||
pci_set_power(pci_dev, true);
|
||||
|
||||
pci_dev->msi_trigger = pci_msi_trigger;
|
||||
}
|
||||
|
||||
PCIDevice *pci_new_multifunction(int devfn, bool multifunction,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue