xref: /qemu/hw/pci/pci-stub.c (revision c2c139749733545516ffff0b54f949bb3343711f)
1b3a29fd5SIsaku Yamahata /*
211d6ddedSAlon Levy  * PCI stubs for platforms that don't support pci bus.
3b3a29fd5SIsaku Yamahata  *
4b3a29fd5SIsaku Yamahata  * Copyright (c) 2010 Isaku Yamahata <yamahata at valinux co jp>
5b3a29fd5SIsaku Yamahata  *                    VA Linux Systems Japan K.K.
6b3a29fd5SIsaku Yamahata  *
7b3a29fd5SIsaku Yamahata  * This program is free software; you can redistribute it and/or modify
8b3a29fd5SIsaku Yamahata  * it under the terms of the GNU General Public License as published by
9b3a29fd5SIsaku Yamahata  * the Free Software Foundation; either version 2 of the License, or
10b3a29fd5SIsaku Yamahata  * (at your option) any later version.
11b3a29fd5SIsaku Yamahata  *
12b3a29fd5SIsaku Yamahata  * This program is distributed in the hope that it will be useful,
13b3a29fd5SIsaku Yamahata  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14b3a29fd5SIsaku Yamahata  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15b3a29fd5SIsaku Yamahata  * GNU General Public License for more details.
16b3a29fd5SIsaku Yamahata  *
17b3a29fd5SIsaku Yamahata  * You should have received a copy of the GNU General Public License along
18b3a29fd5SIsaku Yamahata  * with this program; if not, see <http://www.gnu.org/licenses/>.
19b3a29fd5SIsaku Yamahata  */
20b3a29fd5SIsaku Yamahata 
2197d5408fSPeter Maydell #include "qemu/osdep.h"
229c17d615SPaolo Bonzini #include "sysemu/sysemu.h"
2383c9089eSPaolo Bonzini #include "monitor/monitor.h"
24*c2c13974SMarkus Armbruster #include "monitor/hmp.h"
2561c7f987SPhilippe Mathieu-Daudé #include "qapi/qapi-commands-pci.h"
26c759b24fSMichael S. Tsirkin #include "hw/pci/pci.h"
2766767562SPhilippe Mathieu-Daudé #include "hw/pci/msi.h"
28ec5ce147SPaolo Bonzini #include "hw/pci/msix.h"
2966767562SPhilippe Mathieu-Daudé 
3066767562SPhilippe Mathieu-Daudé bool msi_nonbroken;
3188c725c7SCornelia Huck bool pci_available;
3279627472SLuiz Capitulino 
3379627472SLuiz Capitulino PciInfoList *qmp_query_pci(Error **errp)
3479627472SLuiz Capitulino {
3579627472SLuiz Capitulino     return NULL;
3679627472SLuiz Capitulino }
37b3a29fd5SIsaku Yamahata 
38*c2c13974SMarkus Armbruster void hmp_info_pci(Monitor *mon, const QDict *qdict)
39*c2c13974SMarkus Armbruster {
40*c2c13974SMarkus Armbruster }
41*c2c13974SMarkus Armbruster 
4204e00c92SMarkus Armbruster void hmp_pcie_aer_inject_error(Monitor *mon, const QDict *qdict)
43b3a29fd5SIsaku Yamahata {
44b3a29fd5SIsaku Yamahata     monitor_printf(mon, "PCI devices not supported\n");
45b3a29fd5SIsaku Yamahata }
4688c725c7SCornelia Huck 
4788c725c7SCornelia Huck /* kvm-all wants this */
4888c725c7SCornelia Huck MSIMessage pci_get_msi_message(PCIDevice *dev, int vector)
4988c725c7SCornelia Huck {
5088c725c7SCornelia Huck     g_assert(false);
5188c725c7SCornelia Huck     return (MSIMessage){};
5288c725c7SCornelia Huck }
5388c725c7SCornelia Huck 
5488c725c7SCornelia Huck uint16_t pci_requester_id(PCIDevice *dev)
5588c725c7SCornelia Huck {
5688c725c7SCornelia Huck     g_assert(false);
5788c725c7SCornelia Huck     return 0;
5888c725c7SCornelia Huck }
59d9e36515SThomas Huth 
60d9e36515SThomas Huth /* Required by ahci.c */
61d9e36515SThomas Huth bool msi_enabled(const PCIDevice *dev)
62d9e36515SThomas Huth {
63d9e36515SThomas Huth     return false;
64d9e36515SThomas Huth }
65d9e36515SThomas Huth 
66d9e36515SThomas Huth void msi_notify(PCIDevice *dev, unsigned int vector)
67d9e36515SThomas Huth {
68d9e36515SThomas Huth     g_assert_not_reached();
69d9e36515SThomas Huth }
70ec5ce147SPaolo Bonzini 
71ec5ce147SPaolo Bonzini /* Required by target/i386/kvm.c */
72ec5ce147SPaolo Bonzini bool msi_is_masked(const PCIDevice *dev, unsigned vector)
73ec5ce147SPaolo Bonzini {
74ec5ce147SPaolo Bonzini     g_assert_not_reached();
75ec5ce147SPaolo Bonzini }
76ec5ce147SPaolo Bonzini 
77ec5ce147SPaolo Bonzini MSIMessage msi_get_message(PCIDevice *dev, unsigned int vector)
78ec5ce147SPaolo Bonzini {
79ec5ce147SPaolo Bonzini     g_assert_not_reached();
80ec5ce147SPaolo Bonzini }
81ec5ce147SPaolo Bonzini 
82ec5ce147SPaolo Bonzini int msix_enabled(PCIDevice *dev)
83ec5ce147SPaolo Bonzini {
84ec5ce147SPaolo Bonzini     return false;
85ec5ce147SPaolo Bonzini }
86ec5ce147SPaolo Bonzini 
87ec5ce147SPaolo Bonzini bool msix_is_masked(PCIDevice *dev, unsigned vector)
88ec5ce147SPaolo Bonzini {
89ec5ce147SPaolo Bonzini     g_assert_not_reached();
90ec5ce147SPaolo Bonzini }
91ec5ce147SPaolo Bonzini 
92ec5ce147SPaolo Bonzini MSIMessage msix_get_message(PCIDevice *dev, unsigned int vector)
93ec5ce147SPaolo Bonzini {
94ec5ce147SPaolo Bonzini     g_assert_not_reached();
95ec5ce147SPaolo Bonzini }
96