ソースを参照

Merge commit '1dd3a74d2ee2d873cde0b390b536e45420b3fe05' into HEAD

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini 12 年 前
コミット
6f991980a5
100 ファイル変更206 行追加218 行削除
  1. 1 0
      MAINTAINERS
  2. 2 0
      Makefile.objs
  3. 1 1
      arch_init.c
  4. 4 9
      hw/Makefile.objs
  5. 1 1
      hw/ac97.c
  6. 8 7
      hw/acpi_ich9.c
  7. 1 1
      hw/acpi_piix4.c
  8. 2 2
      hw/alpha_sys.h
  9. 4 4
      hw/apb_pci.c
  10. 1 1
      hw/apic.c
  11. 1 1
      hw/apm.c
  12. 2 2
      hw/bonito.c
  13. 1 1
      hw/cirrus_vga.c
  14. 4 4
      hw/dec_pci.c
  15. 1 1
      hw/e1000.c
  16. 1 1
      hw/eepro100.c
  17. 1 1
      hw/es1370.c
  18. 1 1
      hw/esp-pci.c
  19. 2 2
      hw/grackle_pci.c
  20. 2 2
      hw/gt64xxx.c
  21. 1 1
      hw/hda-audio.c
  22. 1 1
      hw/i386/Makefile.objs
  23. 1 1
      hw/i82378.c
  24. 1 1
      hw/i82801b11.c
  25. 4 4
      hw/ich9.h
  26. 1 1
      hw/ide.h
  27. 2 2
      hw/ide/ahci.c
  28. 1 1
      hw/ide/cmd646.c
  29. 1 1
      hw/ide/core.c
  30. 2 2
      hw/ide/ich.c
  31. 1 1
      hw/ide/pci.c
  32. 1 1
      hw/ide/piix.c
  33. 1 1
      hw/ide/via.c
  34. 2 2
      hw/intel-hda.c
  35. 3 3
      hw/ioh3420.c
  36. 1 1
      hw/ioh3420.h
  37. 2 2
      hw/ivshmem.c
  38. 1 1
      hw/kvm/apic.c
  39. 2 2
      hw/kvm/pci-assign.c
  40. 12 28
      hw/lpc_ich9.c
  41. 1 1
      hw/lsi53c895a.c
  42. 1 1
      hw/macio.c
  43. 2 2
      hw/megasas.c
  44. 1 1
      hw/mips_fulong2e.c
  45. 1 1
      hw/mips_malta.c
  46. 1 1
      hw/ne2000.c
  47. 2 2
      hw/openpic.c
  48. 2 2
      hw/pc.c
  49. 2 2
      hw/pc_piix.c
  50. 9 0
      hw/pci/Makefile.objs
  51. 1 1
      hw/pci/msi.c
  52. 1 1
      hw/pci/msi.h
  53. 4 4
      hw/pci/msix.c
  54. 1 1
      hw/pci/msix.h
  55. 6 6
      hw/pci/pci-hotplug.c
  56. 1 1
      hw/pci/pci-stub.c
  57. 7 7
      hw/pci/pci.c
  58. 5 5
      hw/pci/pci.h
  59. 2 2
      hw/pci/pci_bridge.c
  60. 1 1
      hw/pci/pci_bridge.h
  61. 6 10
      hw/pci/pci_bus.h
  62. 2 2
      hw/pci/pci_host.c
  63. 1 1
      hw/pci/pci_host.h
  64. 0 0
      hw/pci/pci_ids.h
  65. 0 0
      hw/pci/pci_regs.h
  66. 6 6
      hw/pci/pcie.c
  67. 4 4
      hw/pci/pcie.h
  68. 6 6
      hw/pci/pcie_aer.c
  69. 1 1
      hw/pci/pcie_aer.h
  70. 3 3
      hw/pci/pcie_host.c
  71. 1 1
      hw/pci/pcie_host.h
  72. 1 1
      hw/pci/pcie_port.c
  73. 2 2
      hw/pci/pcie_port.h
  74. 0 0
      hw/pci/pcie_regs.h
  75. 4 4
      hw/pci/shpc.c
  76. 0 0
      hw/pci/shpc.h
  77. 2 2
      hw/pci/slotid_cap.c
  78. 0 0
      hw/pci/slotid_cap.h
  79. 6 6
      hw/pci_bridge_dev.c
  80. 1 1
      hw/pcnet-pci.c
  81. 1 1
      hw/piix4.c
  82. 2 2
      hw/piix_pci.c
  83. 1 1
      hw/ppc/Makefile.objs
  84. 1 1
      hw/ppc/e500.c
  85. 1 1
      hw/ppc440_bamboo.c
  86. 1 1
      hw/ppc4xx.h
  87. 2 2
      hw/ppc4xx_pci.c
  88. 1 1
      hw/ppc_newworld.c
  89. 1 1
      hw/ppc_oldworld.c
  90. 2 2
      hw/ppc_prep.c
  91. 2 2
      hw/ppce500_pci.c
  92. 2 2
      hw/prep_pci.c
  93. 2 2
      hw/q35.h
  94. 1 1
      hw/qxl.h
  95. 1 1
      hw/r2d.c
  96. 1 1
      hw/realview.c
  97. 1 1
      hw/rtl8139.c
  98. 1 1
      hw/serial-pci.c
  99. 1 1
      hw/sga.c
  100. 2 2
      hw/sh_pci.c

+ 1 - 0
MAINTAINERS

@@ -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*
 

+ 2 - 0
Makefile.objs

@@ -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
 

+ 1 - 1
arch_init.c

@@ -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"

+ 4 - 9
hw/Makefile.objs

@@ -1,14 +1,10 @@
-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

+ 1 - 1
hw/ac97.c

@@ -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 {

+ 8 - 7
hw/acpi_ich9.c

@@ -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"

+ 1 - 1
hw/acpi_piix4.c

@@ -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"

+ 2 - 2
hw/alpha_sys.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"

+ 4 - 4
hw/apb_pci.c

@@ -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"

+ 1 - 1
hw/apic.c

@@ -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"

+ 1 - 1
hw/apm.c

@@ -22,7 +22,7 @@
 
 #include "apm.h"
 #include "hw.h"
-#include "pci.h"
+#include "pci/pci.h"
 
 //#define DEBUG
 

+ 2 - 2
hw/bonito.c

@@ -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"
 

+ 1 - 1
hw/cirrus_vga.c

@@ -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"

+ 4 - 4
hw/dec_pci.c

@@ -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

+ 1 - 1
hw/e1000.c

@@ -26,7 +26,7 @@
 
 
 #include "hw.h"
-#include "pci.h"
+#include "pci/pci.h"
 #include "net.h"
 #include "net/checksum.h"
 #include "loader.h"

+ 1 - 1
hw/eepro100.c

@@ -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"

+ 1 - 1
hw/es1370.c

@@ -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:

+ 1 - 1
hw/esp-pci.c

@@ -23,7 +23,7 @@
  * THE SOFTWARE.
  */
 
-#include "pci.h"
+#include "pci/pci.h"
 #include "eeprom93xx.h"
 #include "esp.h"
 #include "trace.h"

+ 2 - 2
hw/grackle_pci.c

@@ -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

+ 2 - 2
hw/gt64xxx.c

@@ -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"
 

+ 1 - 1
hw/hda-audio.c

@@ -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"

+ 1 - 1
hw/i386/Makefile.objs

@@ -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

+ 1 - 1
hw/i82378.c

@@ -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"

+ 1 - 1
hw/i82801b11.c

@@ -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"
 
 

+ 4 - 4
hw/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);

+ 1 - 1
hw/ide.h

@@ -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

+ 2 - 2
hw/ide/ahci.c

@@ -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"

+ 1 - 1
hw/ide/cmd646.c

@@ -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"

+ 1 - 1
hw/ide/core.c

@@ -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"

+ 2 - 2
hw/ide/ich.c

@@ -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"

+ 1 - 1
hw/ide/pci.c

@@ -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"

+ 1 - 1
hw/ide/piix.c

@@ -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"

+ 1 - 1
hw/ide/via.c

@@ -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"

+ 2 - 2
hw/intel-hda.c

@@ -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"

+ 3 - 3
hw/ioh3420.c

@@ -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 */

+ 1 - 1
hw/ioh3420.h

@@ -1,7 +1,7 @@
 #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,

+ 2 - 2
hw/ivshmem.c

@@ -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"

+ 1 - 1
hw/kvm/apic.c

@@ -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,

+ 2 - 2
hw/kvm/pci-assign.c

@@ -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

+ 12 - 28
hw/lpc_ich9.c

@@ -1,5 +1,13 @@
 /*
+ * 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"
 

+ 1 - 1
hw/lsi53c895a.c

@@ -13,7 +13,7 @@
 #include <assert.h>
 
 #include "hw.h"
-#include "pci.h"
+#include "pci/pci.h"
 #include "scsi.h"
 #include "dma.h"
 

+ 1 - 1
hw/macio.c

@@ -24,7 +24,7 @@
  */
 #include "hw.h"
 #include "ppc_mac.h"
-#include "pci.h"
+#include "pci/pci.h"
 #include "escc.h"
 
 typedef struct MacIOState

+ 2 - 2
hw/megasas.c

@@ -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"

+ 1 - 1
hw/mips_fulong2e.c

@@ -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"

+ 1 - 1
hw/mips_malta.c

@@ -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"

+ 1 - 1
hw/ne2000.c

@@ -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"

+ 2 - 2
hw/openpic.c

@@ -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
 

+ 2 - 2
hw/pc.c

@@ -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"

+ 2 - 2
hw/pc_piix.c

@@ -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"

+ 9 - 0
hw/pci/Makefile.objs

@@ -0,0 +1,9 @@
+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

+ 1 - 1
hw/msi.c → hw/pci/msi.c

@@ -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 */

+ 1 - 1
hw/msi.h → hw/pci/msi.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;

+ 4 - 4
hw/msix.c → hw/pci/msix.c

@@ -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

+ 1 - 1
hw/msix.h → hw/pci/msix.h

@@ -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,

+ 6 - 6
hw/pci-hotplug.c → hw/pci/pci-hotplug.c

@@ -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"

+ 1 - 1
hw/pci-stub.c → hw/pci/pci-stub.c

@@ -20,7 +20,7 @@
 
 #include "sysemu.h"
 #include "monitor.h"
-#include "pci.h"
+#include "hw/pci/pci.h"
 #include "qmp-commands.h"
 
 PciInfoList *qmp_query_pci(Error **errp)

+ 7 - 7
hw/pci.c → hw/pci/pci.c

@@ -21,18 +21,18 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  * THE SOFTWARE.
  */
-#include "hw.h"
-#include "pci.h"
-#include "pci_bridge.h"
-#include "pci_internals.h"
+#include "hw/hw.h"
+#include "hw/pci/pci.h"
+#include "hw/pci/pci_bridge.h"
+#include "hw/pci/pci_bus.h"
 #include "monitor.h"
 #include "net.h"
 #include "sysemu.h"
-#include "loader.h"
+#include "hw/loader.h"
 #include "range.h"
 #include "qmp-commands.h"
-#include "msi.h"
-#include "msix.h"
+#include "hw/pci/msi.h"
+#include "hw/pci/msix.h"
 #include "exec-memory.h"
 
 //#define DEBUG_PCI

+ 5 - 5
hw/pci.h → hw/pci/pci.h

@@ -3,14 +3,14 @@
 
 #include "qemu-common.h"
 
-#include "qdev.h"
+#include "hw/qdev.h"
 #include "memory.h"
 #include "dma.h"
 
 /* PCI includes legacy ISA access.  */
-#include "isa.h"
+#include "hw/isa.h"
 
-#include "pcie.h"
+#include "hw/pci/pcie.h"
 
 /* PCI bus */
 
@@ -21,7 +21,7 @@
 #define PCI_FUNC_MAX            8
 
 /* Class, Vendor and Device IDs from Linux's pci_ids.h */
-#include "pci_ids.h"
+#include "hw/pci/pci_ids.h"
 
 /* QEMU-specific Vendor and Device ID definitions */
 
@@ -100,7 +100,7 @@ typedef struct PCIIORegion {
 #define PCI_ROM_SLOT 6
 #define PCI_NUM_REGIONS 7
 
-#include "pci_regs.h"
+#include "hw/pci/pci_regs.h"
 
 /* PCI HEADER_TYPE */
 #define  PCI_HEADER_TYPE_MULTI_FUNCTION 0x80

+ 2 - 2
hw/pci_bridge.c → hw/pci/pci_bridge.c

@@ -29,8 +29,8 @@
  *                    VA Linux Systems Japan K.K.
  */
 
-#include "pci_bridge.h"
-#include "pci_internals.h"
+#include "hw/pci/pci_bridge.h"
+#include "hw/pci/pci_bus.h"
 #include "range.h"
 
 /* PCI bridge subsystem vendor ID helper functions */

+ 1 - 1
hw/pci_bridge.h → hw/pci/pci_bridge.h

@@ -26,7 +26,7 @@
 #ifndef QEMU_PCI_BRIDGE_H
 #define QEMU_PCI_BRIDGE_H
 
-#include "pci.h"
+#include "hw/pci/pci.h"
 
 int pci_bridge_ssvid_init(PCIDevice *dev, uint8_t offset,
                           uint16_t svid, uint16_t ssid);

+ 6 - 10
hw/pci_internals.h → hw/pci/pci_bus.h

@@ -1,15 +1,11 @@
-#ifndef QEMU_PCI_INTERNALS_H
-#define QEMU_PCI_INTERNALS_H
+#ifndef QEMU_PCI_BUS_H
+#define QEMU_PCI_BUS_H
 
 /*
- * This header files is private to pci.c and pci_bridge.c
- * So following structures are opaque to others and shouldn't be
- * accessed.
+ * PCI Bus and Bridge datastructures.
  *
- * For pci-to-pci bridge needs to include this header file to embed
- * PCIBridge in its structure or to get sizeof(PCIBridge),
- * However, they shouldn't access those following members directly.
- * Use accessor function in pci.h, pci_bridge.h
+ * Do not access the following members directly;
+ * use accessor functions in pci.h, pci_bridge.h
  */
 
 #define TYPE_PCI_BUS "PCI"
@@ -75,4 +71,4 @@ struct PCIBridge {
     const char *bus_name;
 };
 
-#endif /* QEMU_PCI_INTERNALS_H */
+#endif /* QEMU_PCI_BUS_H */

+ 2 - 2
hw/pci_host.c → hw/pci/pci_host.c

@@ -18,8 +18,8 @@
  * with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "pci.h"
-#include "pci_host.h"
+#include "hw/pci/pci.h"
+#include "hw/pci/pci_host.h"
 
 /* debug PCI */
 //#define DEBUG_PCI

+ 1 - 1
hw/pci_host.h → hw/pci/pci_host.h

@@ -28,7 +28,7 @@
 #ifndef PCI_HOST_H
 #define PCI_HOST_H
 
-#include "sysbus.h"
+#include "hw/sysbus.h"
 
 #define TYPE_PCI_HOST_BRIDGE "pci-host-bridge"
 #define PCI_HOST_BRIDGE(obj) \

+ 0 - 0
hw/pci_ids.h → hw/pci/pci_ids.h


+ 0 - 0
hw/pci_regs.h → hw/pci/pci_regs.h


+ 6 - 6
hw/pcie.c → hw/pci/pcie.c

@@ -19,12 +19,12 @@
  */
 
 #include "qemu-common.h"
-#include "pci_bridge.h"
-#include "pcie.h"
-#include "msix.h"
-#include "msi.h"
-#include "pci_internals.h"
-#include "pcie_regs.h"
+#include "hw/pci/pci_bridge.h"
+#include "hw/pci/pcie.h"
+#include "hw/pci/msix.h"
+#include "hw/pci/msi.h"
+#include "hw/pci/pci_bus.h"
+#include "hw/pci/pcie_regs.h"
 #include "range.h"
 
 //#define DEBUG_PCIE

+ 4 - 4
hw/pcie.h → hw/pci/pcie.h

@@ -21,10 +21,10 @@
 #ifndef QEMU_PCIE_H
 #define QEMU_PCIE_H
 
-#include "hw.h"
-#include "pci_regs.h"
-#include "pcie_regs.h"
-#include "pcie_aer.h"
+#include "hw/hw.h"
+#include "hw/pci/pci_regs.h"
+#include "hw/pci/pcie_regs.h"
+#include "hw/pci/pcie_aer.h"
 
 typedef enum {
     /* for attention and power indicator */

+ 6 - 6
hw/pcie_aer.c → hw/pci/pcie_aer.c

@@ -21,12 +21,12 @@
 #include "sysemu.h"
 #include "qemu-objects.h"
 #include "monitor.h"
-#include "pci_bridge.h"
-#include "pcie.h"
-#include "msix.h"
-#include "msi.h"
-#include "pci_internals.h"
-#include "pcie_regs.h"
+#include "hw/pci/pci_bridge.h"
+#include "hw/pci/pcie.h"
+#include "hw/pci/msix.h"
+#include "hw/pci/msi.h"
+#include "hw/pci/pci_bus.h"
+#include "hw/pci/pcie_regs.h"
 
 //#define DEBUG_PCIE
 #ifdef DEBUG_PCIE

+ 1 - 1
hw/pcie_aer.h → hw/pci/pcie_aer.h

@@ -21,7 +21,7 @@
 #ifndef QEMU_PCIE_AER_H
 #define QEMU_PCIE_AER_H
 
-#include "hw.h"
+#include "hw/hw.h"
 
 /* definitions which PCIExpressDevice uses */
 

+ 3 - 3
hw/pcie_host.c → hw/pci/pcie_host.c

@@ -19,9 +19,9 @@
  * with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "hw.h"
-#include "pci.h"
-#include "pcie_host.h"
+#include "hw/hw.h"
+#include "hw/pci/pci.h"
+#include "hw/pci/pcie_host.h"
 #include "exec-memory.h"
 
 /*

+ 1 - 1
hw/pcie_host.h → hw/pci/pcie_host.h

@@ -21,7 +21,7 @@
 #ifndef PCIE_HOST_H
 #define PCIE_HOST_H
 
-#include "pci_host.h"
+#include "hw/pci/pci_host.h"
 #include "memory.h"
 
 #define TYPE_PCIE_HOST_BRIDGE "pcie-host-bridge"

+ 1 - 1
hw/pcie_port.c → hw/pci/pcie_port.c

@@ -18,7 +18,7 @@
  * with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "pcie_port.h"
+#include "hw/pci/pcie_port.h"
 
 void pcie_port_init_reg(PCIDevice *d)
 {

+ 2 - 2
hw/pcie_port.h → hw/pci/pcie_port.h

@@ -21,8 +21,8 @@
 #ifndef QEMU_PCIE_PORT_H
 #define QEMU_PCIE_PORT_H
 
-#include "pci_bridge.h"
-#include "pci_internals.h"
+#include "hw/pci/pci_bridge.h"
+#include "hw/pci/pci_bus.h"
 
 struct PCIEPort {
     PCIBridge   br;

+ 0 - 0
hw/pcie_regs.h → hw/pci/pcie_regs.h


+ 4 - 4
hw/shpc.c → hw/pci/shpc.c

@@ -2,10 +2,10 @@
 #include <stdint.h>
 #include "range.h"
 #include "range.h"
-#include "shpc.h"
-#include "pci.h"
-#include "pci_internals.h"
-#include "msi.h"
+#include "hw/pci/shpc.h"
+#include "hw/pci/pci.h"
+#include "hw/pci/pci_bus.h"
+#include "hw/pci/msi.h"
 
 /* TODO: model power only and disabled slot states. */
 /* TODO: handle SERR and wakeups */

+ 0 - 0
hw/shpc.h → hw/pci/shpc.h


+ 2 - 2
hw/slotid_cap.c → hw/pci/slotid_cap.c

@@ -1,5 +1,5 @@
-#include "slotid_cap.h"
-#include "pci.h"
+#include "hw/pci/slotid_cap.h"
+#include "hw/pci/pci.h"
 
 #define SLOTID_CAP_LENGTH 4
 #define SLOTID_NSLOTS_SHIFT (ffs(PCI_SID_ESR_NSLOTS) - 1)

+ 0 - 0
hw/slotid_cap.h → hw/pci/slotid_cap.h


+ 6 - 6
hw/pci_bridge_dev.c

@@ -19,13 +19,13 @@
  * with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "pci_bridge.h"
-#include "pci_ids.h"
-#include "msi.h"
-#include "shpc.h"
-#include "slotid_cap.h"
+#include "pci/pci_bridge.h"
+#include "pci/pci_ids.h"
+#include "pci/msi.h"
+#include "pci/shpc.h"
+#include "pci/slotid_cap.h"
 #include "memory.h"
-#include "pci_internals.h"
+#include "pci/pci_bus.h"
 
 #define REDHAT_PCI_VENDOR_ID 0x1b36
 #define PCI_BRIDGE_DEV_VENDOR_ID REDHAT_PCI_VENDOR_ID

+ 1 - 1
hw/pcnet-pci.c

@@ -27,7 +27,7 @@
  * AMD Publication# 19436  Rev:E  Amendment/0  Issue Date: June 2000
  */
 
-#include "pci.h"
+#include "pci/pci.h"
 #include "net.h"
 #include "loader.h"
 #include "qemu-timer.h"

+ 1 - 1
hw/piix4.c

@@ -24,7 +24,7 @@
 
 #include "hw.h"
 #include "pc.h"
-#include "pci.h"
+#include "pci/pci.h"
 #include "isa.h"
 #include "sysbus.h"
 

+ 2 - 2
hw/piix_pci.c

@@ -24,8 +24,8 @@
 
 #include "hw.h"
 #include "pc.h"
-#include "pci.h"
-#include "pci_host.h"
+#include "pci/pci.h"
+#include "pci/pci_host.h"
 #include "isa.h"
 #include "sysbus.h"
 #include "range.h"

+ 1 - 1
hw/ppc/Makefile.objs

@@ -10,7 +10,7 @@ obj-y += ppc_newworld.o
 # IBM pSeries (sPAPR)
 obj-$(CONFIG_PSERIES) += spapr.o spapr_hcall.o spapr_rtas.o spapr_vio.o
 obj-$(CONFIG_PSERIES) += xics.o spapr_vty.o spapr_llan.o spapr_vscsi.o
-obj-$(CONFIG_PSERIES) += spapr_pci.o pci-hotplug.o spapr_iommu.o
+obj-$(CONFIG_PSERIES) += spapr_pci.o pci/pci-hotplug.o spapr_iommu.o
 obj-$(CONFIG_PSERIES) += spapr_events.o spapr_nvram.o
 # PowerPC 4xx boards
 obj-y += ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o

+ 1 - 1
hw/ppc/e500.c

@@ -21,7 +21,7 @@
 #include "net.h"
 #include "hw/hw.h"
 #include "hw/serial.h"
-#include "hw/pci.h"
+#include "hw/pci/pci.h"
 #include "hw/boards.h"
 #include "sysemu.h"
 #include "kvm.h"

+ 1 - 1
hw/ppc440_bamboo.c

@@ -15,7 +15,7 @@
 #include "qemu-common.h"
 #include "net.h"
 #include "hw.h"
-#include "pci.h"
+#include "pci/pci.h"
 #include "boards.h"
 #include "kvm.h"
 #include "kvm_ppc.h"

+ 1 - 1
hw/ppc4xx.h

@@ -25,7 +25,7 @@
 #if !defined(PPC_4XX_H)
 #define PPC_4XX_H
 
-#include "pci.h"
+#include "pci/pci.h"
 
 /* PowerPC 4xx core initialization */
 CPUPPCState *ppc4xx_init (const char *cpu_model,

+ 2 - 2
hw/ppc4xx_pci.c

@@ -22,8 +22,8 @@
 #include "hw.h"
 #include "ppc.h"
 #include "ppc4xx.h"
-#include "pci.h"
-#include "pci_host.h"
+#include "pci/pci.h"
+#include "pci/pci_host.h"
 #include "exec-memory.h"
 
 #undef DEBUG

+ 1 - 1
hw/ppc_newworld.c

@@ -52,7 +52,7 @@
 #include "adb.h"
 #include "mac_dbdma.h"
 #include "nvram.h"
-#include "pci.h"
+#include "pci/pci.h"
 #include "net.h"
 #include "sysemu.h"
 #include "boards.h"

+ 1 - 1
hw/ppc_oldworld.c

@@ -32,7 +32,7 @@
 #include "sysemu.h"
 #include "net.h"
 #include "isa.h"
-#include "pci.h"
+#include "pci/pci.h"
 #include "boards.h"
 #include "fw_cfg.h"
 #include "escc.h"

+ 2 - 2
hw/ppc_prep.c

@@ -29,8 +29,8 @@
 #include "net.h"
 #include "sysemu.h"
 #include "isa.h"
-#include "pci.h"
-#include "pci_host.h"
+#include "pci/pci.h"
+#include "pci/pci_host.h"
 #include "ppc.h"
 #include "boards.h"
 #include "qemu-log.h"

+ 2 - 2
hw/ppce500_pci.c

@@ -16,8 +16,8 @@
 
 #include "hw.h"
 #include "hw/ppc/e500-ccsr.h"
-#include "pci.h"
-#include "pci_host.h"
+#include "pci/pci.h"
+#include "pci/pci_host.h"
 #include "bswap.h"
 #include "ppce500_pci.h"
 

+ 2 - 2
hw/prep_pci.c

@@ -23,8 +23,8 @@
  */
 
 #include "hw.h"
-#include "pci.h"
-#include "pci_host.h"
+#include "pci/pci.h"
+#include "pci/pci_host.h"
 #include "pc.h"
 #include "exec-memory.h"
 

+ 2 - 2
hw/q35.h

@@ -29,8 +29,8 @@
 #include "pc.h"
 #include "apm.h"
 #include "apic.h"
-#include "pci.h"
-#include "pcie_host.h"
+#include "pci/pci.h"
+#include "pci/pcie_host.h"
 #include "acpi.h"
 #include "acpi_ich9.h"
 #include "pam.h"

+ 1 - 1
hw/qxl.h

@@ -2,7 +2,7 @@
 
 #include "console.h"
 #include "hw.h"
-#include "pci.h"
+#include "pci/pci.h"
 #include "vga_int.h"
 #include "qemu-thread.h"
 

+ 1 - 1
hw/r2d.c

@@ -29,7 +29,7 @@
 #include "devices.h"
 #include "sysemu.h"
 #include "boards.h"
-#include "pci.h"
+#include "pci/pci.h"
 #include "net.h"
 #include "sh7750_regs.h"
 #include "ide.h"

+ 1 - 1
hw/realview.c

@@ -11,7 +11,7 @@
 #include "arm-misc.h"
 #include "primecell.h"
 #include "devices.h"
-#include "pci.h"
+#include "pci/pci.h"
 #include "net.h"
 #include "sysemu.h"
 #include "boards.h"

+ 1 - 1
hw/rtl8139.c

@@ -52,7 +52,7 @@
 #include <zlib.h>
 
 #include "hw.h"
-#include "pci.h"
+#include "pci/pci.h"
 #include "dma.h"
 #include "qemu-timer.h"
 #include "net.h"

+ 1 - 1
hw/serial-pci.c

@@ -26,7 +26,7 @@
 /* see docs/specs/pci-serial.txt */
 
 #include "serial.h"
-#include "pci.h"
+#include "pci/pci.h"
 
 #define PCI_SERIAL_MAX_PORTS 4
 

+ 1 - 1
hw/sga.c

@@ -24,7 +24,7 @@
  * sgabios code originally available at code.google.com/p/sgabios
  *
  */
-#include "pci.h"
+#include "pci/pci.h"
 #include "pc.h"
 #include "loader.h"
 #include "sysemu.h"

+ 2 - 2
hw/sh_pci.c

@@ -23,8 +23,8 @@
  */
 #include "sysbus.h"
 #include "sh.h"
-#include "pci.h"
-#include "pci_host.h"
+#include "pci/pci.h"
+#include "pci/pci_host.h"
 #include "bswap.h"
 #include "exec-memory.h"
 

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません