1315a1350SMichael S. Tsirkin /* 2315a1350SMichael S. Tsirkin * PCI stubs for platforms that don't support pci bus. 3315a1350SMichael S. Tsirkin * 4315a1350SMichael S. Tsirkin * Copyright (c) 2010 Isaku Yamahata <yamahata at valinux co jp> 5315a1350SMichael S. Tsirkin * VA Linux Systems Japan K.K. 6315a1350SMichael S. Tsirkin * 7315a1350SMichael S. Tsirkin * This program is free software; you can redistribute it and/or modify 8315a1350SMichael S. Tsirkin * it under the terms of the GNU General Public License as published by 9315a1350SMichael S. Tsirkin * the Free Software Foundation; either version 2 of the License, or 10315a1350SMichael S. Tsirkin * (at your option) any later version. 11315a1350SMichael S. Tsirkin * 12315a1350SMichael S. Tsirkin * This program is distributed in the hope that it will be useful, 13315a1350SMichael S. Tsirkin * but WITHOUT ANY WARRANTY; without even the implied warranty of 14315a1350SMichael S. Tsirkin * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15315a1350SMichael S. Tsirkin * GNU General Public License for more details. 16315a1350SMichael S. Tsirkin * 17315a1350SMichael S. Tsirkin * You should have received a copy of the GNU General Public License along 18315a1350SMichael S. Tsirkin * with this program; if not, see <http://www.gnu.org/licenses/>. 19315a1350SMichael S. Tsirkin */ 20315a1350SMichael S. Tsirkin 2197d5408fSPeter Maydell #include "qemu/osdep.h" 229c17d615SPaolo Bonzini #include "sysemu/sysemu.h" 2383c9089eSPaolo Bonzini #include "monitor/monitor.h" 24e688df6bSMarkus Armbruster #include "qapi/error.h" 25112ed241SMarkus Armbruster #include "qapi/qapi-commands-misc.h" 26cc7a8ea7SMarkus Armbruster #include "qapi/qmp/qerror.h" 27c759b24fSMichael S. Tsirkin #include "hw/pci/pci.h" 2866767562SPhilippe Mathieu-Daudé #include "hw/pci/msi.h" 2966767562SPhilippe Mathieu-Daudé 3066767562SPhilippe Mathieu-Daudé bool msi_nonbroken; 3188c725c7SCornelia Huck bool pci_available; 32315a1350SMichael S. Tsirkin 33315a1350SMichael S. Tsirkin PciInfoList *qmp_query_pci(Error **errp) 34315a1350SMichael S. Tsirkin { 35c6bd8c70SMarkus Armbruster error_setg(errp, QERR_UNSUPPORTED); 36315a1350SMichael S. Tsirkin return NULL; 37315a1350SMichael S. Tsirkin } 38315a1350SMichael S. Tsirkin 3904e00c92SMarkus Armbruster void hmp_pcie_aer_inject_error(Monitor *mon, const QDict *qdict) 40315a1350SMichael S. Tsirkin { 41315a1350SMichael S. Tsirkin monitor_printf(mon, "PCI devices not supported\n"); 42315a1350SMichael S. Tsirkin } 4388c725c7SCornelia Huck 4488c725c7SCornelia Huck /* kvm-all wants this */ 4588c725c7SCornelia Huck MSIMessage pci_get_msi_message(PCIDevice *dev, int vector) 4688c725c7SCornelia Huck { 4788c725c7SCornelia Huck g_assert(false); 4888c725c7SCornelia Huck return (MSIMessage){}; 4988c725c7SCornelia Huck } 5088c725c7SCornelia Huck 5188c725c7SCornelia Huck uint16_t pci_requester_id(PCIDevice *dev) 5288c725c7SCornelia Huck { 5388c725c7SCornelia Huck g_assert(false); 5488c725c7SCornelia Huck return 0; 5588c725c7SCornelia Huck } 56*d9e36515SThomas Huth 57*d9e36515SThomas Huth /* Required by ahci.c */ 58*d9e36515SThomas Huth bool msi_enabled(const PCIDevice *dev) 59*d9e36515SThomas Huth { 60*d9e36515SThomas Huth return false; 61*d9e36515SThomas Huth } 62*d9e36515SThomas Huth 63*d9e36515SThomas Huth void msi_notify(PCIDevice *dev, unsigned int vector) 64*d9e36515SThomas Huth { 65*d9e36515SThomas Huth g_assert_not_reached(); 66*d9e36515SThomas Huth } 67