Commit 6f991980 authored by Paolo Bonzini's avatar Paolo Bonzini

Merge commit '1dd3a74d' into HEAD

Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
parents a8a826a3 1dd3a74d
......@@ -490,6 +490,7 @@ F: hw/omap*
PCI
M: Michael S. Tsirkin <mst@redhat.com>
S: Supported
F: hw/pci/*
F: hw/pci*
F: hw/piix*
......
......@@ -92,6 +92,8 @@ common-obj-$(CONFIG_SPICE) += spice-qemu-char.o
common-obj-y += audio/
common-obj-y += hw/
extra-obj-y += hw/
common-obj-y += ui/
common-obj-y += bt-host.o bt-vhci.o
......
......@@ -36,7 +36,7 @@
#include "arch_init.h"
#include "audio/audio.h"
#include "hw/pc.h"
#include "hw/pci.h"
#include "hw/pci/pci.h"
#include "hw/audiodev.h"
#include "kvm.h"
#include "migration.h"
......
common-obj-y = usb/ ide/
common-obj-y = usb/ ide/ pci/
common-obj-y += loader.o
common-obj-$(CONFIG_VIRTIO) += virtio-console.o
common-obj-$(CONFIG_VIRTIO) += virtio-rng.o
common-obj-$(CONFIG_VIRTIO_PCI) += virtio-pci.o
common-obj-y += fw_cfg.o
common-obj-$(CONFIG_PCI) += pci.o pci_bridge.o pci_bridge_dev.o
common-obj-$(CONFIG_PCI) += msix.o msi.o
common-obj-$(CONFIG_PCI) += shpc.o
common-obj-$(CONFIG_PCI) += slotid_cap.o
common-obj-$(CONFIG_PCI) += pci_host.o pcie_host.o
common-obj-$(CONFIG_PCI) += pci_bridge_dev.o
common-obj-$(CONFIG_PCI) += ioh3420.o xio3130_upstream.o xio3130_downstream.o
common-obj-$(CONFIG_PCI) += i82801b11.o
common-obj-y += watchdog.o
......@@ -41,6 +37,8 @@ common-obj-$(CONFIG_I8259) += i8259_common.o i8259.o
common-obj-y += fifo.o
common-obj-y += pam.o
extra-obj-y += pci/
# PPC devices
common-obj-$(CONFIG_PREP_PCI) += prep_pci.o
common-obj-$(CONFIG_I82378) += i82378.o
......@@ -102,8 +100,6 @@ common-obj-$(CONFIG_XGMAC) += xgmac.o
# PCI watchdog devices
common-obj-$(CONFIG_PCI) += wdt_i6300esb.o
common-obj-$(CONFIG_PCI) += pcie.o pcie_aer.o pcie_port.o
# PCI network cards
common-obj-$(CONFIG_NE2000_PCI) += ne2000.o
common-obj-$(CONFIG_EEPRO100_PCI) += eepro100.o
......@@ -199,7 +195,6 @@ obj-$(CONFIG_VIRTIO) += virtio-serial-bus.o virtio-scsi.o
obj-$(CONFIG_SOFTMMU) += vhost_net.o
obj-$(CONFIG_VHOST_NET) += vhost.o
obj-$(CONFIG_REALLY_VIRTFS) += 9pfs/
obj-$(CONFIG_NO_PCI) += pci-stub.o
obj-$(CONFIG_VGA) += vga.o
obj-$(CONFIG_SOFTMMU) += device-hotplug.o
obj-$(CONFIG_XEN) += xen_domainbuild.o xen_machine_pv.o
......
......@@ -20,7 +20,7 @@
#include "hw.h"
#include "audiodev.h"
#include "audio/audio.h"
#include "pci.h"
#include "pci/pci.h"
#include "dma.h"
enum {
......
......@@ -2,6 +2,11 @@
* ACPI implementation
*
* Copyright (c) 2006 Fabrice Bellard
* Copyright (c) 2009 Isaku Yamahata <yamahata at valinux co jp>
* VA Linux Systems Japan K.K.
* Copyright (C) 2012 Jason Baron <jbaron@redhat.com>
*
* This is based on acpi.c.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -14,17 +19,13 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>
*/
/*
* Copyright (c) 2009 Isaku Yamahata <yamahata at valinux co jp>
* VA Linux Systems Japan K.K.
* Copyright (C) 2012 Jason Baron <jbaron@redhat.com>
*
* This is based on acpi.c.
* Contributions after 2012-01-13 are licensed under the terms of the
* GNU GPL, version 2 or (at your option) any later version.
*/
#include "hw.h"
#include "pc.h"
#include "pci.h"
#include "pci/pci.h"
#include "qemu-timer.h"
#include "sysemu.h"
#include "acpi.h"
......
......@@ -22,7 +22,7 @@
#include "pc.h"
#include "apm.h"
#include "pm_smbus.h"
#include "pci.h"
#include "pci/pci.h"
#include "acpi.h"
#include "sysemu.h"
#include "range.h"
......
......@@ -3,8 +3,8 @@
#ifndef HW_ALPHA_H
#define HW_ALPHA_H 1
#include "pci.h"
#include "pci_host.h"
#include "pci/pci.h"
#include "pci/pci_host.h"
#include "ide.h"
#include "net.h"
#include "pc.h"
......
......@@ -27,10 +27,10 @@
the secondary PCI bridge. */
#include "sysbus.h"
#include "pci.h"
#include "pci_host.h"
#include "pci_bridge.h"
#include "pci_internals.h"
#include "pci/pci.h"
#include "pci/pci_host.h"
#include "pci/pci_bridge.h"
#include "pci/pci_bus.h"
#include "apb_pci.h"
#include "sysemu.h"
#include "exec-memory.h"
......
......@@ -20,7 +20,7 @@
#include "apic_internal.h"
#include "apic.h"
#include "ioapic.h"
#include "msi.h"
#include "pci/msi.h"
#include "host-utils.h"
#include "trace.h"
#include "pc.h"
......
......@@ -22,7 +22,7 @@
#include "apm.h"
#include "hw.h"
#include "pci.h"
#include "pci/pci.h"
//#define DEBUG
......
......@@ -40,10 +40,10 @@
#include <assert.h>
#include "hw.h"
#include "pci.h"
#include "pci/pci.h"
#include "pc.h"
#include "mips.h"
#include "pci_host.h"
#include "pci/pci_host.h"
#include "sysemu.h"
#include "exec-memory.h"
......
......@@ -27,7 +27,7 @@
* available at http://home.worldonline.dk/~finth/
*/
#include "hw.h"
#include "pci.h"
#include "pci/pci.h"
#include "console.h"
#include "vga_int.h"
#include "loader.h"
......
......@@ -25,10 +25,10 @@
#include "dec_pci.h"
#include "sysbus.h"
#include "pci.h"
#include "pci_host.h"
#include "pci_bridge.h"
#include "pci_internals.h"
#include "pci/pci.h"
#include "pci/pci_host.h"
#include "pci/pci_bridge.h"
#include "pci/pci_bus.h"
/* debug DEC */
//#define DEBUG_DEC
......
......@@ -26,7 +26,7 @@
#include "hw.h"
#include "pci.h"
#include "pci/pci.h"
#include "net.h"
#include "net/checksum.h"
#include "loader.h"
......
......@@ -42,7 +42,7 @@
#include <stddef.h> /* offsetof */
#include "hw.h"
#include "pci.h"
#include "pci/pci.h"
#include "net.h"
#include "eeprom93xx.h"
#include "sysemu.h"
......
......@@ -29,7 +29,7 @@
#include "hw.h"
#include "audiodev.h"
#include "audio/audio.h"
#include "pci.h"
#include "pci/pci.h"
#include "dma.h"
/* Missing stuff:
......
......@@ -23,7 +23,7 @@
* THE SOFTWARE.
*/
#include "pci.h"
#include "pci/pci.h"
#include "eeprom93xx.h"
#include "esp.h"
#include "trace.h"
......
......@@ -23,9 +23,9 @@
* THE SOFTWARE.
*/
#include "pci_host.h"
#include "pci/pci_host.h"
#include "ppc_mac.h"
#include "pci.h"
#include "pci/pci.h"
/* debug Grackle */
//#define DEBUG_GRACKLE
......
......@@ -24,8 +24,8 @@
#include "hw.h"
#include "mips.h"
#include "pci.h"
#include "pci_host.h"
#include "pci/pci.h"
#include "pci/pci_host.h"
#include "pc.h"
#include "exec-memory.h"
......
......@@ -18,7 +18,7 @@
*/
#include "hw.h"
#include "pci.h"
#include "pci/pci.h"
#include "intel-hda.h"
#include "intel-hda-defs.h"
#include "audio/audio.h"
......
......@@ -2,7 +2,7 @@ obj-y += mc146818rtc.o pc.o
obj-y += apic_common.o apic.o kvmvapic.o
obj-y += sga.o ioapic_common.o ioapic.o piix_pci.o
obj-y += vmport.o
obj-y += pci-hotplug.o smbios.o wdt_ib700.o
obj-y += pci/pci-hotplug.o smbios.o wdt_ib700.o
obj-y += debugcon.o multiboot.o
obj-y += pc_piix.o
obj-y += pc_sysfw.o
......
......@@ -17,7 +17,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "pci.h"
#include "pci/pci.h"
#include "pc.h"
#include "i8254.h"
#include "pcspk.h"
......
......@@ -41,7 +41,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>
*/
#include "pci.h"
#include "pci/pci.h"
#include "ich9.h"
......
......@@ -8,13 +8,13 @@
#include "pc.h"
#include "apm.h"
#include "ioapic.h"
#include "pci.h"
#include "pcie_host.h"
#include "pci_bridge.h"
#include "pci/pci.h"
#include "pci/pcie_host.h"
#include "pci/pci_bridge.h"
#include "acpi.h"
#include "acpi_ich9.h"
#include "pam.h"
#include "pci_internals.h"
#include "pci/pci_bus.h"
void ich9_lpc_set_irq(void *opaque, int irq_num, int level);
int ich9_lpc_map_irq(PCIDevice *pci_dev, int intx);
......
......@@ -2,7 +2,7 @@
#define HW_IDE_H
#include "isa.h"
#include "pci.h"
#include "pci/pci.h"
#include "memory.h"
#define MAX_IDE_DEVS 2
......
......@@ -22,9 +22,9 @@
*/
#include <hw/hw.h>
#include <hw/msi.h>
#include <hw/pci/msi.h>
#include <hw/pc.h>
#include <hw/pci.h>
#include <hw/pci/pci.h>
#include <hw/sysbus.h>
#include "monitor.h"
......
......@@ -24,7 +24,7 @@
*/
#include <hw/hw.h>
#include <hw/pc.h>
#include <hw/pci.h>
#include <hw/pci/pci.h>
#include <hw/isa.h>
#include "block.h"
#include "sysemu.h"
......
......@@ -24,7 +24,7 @@
*/
#include <hw/hw.h>
#include <hw/pc.h>
#include <hw/pci.h>
#include <hw/pci/pci.h>
#include <hw/isa.h>
#include "qemu-error.h"
#include "qemu-timer.h"
......
......@@ -61,9 +61,9 @@
*/
#include <hw/hw.h>
#include <hw/msi.h>
#include <hw/pci/msi.h>
#include <hw/pc.h>
#include <hw/pci.h>
#include <hw/pci/pci.h>
#include <hw/isa.h>
#include "block.h"
#include "dma.h"
......
......@@ -24,7 +24,7 @@
*/
#include <hw/hw.h>
#include <hw/pc.h>
#include <hw/pci.h>
#include <hw/pci/pci.h>
#include <hw/isa.h>
#include "block.h"
#include "dma.h"
......
......@@ -25,7 +25,7 @@
#include <hw/hw.h>
#include <hw/pc.h>
#include <hw/pci.h>
#include <hw/pci/pci.h>
#include <hw/isa.h>
#include "blockdev.h"
#include "sysemu.h"
......
......@@ -25,7 +25,7 @@
*/
#include <hw/hw.h>
#include <hw/pc.h>
#include <hw/pci.h>
#include <hw/pci/pci.h>
#include <hw/isa.h>
#include "block.h"
#include "sysemu.h"
......
......@@ -18,8 +18,8 @@
*/
#include "hw.h"
#include "pci.h"
#include "msi.h"
#include "pci/pci.h"
#include "pci/msi.h"
#include "qemu-timer.h"
#include "audiodev.h"
#include "intel-hda.h"
......
......@@ -20,9 +20,9 @@
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "pci_ids.h"
#include "msi.h"
#include "pcie.h"
#include "pci/pci_ids.h"
#include "pci/msi.h"
#include "pci/pcie.h"
#include "ioh3420.h"
#define PCI_DEVICE_ID_IOH_EPORT 0x3420 /* D0:F0 express mode */
......
#ifndef QEMU_IOH3420_H
#define QEMU_IOH3420_H
#include "pcie_port.h"
#include "pci/pcie_port.h"
PCIESlot *ioh3420_init(PCIBus *bus, int devfn, bool multifunction,
const char *bus_name, pci_map_irq_fn map_irq,
......
......@@ -18,8 +18,8 @@
*/
#include "hw.h"
#include "pc.h"
#include "pci.h"
#include "msix.h"
#include "pci/pci.h"
#include "pci/msix.h"
#include "kvm.h"
#include "migration.h"
#include "qerror.h"
......
......@@ -10,7 +10,7 @@
* See the COPYING file in the top-level directory.
*/
#include "hw/apic_internal.h"
#include "hw/msi.h"
#include "hw/pci/msi.h"
#include "kvm.h"
static inline void kvm_apic_set_reg(struct kvm_lapic_state *kapic,
......
......@@ -34,8 +34,8 @@
#include "monitor.h"
#include "range.h"
#include "sysemu.h"
#include "hw/pci.h"
#include "hw/msi.h"
#include "hw/pci/pci.h"
#include "hw/pci/msi.h"
#include "kvm_i386.h"
#define MSIX_PAGE_SIZE 0x1000
......
/*
* QEMU ICH9 Emulation
*
* Copyright (c) 2006 Fabrice Bellard
* Copyright (c) 2009, 2010, 2011
* Isaku Yamahata <yamahata at valinux co jp>
* VA Linux Systems Japan K.K.
* Copyright (C) 2012 Jason Baron <jbaron@redhat.com>
*
* This is based on piix_pci.c, but heavily modified.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
......@@ -19,30 +27,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
/*
* QEMU ICH9 Emulation
*
* Copyright (c) 2009, 2010, 2011
* Isaku Yamahata <yamahata at valinux co jp>
* VA Linux Systems Japan K.K.
* Copyright (C) 2012 Jason Baron <jbaron@redhat.com>
*
* This is based on piix_pci.c, but heavily modified.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>
*/
#include "qemu-common.h"
#include "hw.h"
#include "range.h"
......@@ -51,14 +35,14 @@
#include "pc.h"
#include "apm.h"
#include "ioapic.h"
#include "pci.h"
#include "pcie_host.h"
#include "pci_bridge.h"
#include "pci/pci.h"
#include "pci/pcie_host.h"
#include "pci/pci_bridge.h"
#include "ich9.h"
#include "acpi.h"
#include "acpi_ich9.h"
#include "pam.h"
#include "pci_internals.h"
#include "pci/pci_bus.h"
#include "exec-memory.h"
#include "sysemu.h"
......
......@@ -13,7 +13,7 @@
#include <assert.h>
#include "hw.h"
#include "pci.h"
#include "pci/pci.h"
#include "scsi.h"
#include "dma.h"
......
......@@ -24,7 +24,7 @@
*/
#include "hw.h"
#include "ppc_mac.h"
#include "pci.h"
#include "pci/pci.h"
#include "escc.h"
typedef struct MacIOState
......
......@@ -19,9 +19,9 @@
*/
#include "hw.h"
#include "pci.h"
#include "pci/pci.h"
#include "dma.h"
#include "msix.h"
#include "pci/msix.h"
#include "iov.h"
#include "scsi.h"
#include "scsi-defs.h"
......
......@@ -29,7 +29,7 @@
#include "flash.h"
#include "mips.h"
#include "mips_cpudevs.h"
#include "pci.h"
#include "pci/pci.h"
#include "qemu-char.h"
#include "sysemu.h"
#include "audio/audio.h"
......
......@@ -33,7 +33,7 @@
#include "flash.h"
#include "mips.h"
#include "mips_cpudevs.h"
#include "pci.h"
#include "pci/pci.h"
#include "qemu-char.h"
#include "sysemu.h"
#include "arch_init.h"
......
......@@ -22,7 +22,7 @@
* THE SOFTWARE.
*/
#include "hw.h"
#include "pci.h"
#include "pci/pci.h"
#include "net.h"
#include "ne2000.h"
#include "loader.h"
......
......@@ -35,10 +35,10 @@
*/
#include "hw.h"
#include "ppc_mac.h"
#include "pci.h"
#include "pci/pci.h"
#include "openpic.h"
#include "sysbus.h"
#include "msi.h"
#include "pci/msi.h"
//#define DEBUG_OPENPIC
......
......@@ -27,7 +27,7 @@
#include "apic.h"
#include "fdc.h"
#include "ide.h"
#include "pci.h"
#include "pci/pci.h"
#include "monitor.h"
#include "fw_cfg.h"
#include "hpet_emul.h"
......@@ -38,7 +38,7 @@
#include "mc146818rtc.h"
#include "i8254.h"
#include "pcspk.h"
#include "msi.h"
#include "pci/msi.h"
#include "sysbus.h"
#include "sysemu.h"
#include "kvm.h"
......
......@@ -27,8 +27,8 @@
#include "hw.h"
#include "pc.h"
#include "apic.h"
#include "pci.h"
#include "pci_ids.h"
#include "pci/pci.h"
#include "pci/pci_ids.h"
#include "usb.h"
#include "net.h"
#include "boards.h"
......
common-obj-$(CONFIG_PCI) += pci.o pci_bridge.o
common-obj-$(CONFIG_PCI) += msix.o msi.o
common-obj-$(CONFIG_PCI) += shpc.o
common-obj-$(CONFIG_PCI) += slotid_cap.o
common-obj-$(CONFIG_PCI) += pci_host.o pcie_host.o
common-obj-$(CONFIG_PCI) += pcie.o pcie_aer.o pcie_port.o
common-obj-$(CONFIG_NO_PCI) += pci-stub.o
extra-obj-y += pci-stub.o
......@@ -18,7 +18,7 @@
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "msi.h"
#include "hw/pci/msi.h"
#include "range.h"
/* Eventually those constants should go to Linux pci_regs.h */
......
......@@ -22,7 +22,7 @@
#define QEMU_MSI_H
#include "qemu-common.h"
#include "pci.h"
#include "hw/pci/pci.h"
struct MSIMessage {
uint64_t address;
......
......@@ -14,10 +14,10 @@
* GNU GPL, version 2 or (at your option) any later version.
*/
#include "hw.h"
#include "msi.h"
#include "msix.h"
#include "pci.h"
#include "hw/hw.h"
#include "hw/pci/msi.h"
#include "hw/pci/msix.h"
#include "hw/pci/pci.h"
#include "range.h"
#define MSIX_CAP_LENGTH 12
......
......@@ -2,7 +2,7 @@
#define QEMU_MSIX_H
#include "qemu-common.h"
#include "pci.h"
#include "hw/pci/pci.h"
void msix_set_message(PCIDevice *dev, int vector, MSIMessage msg);
int msix_init(PCIDevice *dev, unsigned short nentries,
......
......@@ -22,14 +22,14 @@
* THE SOFTWARE.
*/
#include "hw.h"
#include "boards.h"
#include "pci.h"
#include "hw/hw.h"
#include "hw/boards.h"
#include "hw/pci/pci.h"
#include "net.h"
#include "pc.h"
#include "hw/pc.h"
#include "monitor.h"
#include "scsi.h"
#include "virtio-blk.h"
#include "hw/scsi.h"
#include "hw/virtio-blk.h"
#include "qemu-config.h"
#include "blockdev.h"
#include "error.h"
......
......@@ -20,7 +20,7 @@
#include "sysemu.h"
#include "monitor.h"
#include "pci.h"
#include "hw/pci/pci.h"