mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
pci: Add pci_device_route_intx_to_irq
Device assigned on KVM needs to know the mode (enabled/inverted/disabled) and the IRQ number that a given device triggers in the attached interrupt controller. Add a PCI IRQ path discovery function that walks from a given device to the host bridge, and gets this information. For this purpose, a host bridge callback function is introduced: route_intx_to_irq. It is so far only implemented by the PIIX3, other host bridges can be added later on as required. Will be used for KVM PCI device assignment and VFIO. Based on patch by Jan Kiszka, with minor tweaks. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
7cf1b0fd95
commit
3afa9bb488
4 changed files with 51 additions and 0 deletions
|
@ -19,6 +19,7 @@ struct PCIBus {
|
|||
uint8_t devfn_min;
|
||||
pci_set_irq_fn set_irq;
|
||||
pci_map_irq_fn map_irq;
|
||||
pci_route_irq_fn route_intx_to_irq;
|
||||
pci_hotplug_fn hotplug;
|
||||
DeviceState *hotplug_qdev;
|
||||
void *irq_opaque;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue