mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 12:09:58 +00:00
88c725c78e
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>
55 lines
1.5 KiB
C
55 lines
1.5 KiB
C
/*
|
|
* PCI stubs for platforms that don't support pci bus.
|
|
*
|
|
* Copyright (c) 2010 Isaku Yamahata <yamahata at valinux co jp>
|
|
* VA Linux Systems Japan K.K.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#include "qemu/osdep.h"
|
|
#include "sysemu/sysemu.h"
|
|
#include "monitor/monitor.h"
|
|
#include "qapi/qmp/qerror.h"
|
|
#include "hw/pci/pci.h"
|
|
#include "qmp-commands.h"
|
|
#include "hw/pci/msi.h"
|
|
|
|
bool msi_nonbroken;
|
|
bool pci_available;
|
|
|
|
PciInfoList *qmp_query_pci(Error **errp)
|
|
{
|
|
error_setg(errp, QERR_UNSUPPORTED);
|
|
return NULL;
|
|
}
|
|
|
|
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;
|
|
}
|