2010-12-22 13:54:48 +03:00
|
|
|
/*
|
2011-08-26 23:06:01 +04:00
|
|
|
* PCI stubs for platforms that don't support pci bus.
|
2010-12-22 13:54:48 +03: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 21:17:15 +03:00
|
|
|
#include "qemu/osdep.h"
|
2012-12-17 21:20:04 +04:00
|
|
|
#include "sysemu/sysemu.h"
|
2012-12-17 21:19:49 +04:00
|
|
|
#include "monitor/monitor.h"
|
2018-02-01 14:18:31 +03:00
|
|
|
#include "qapi/error.h"
|
2018-02-27 02:13:27 +03:00
|
|
|
#include "qapi/qapi-commands-misc.h"
|
2015-03-17 19:22:46 +03:00
|
|
|
#include "qapi/qmp/qerror.h"
|
2012-12-13 01:05:42 +04:00
|
|
|
#include "hw/pci/pci.h"
|
2017-06-09 18:06:21 +03:00
|
|
|
#include "hw/pci/msi.h"
|
2019-12-12 16:20:05 +03:00
|
|
|
#include "hw/pci/msix.h"
|
2017-06-09 18:06:21 +03:00
|
|
|
|
|
|
|
bool msi_nonbroken;
|
2017-07-07 12:45:26 +03:00
|
|
|
bool pci_available;
|
2010-12-22 13:54:48 +03:00
|
|
|
|
2011-10-21 20:15:33 +04:00
|
|
|
PciInfoList *qmp_query_pci(Error **errp)
|
2010-12-22 13:54:48 +03:00
|
|
|
{
|
2015-03-17 13:54:50 +03:00
|
|
|
error_setg(errp, QERR_UNSUPPORTED);
|
2011-10-21 20:15:33 +04:00
|
|
|
return NULL;
|
2010-12-22 13:54:48 +03:00
|
|
|
}
|
|
|
|
|
2015-03-05 19:48:49 +03:00
|
|
|
void hmp_pcie_aer_inject_error(Monitor *mon, const QDict *qdict)
|
2010-12-22 13:54:48 +03:00
|
|
|
{
|
2011-10-21 20:15:33 +04:00
|
|
|
monitor_printf(mon, "PCI devices not supported\n");
|
2010-12-22 13:54:48 +03:00
|
|
|
}
|
2017-07-07 12:45:26 +03: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 19:00:10 +03: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 16:20:05 +03: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();
|
|
|
|
}
|