2010-12-22 11:54:48 +01:00
|
|
|
/*
|
2011-08-26 21:06:01 +02:00
|
|
|
* PCI stubs for platforms that don't support pci bus.
|
2010-12-22 11:54:48 +01:00
|
|
|
*
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2016-01-26 19:17:15 +01:00
|
|
|
#include "qemu/osdep.h"
|
2012-12-17 18:20:04 +01:00
|
|
|
#include "sysemu/sysemu.h"
|
2012-12-17 18:19:49 +01:00
|
|
|
#include "monitor/monitor.h"
|
2018-02-01 12:18:31 +01:00
|
|
|
#include "qapi/error.h"
|
2020-09-13 21:53:48 +02:00
|
|
|
#include "qapi/qapi-commands-pci.h"
|
2015-03-17 17:22:46 +01:00
|
|
|
#include "qapi/qmp/qerror.h"
|
2012-12-12 22:05:42 +01:00
|
|
|
#include "hw/pci/pci.h"
|
2017-06-09 17:06:21 +02:00
|
|
|
#include "hw/pci/msi.h"
|
2019-12-12 14:20:05 +01:00
|
|
|
#include "hw/pci/msix.h"
|
2017-06-09 17:06:21 +02:00
|
|
|
|
|
|
|
bool msi_nonbroken;
|
2017-07-07 11:45:26 +02:00
|
|
|
bool pci_available;
|
2010-12-22 11:54:48 +01:00
|
|
|
|
2011-10-21 18:15:33 +02:00
|
|
|
PciInfoList *qmp_query_pci(Error **errp)
|
2010-12-22 11:54:48 +01:00
|
|
|
{
|
2015-03-17 11:54:50 +01:00
|
|
|
error_setg(errp, QERR_UNSUPPORTED);
|
2011-10-21 18:15:33 +02:00
|
|
|
return NULL;
|
2010-12-22 11:54:48 +01:00
|
|
|
}
|
|
|
|
|
2015-03-05 17:48:49 +01:00
|
|
|
void hmp_pcie_aer_inject_error(Monitor *mon, const QDict *qdict)
|
2010-12-22 11:54:48 +01:00
|
|
|
{
|
2011-10-21 18:15:33 +02:00
|
|
|
monitor_printf(mon, "PCI devices not supported\n");
|
2010-12-22 11:54:48 +01:00
|
|
|
}
|
2017-07-07 11:45:26 +02:00
|
|
|
|
|
|
|
/* 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;
|
|
|
|
}
|
2019-02-19 17:00:10 +01:00
|
|
|
|
|
|
|
/* Required by ahci.c */
|
|
|
|
bool msi_enabled(const PCIDevice *dev)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
void msi_notify(PCIDevice *dev, unsigned int vector)
|
|
|
|
{
|
|
|
|
g_assert_not_reached();
|
|
|
|
}
|
2019-12-12 14:20:05 +01:00
|
|
|
|
|
|
|
/* Required by target/i386/kvm.c */
|
|
|
|
bool msi_is_masked(const PCIDevice *dev, unsigned vector)
|
|
|
|
{
|
|
|
|
g_assert_not_reached();
|
|
|
|
}
|
|
|
|
|
|
|
|
MSIMessage msi_get_message(PCIDevice *dev, unsigned int vector)
|
|
|
|
{
|
|
|
|
g_assert_not_reached();
|
|
|
|
}
|
|
|
|
|
|
|
|
int msix_enabled(PCIDevice *dev)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool msix_is_masked(PCIDevice *dev, unsigned vector)
|
|
|
|
{
|
|
|
|
g_assert_not_reached();
|
|
|
|
}
|
|
|
|
|
|
|
|
MSIMessage msix_get_message(PCIDevice *dev, unsigned int vector)
|
|
|
|
{
|
|
|
|
g_assert_not_reached();
|
|
|
|
}
|