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:19:49 +04:00
|
|
|
#include "monitor/monitor.h"
|
2022-12-01 15:11:25 +03:00
|
|
|
#include "monitor/hmp.h"
|
2020-09-13 22:53:48 +03:00
|
|
|
#include "qapi/qapi-commands-pci.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
|
|
|
{
|
2011-10-21 20:15:33 +04:00
|
|
|
return NULL;
|
2010-12-22 13:54:48 +03:00
|
|
|
}
|
|
|
|
|
2022-12-01 15:11:25 +03:00
|
|
|
void hmp_info_pci(Monitor *mon, const QDict *qdict)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
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();
|
|
|
|
}
|