diff options
author | Cornelia Huck <cohuck@redhat.com> | 2017-07-07 11:45:26 +0200 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2017-08-30 18:23:25 +0200 |
commit | 88c725c78e87eecb061f882177c7a6a2ac1059ad (patch) | |
tree | e5076aa2e2219460f4a6ca9b0a4cda8f345fe32e /hw/pci | |
parent | 5f8c92e1d50d3629116497dd0a446e8cb28af7f8 (diff) | |
download | qemu-88c725c78e87eecb061f882177c7a6a2ac1059ad.zip qemu-88c725c78e87eecb061f882177c7a6a2ac1059ad.tar.gz qemu-88c725c78e87eecb061f882177c7a6a2ac1059ad.tar.bz2 |
kvm: remove hard dependency on pci
The msi routing code in kvm calls some pci functions: provide
some stubs to enable builds without pci.
Also, to make this more obvious, guard them via a pci_available boolean
(which also can be reused in other places).
Fixes: e1d4fb2de ("kvm-irqchip: x86: add msi route notify fn")
Fixes: 767a554a0 ("kvm-all: Pass requester ID to MSI routing functions")
Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'hw/pci')
-rw-r--r-- | hw/pci/pci-stub.c | 14 | ||||
-rw-r--r-- | hw/pci/pci.c | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/hw/pci/pci-stub.c b/hw/pci/pci-stub.c index ecad664..d5ce007 100644 --- a/hw/pci/pci-stub.c +++ b/hw/pci/pci-stub.c @@ -27,6 +27,7 @@ #include "hw/pci/msi.h" bool msi_nonbroken; +bool pci_available; PciInfoList *qmp_query_pci(Error **errp) { @@ -38,3 +39,16 @@ void hmp_pcie_aer_inject_error(Monitor *mon, const QDict *qdict) { monitor_printf(mon, "PCI devices not supported\n"); } + +/* kvm-all wants this */ +MSIMessage pci_get_msi_message(PCIDevice *dev, int vector) +{ + g_assert(false); + return (MSIMessage){}; +} + +uint16_t pci_requester_id(PCIDevice *dev) +{ + g_assert(false); + return 0; +} diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 258fbe5..26f346d 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -49,6 +49,8 @@ # define PCI_DPRINTF(format, ...) do { } while (0) #endif +bool pci_available = true; + static void pcibus_dev_print(Monitor *mon, DeviceState *dev, int indent); static char *pcibus_get_dev_path(DeviceState *dev); static char *pcibus_get_fw_dev_path(DeviceState *dev); |