From 6f918e40e6b7f4e3dcf89c3e3f1001e965a683a1 Mon Sep 17 00:00:00 2001 From: Jason Baron Date: Mon, 29 Oct 2012 22:11:31 -0400 Subject: [PATCH 01/13] Fixup q35/ich9 Licenses Cleanup the q35/ich9 license headers. Signed-off-by: Jason Baron Signed-off-by: Michael S. Tsirkin Acked-by: Isaku Yamahata --- hw/acpi_ich9.c | 13 +++++++------ hw/lpc_ich9.c | 32 ++++++++------------------------ hw/smbus_ich9.c | 14 ++++++++------ 3 files changed, 23 insertions(+), 36 deletions(-) diff --git a/hw/acpi_ich9.c b/hw/acpi_ich9.c index c5978d33cc..85d441c33c 100644 --- a/hw/acpi_ich9.c +++ b/hw/acpi_ich9.c @@ -2,6 +2,11 @@ * ACPI implementation * * Copyright (c) 2006 Fabrice Bellard + * Copyright (c) 2009 Isaku Yamahata + * VA Linux Systems Japan K.K. + * Copyright (C) 2012 Jason Baron + * + * 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,13 +19,9 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see - */ -/* - * Copyright (c) 2009 Isaku Yamahata - * VA Linux Systems Japan K.K. - * Copyright (C) 2012 Jason Baron * - * 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" diff --git a/hw/lpc_ich9.c b/hw/lpc_ich9.c index 878a43e92c..7a113633ed 100644 --- a/hw/lpc_ich9.c +++ b/hw/lpc_ich9.c @@ -1,5 +1,13 @@ /* + * QEMU ICH9 Emulation + * * Copyright (c) 2006 Fabrice Bellard + * Copyright (c) 2009, 2010, 2011 + * Isaku Yamahata + * VA Linux Systems Japan K.K. + * Copyright (C) 2012 Jason Baron + * + * 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 - * VA Linux Systems Japan K.K. - * Copyright (C) 2012 Jason Baron - * - * 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 - */ - #include "qemu-common.h" #include "hw.h" #include "range.h" diff --git a/hw/smbus_ich9.c b/hw/smbus_ich9.c index 4194785d71..d202664a36 100644 --- a/hw/smbus_ich9.c +++ b/hw/smbus_ich9.c @@ -2,6 +2,11 @@ * ACPI implementation * * Copyright (c) 2006 Fabrice Bellard + * Copyright (c) 2009 Isaku Yamahata + * VA Linux Systems Japan K.K. + * Copyright (C) 2012 Jason Baron + * + * This is based on acpi.c, but heavily rewritten. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -14,13 +19,10 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see - */ -/* - * Copyright (c) 2009 Isaku Yamahata - * VA Linux Systems Japan K.K. - * Copyright (C) 2012 Jason Baron * - * This is based on acpi.c, but heavily rewritten. + * 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" From 89e6d68ef3c45b2c4e3199c3397b5525b752698d Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Mon, 12 Nov 2012 09:13:04 +0200 Subject: [PATCH 02/13] tap: reset vnet header size on open For tap, we currently assume the vnet header size is 10 (the default value) but that might not be the case if tap is persistent and has been used by qemu previously. To fix, set vnet header size correctly on open. Signed-off-by: Michael S. Tsirkin --- net/tap-linux.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/net/tap-linux.c b/net/tap-linux.c index c6521bec34..3eaedc40ad 100644 --- a/net/tap-linux.c +++ b/net/tap-linux.c @@ -39,6 +39,7 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required { struct ifreq ifr; int fd, ret; + int len = sizeof(struct virtio_net_hdr); TFR(fd = open(PATH_NET_TUN, O_RDWR)); if (fd < 0) { @@ -65,6 +66,13 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required close(fd); return -1; } + /* + * Make sure vnet header size has the default value: for a persistent + * tap it might have been modified e.g. by another instance of qemu. + * Ignore errors since old kernels do not support this ioctl: in this + * case the header size implicitly has the correct value. + */ + ioctl(fd, TUNSETVNETHDRSZ, &len); } if (ifname[0] != '\0') From c84a2b1aa5ccdddad03d25f58be5c94eba0d9db4 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Mon, 10 Dec 2012 22:52:11 +0200 Subject: [PATCH 03/13] get_maintainer.pl: update from linix 3.8 Signed-off-by: Michael S. Tsirkin --- scripts/get_maintainer.pl | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index d9c48e0982..bf5342a08d 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -83,6 +83,8 @@ push(@signature_tags, "Signed-off-by:"); push(@signature_tags, "Reviewed-by:"); push(@signature_tags, "Acked-by:"); +my $signature_pattern = "\(" . join("|", @signature_tags) . "\)"; + # rfc822 email address - preloaded methods go here. my $rfc822_lwsp = "(?:(?:\\r\\n)?[ \\t])"; my $rfc822_char = '[\\000-\\377]'; @@ -95,7 +97,7 @@ my %VCS_cmds_git = ( "execute_cmd" => \&git_execute_cmd, "available" => '(which("git") ne "") && (-d ".git")', "find_signers_cmd" => - "git log --no-color --since=\$email_git_since " . + "git log --no-color --follow --since=\$email_git_since " . '--format="GitCommit: %H%n' . 'GitAuthor: %an <%ae>%n' . 'GitDate: %aD%n' . @@ -328,7 +330,8 @@ sub read_mailmap { # name1 # name1 name2 # (see man git-shortlog) - if (/^(.+)<(.+)>$/) { + + if (/^([^<]+)<([^>]+)>$/) { my $real_name = $1; my $address = $2; @@ -336,13 +339,13 @@ sub read_mailmap { ($real_name, $address) = parse_email("$real_name <$address>"); $mailmap->{names}->{$address} = $real_name; - } elsif (/^<([^\s]+)>\s*<([^\s]+)>$/) { + } elsif (/^<([^>]+)>\s*<([^>]+)>$/) { my $real_address = $1; my $wrong_address = $2; $mailmap->{addresses}->{$wrong_address} = $real_address; - } elsif (/^(.+)<([^\s]+)>\s*<([^\s]+)>$/) { + } elsif (/^(.+)<([^>]+)>\s*<([^>]+)>$/) { my $real_name = $1; my $real_address = $2; my $wrong_address = $3; @@ -353,7 +356,7 @@ sub read_mailmap { $mailmap->{names}->{$wrong_address} = $real_name; $mailmap->{addresses}->{$wrong_address} = $real_address; - } elsif (/^(.+)<([^\s]+)>\s*([^\s].*)<([^\s]+)>$/) { + } elsif (/^(.+)<([^>]+)>\s*(.+)\s*<([^>]+)>$/) { my $real_name = $1; my $real_address = $2; my $wrong_name = $3; @@ -472,7 +475,6 @@ my @subsystem = (); my @status = (); my %deduplicate_name_hash = (); my %deduplicate_address_hash = (); -my $signature_pattern; my @maintainers = get_maintainers(); @@ -920,7 +922,7 @@ sub get_maintainer_role { my $start = find_starting_index($index); my $end = find_ending_index($index); - my $role; + my $role = "unknown"; my $subsystem = $typevalue[$start]; if (length($subsystem) > 20) { $subsystem = substr($subsystem, 0, 17); @@ -1016,8 +1018,13 @@ sub add_categories { if ($email_list) { if (!$hash_list_to{lc($list_address)}) { $hash_list_to{lc($list_address)} = 1; - push(@list_to, [$list_address, - "open list${list_role}"]); + if ($list_additional =~ m/moderated/) { + push(@list_to, [$list_address, + "moderated list${list_role}"]); + } else { + push(@list_to, [$list_address, + "open list${list_role}"]); + } } } } From 29002d9e104913998265cfff95bb49f4b4a966e2 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Wed, 12 Dec 2012 13:07:29 +0200 Subject: [PATCH 04/13] pci: prepare makefiles for pci code reorganization To make it easier to move code around without breaking build at intermedite steps, tweak makefiles to look in pci/ and hw/ for include files, automatically. This will be reverted at the end of the reorganization. Signed-off-by: Michael S. Tsirkin --- Makefile | 1 + Makefile.target | 1 + Makefile.user | 1 + hw/pci/hw | 1 + 4 files changed, 4 insertions(+) create mode 120000 hw/pci/hw diff --git a/Makefile b/Makefile index 9ecbcbb0a7..b9a81d18a2 100644 --- a/Makefile +++ b/Makefile @@ -146,6 +146,7 @@ audio/audio.o audio/fmodaudio.o: QEMU_CFLAGS += $(FMOD_CFLAGS) QEMU_CFLAGS+=$(CURL_CFLAGS) QEMU_CFLAGS += -I$(SRC_PATH)/include +QEMU_CFLAGS+=-I$(SRC_PATH)/hw/pci -I$(SRC_PATH)/hw ui/cocoa.o: ui/cocoa.m diff --git a/Makefile.target b/Makefile.target index 927347bac2..fe2cc0d8b0 100644 --- a/Makefile.target +++ b/Makefile.target @@ -12,6 +12,7 @@ endif QEMU_CFLAGS += -I.. -I$(SRC_PATH)/target-$(TARGET_BASE_ARCH) -DNEED_CPU_H QEMU_CFLAGS+=-I$(SRC_PATH)/include +QEMU_CFLAGS+=-I$(SRC_PATH)/hw/pci -I$(SRC_PATH)/hw ifdef CONFIG_USER_ONLY # user emulator name diff --git a/Makefile.user b/Makefile.user index 9302d33245..045ecd3bea 100644 --- a/Makefile.user +++ b/Makefile.user @@ -11,6 +11,7 @@ $(call set-vpath, $(SRC_PATH)) QEMU_CFLAGS+=-I.. QEMU_CFLAGS += -I$(SRC_PATH)/include QEMU_CFLAGS += -DCONFIG_USER_ONLY +QEMU_CFLAGS+=-I$(SRC_PATH)/hw/pci -I$(SRC_PATH)/hw include $(SRC_PATH)/Makefile.objs diff --git a/hw/pci/hw b/hw/pci/hw new file mode 120000 index 0000000000..945c9b46d6 --- /dev/null +++ b/hw/pci/hw @@ -0,0 +1 @@ +. \ No newline at end of file From ca818cfbfd77e02ffac338866568ac07f6f5fd7d Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Wed, 12 Dec 2012 15:11:55 +0200 Subject: [PATCH 05/13] MAINTAINERS: add hw/pci/ to list of PCI files Signed-off-by: Michael S. Tsirkin --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2ede20d60b..c1b16c5fe4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -490,6 +490,7 @@ F: hw/omap* PCI M: Michael S. Tsirkin S: Supported +F: hw/pci/* F: hw/pci* F: hw/piix* From 315a1350c4a386065a73aad2ded1a11d77bf7771 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Wed, 12 Dec 2012 13:32:14 +0200 Subject: [PATCH 06/13] pci: move pci core code to hw/pci Move files and modify makefiles to pick them at the new location. Signed-off-by: Michael S. Tsirkin --- hw/Makefile.objs | 11 ++--------- hw/i386/Makefile.objs | 2 +- hw/pci/Makefile.objs | 7 +++++++ hw/{ => pci}/msi.c | 0 hw/{ => pci}/msi.h | 0 hw/{ => pci}/msix.c | 0 hw/{ => pci}/msix.h | 0 hw/{ => pci}/pci-hotplug.c | 0 hw/{ => pci}/pci-stub.c | 0 hw/{ => pci}/pci.c | 0 hw/{ => pci}/pci.h | 0 hw/{ => pci}/pci_bridge.c | 0 hw/{ => pci}/pci_bridge.h | 0 hw/{ => pci}/pci_host.c | 0 hw/{ => pci}/pci_host.h | 0 hw/{ => pci}/pci_ids.h | 0 hw/{ => pci}/pci_internals.h | 0 hw/{ => pci}/pci_regs.h | 0 hw/{ => pci}/pcie.c | 0 hw/{ => pci}/pcie.h | 0 hw/{ => pci}/pcie_aer.c | 0 hw/{ => pci}/pcie_aer.h | 0 hw/{ => pci}/pcie_host.c | 0 hw/{ => pci}/pcie_host.h | 0 hw/{ => pci}/pcie_port.c | 0 hw/{ => pci}/pcie_port.h | 0 hw/{ => pci}/pcie_regs.h | 0 hw/{ => pci}/shpc.c | 0 hw/{ => pci}/shpc.h | 0 hw/{ => pci}/slotid_cap.c | 0 hw/{ => pci}/slotid_cap.h | 0 hw/ppc/Makefile.objs | 2 +- 32 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 hw/pci/Makefile.objs rename hw/{ => pci}/msi.c (100%) rename hw/{ => pci}/msi.h (100%) rename hw/{ => pci}/msix.c (100%) rename hw/{ => pci}/msix.h (100%) rename hw/{ => pci}/pci-hotplug.c (100%) rename hw/{ => pci}/pci-stub.c (100%) rename hw/{ => pci}/pci.c (100%) rename hw/{ => pci}/pci.h (100%) rename hw/{ => pci}/pci_bridge.c (100%) rename hw/{ => pci}/pci_bridge.h (100%) rename hw/{ => pci}/pci_host.c (100%) rename hw/{ => pci}/pci_host.h (100%) rename hw/{ => pci}/pci_ids.h (100%) rename hw/{ => pci}/pci_internals.h (100%) rename hw/{ => pci}/pci_regs.h (100%) rename hw/{ => pci}/pcie.c (100%) rename hw/{ => pci}/pcie.h (100%) rename hw/{ => pci}/pcie_aer.c (100%) rename hw/{ => pci}/pcie_aer.h (100%) rename hw/{ => pci}/pcie_host.c (100%) rename hw/{ => pci}/pcie_host.h (100%) rename hw/{ => pci}/pcie_port.c (100%) rename hw/{ => pci}/pcie_port.h (100%) rename hw/{ => pci}/pcie_regs.h (100%) rename hw/{ => pci}/shpc.c (100%) rename hw/{ => pci}/shpc.h (100%) rename hw/{ => pci}/slotid_cap.c (100%) rename hw/{ => pci}/slotid_cap.h (100%) diff --git a/hw/Makefile.objs b/hw/Makefile.objs index d581d8d6d6..9d33b189e6 100644 --- a/hw/Makefile.objs +++ b/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 @@ -102,8 +98,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 +193,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 diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs index 0d3f6a8e84..257f3c1a91 100644 --- a/hw/i386/Makefile.objs +++ b/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 diff --git a/hw/pci/Makefile.objs b/hw/pci/Makefile.objs new file mode 100644 index 0000000000..aa7a0e84b5 --- /dev/null +++ b/hw/pci/Makefile.objs @@ -0,0 +1,7 @@ +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 diff --git a/hw/msi.c b/hw/pci/msi.c similarity index 100% rename from hw/msi.c rename to hw/pci/msi.c diff --git a/hw/msi.h b/hw/pci/msi.h similarity index 100% rename from hw/msi.h rename to hw/pci/msi.h diff --git a/hw/msix.c b/hw/pci/msix.c similarity index 100% rename from hw/msix.c rename to hw/pci/msix.c diff --git a/hw/msix.h b/hw/pci/msix.h similarity index 100% rename from hw/msix.h rename to hw/pci/msix.h diff --git a/hw/pci-hotplug.c b/hw/pci/pci-hotplug.c similarity index 100% rename from hw/pci-hotplug.c rename to hw/pci/pci-hotplug.c diff --git a/hw/pci-stub.c b/hw/pci/pci-stub.c similarity index 100% rename from hw/pci-stub.c rename to hw/pci/pci-stub.c diff --git a/hw/pci.c b/hw/pci/pci.c similarity index 100% rename from hw/pci.c rename to hw/pci/pci.c diff --git a/hw/pci.h b/hw/pci/pci.h similarity index 100% rename from hw/pci.h rename to hw/pci/pci.h diff --git a/hw/pci_bridge.c b/hw/pci/pci_bridge.c similarity index 100% rename from hw/pci_bridge.c rename to hw/pci/pci_bridge.c diff --git a/hw/pci_bridge.h b/hw/pci/pci_bridge.h similarity index 100% rename from hw/pci_bridge.h rename to hw/pci/pci_bridge.h diff --git a/hw/pci_host.c b/hw/pci/pci_host.c similarity index 100% rename from hw/pci_host.c rename to hw/pci/pci_host.c diff --git a/hw/pci_host.h b/hw/pci/pci_host.h similarity index 100% rename from hw/pci_host.h rename to hw/pci/pci_host.h diff --git a/hw/pci_ids.h b/hw/pci/pci_ids.h similarity index 100% rename from hw/pci_ids.h rename to hw/pci/pci_ids.h diff --git a/hw/pci_internals.h b/hw/pci/pci_internals.h similarity index 100% rename from hw/pci_internals.h rename to hw/pci/pci_internals.h diff --git a/hw/pci_regs.h b/hw/pci/pci_regs.h similarity index 100% rename from hw/pci_regs.h rename to hw/pci/pci_regs.h diff --git a/hw/pcie.c b/hw/pci/pcie.c similarity index 100% rename from hw/pcie.c rename to hw/pci/pcie.c diff --git a/hw/pcie.h b/hw/pci/pcie.h similarity index 100% rename from hw/pcie.h rename to hw/pci/pcie.h diff --git a/hw/pcie_aer.c b/hw/pci/pcie_aer.c similarity index 100% rename from hw/pcie_aer.c rename to hw/pci/pcie_aer.c diff --git a/hw/pcie_aer.h b/hw/pci/pcie_aer.h similarity index 100% rename from hw/pcie_aer.h rename to hw/pci/pcie_aer.h diff --git a/hw/pcie_host.c b/hw/pci/pcie_host.c similarity index 100% rename from hw/pcie_host.c rename to hw/pci/pcie_host.c diff --git a/hw/pcie_host.h b/hw/pci/pcie_host.h similarity index 100% rename from hw/pcie_host.h rename to hw/pci/pcie_host.h diff --git a/hw/pcie_port.c b/hw/pci/pcie_port.c similarity index 100% rename from hw/pcie_port.c rename to hw/pci/pcie_port.c diff --git a/hw/pcie_port.h b/hw/pci/pcie_port.h similarity index 100% rename from hw/pcie_port.h rename to hw/pci/pcie_port.h diff --git a/hw/pcie_regs.h b/hw/pci/pcie_regs.h similarity index 100% rename from hw/pcie_regs.h rename to hw/pci/pcie_regs.h diff --git a/hw/shpc.c b/hw/pci/shpc.c similarity index 100% rename from hw/shpc.c rename to hw/pci/shpc.c diff --git a/hw/shpc.h b/hw/pci/shpc.h similarity index 100% rename from hw/shpc.h rename to hw/pci/shpc.h diff --git a/hw/slotid_cap.c b/hw/pci/slotid_cap.c similarity index 100% rename from hw/slotid_cap.c rename to hw/pci/slotid_cap.c diff --git a/hw/slotid_cap.h b/hw/pci/slotid_cap.h similarity index 100% rename from hw/slotid_cap.h rename to hw/pci/slotid_cap.h diff --git a/hw/ppc/Makefile.objs b/hw/ppc/Makefile.objs index 8fe21235f0..cb7cf8fba5 100644 --- a/hw/ppc/Makefile.objs +++ b/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 # PowerPC 4xx boards obj-y += ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o From a2cb15b0ddfa05f81a42d7b65dd0c7c50e420c33 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Wed, 12 Dec 2012 14:24:50 +0200 Subject: [PATCH 07/13] pci: update all users to look in pci/ update all users so we can remove the makefile hack. Signed-off-by: Michael S. Tsirkin --- arch_init.c | 2 +- hw/ac97.c | 2 +- hw/acpi_ich9.c | 2 +- hw/acpi_piix4.c | 2 +- hw/alpha_sys.h | 4 ++-- hw/apb_pci.c | 8 ++++---- hw/apic.c | 2 +- hw/apm.c | 2 +- hw/bonito.c | 4 ++-- hw/cirrus_vga.c | 2 +- hw/dec_pci.c | 8 ++++---- hw/e1000.c | 2 +- hw/eepro100.c | 2 +- hw/es1370.c | 2 +- hw/esp-pci.c | 2 +- hw/grackle_pci.c | 4 ++-- hw/gt64xxx.c | 4 ++-- hw/hda-audio.c | 2 +- hw/i82378.c | 2 +- hw/i82801b11.c | 2 +- hw/ich9.h | 8 ++++---- hw/ide.h | 2 +- hw/ide/ahci.c | 4 ++-- hw/ide/cmd646.c | 2 +- hw/ide/core.c | 2 +- hw/ide/ich.c | 4 ++-- hw/ide/pci.c | 2 +- hw/ide/piix.c | 2 +- hw/ide/via.c | 2 +- hw/intel-hda.c | 4 ++-- hw/ioh3420.c | 6 +++--- hw/ioh3420.h | 2 +- hw/ivshmem.c | 4 ++-- hw/kvm/apic.c | 2 +- hw/kvm/pci-assign.c | 4 ++-- hw/lpc_ich9.c | 8 ++++---- hw/lsi53c895a.c | 2 +- hw/macio.c | 2 +- hw/megasas.c | 4 ++-- hw/mips_fulong2e.c | 2 +- hw/mips_malta.c | 2 +- hw/ne2000.c | 2 +- hw/openpic.c | 2 +- hw/pc.c | 4 ++-- hw/pc_piix.c | 4 ++-- hw/pci_bridge_dev.c | 12 ++++++------ hw/pcnet-pci.c | 2 +- hw/piix4.c | 2 +- hw/piix_pci.c | 4 ++-- hw/ppc/e500.c | 2 +- hw/ppc440_bamboo.c | 2 +- hw/ppc4xx.h | 2 +- hw/ppc4xx_pci.c | 4 ++-- hw/ppc_newworld.c | 2 +- hw/ppc_oldworld.c | 2 +- hw/ppc_prep.c | 4 ++-- hw/ppce500_pci.c | 4 ++-- hw/prep_pci.c | 4 ++-- hw/q35.h | 4 ++-- hw/qxl.h | 2 +- hw/r2d.c | 2 +- hw/realview.c | 2 +- hw/rtl8139.c | 2 +- hw/serial-pci.c | 2 +- hw/sga.c | 2 +- hw/sh_pci.c | 4 ++-- hw/smbus_ich9.c | 2 +- hw/spapr.c | 4 ++-- hw/spapr_pci.c | 10 +++++----- hw/spapr_pci.h | 4 ++-- hw/sun4u.c | 2 +- hw/unin_pci.c | 4 ++-- hw/usb/hcd-ehci-pci.c | 2 +- hw/usb/hcd-ohci.c | 2 +- hw/usb/hcd-uhci.c | 2 +- hw/usb/hcd-xhci.c | 6 +++--- hw/versatile_pci.c | 4 ++-- hw/versatilepb.c | 2 +- hw/vfio_pci.c | 6 +++--- hw/vga-pci.c | 2 +- hw/vga.c | 2 +- hw/virtio-balloon.h | 2 +- hw/virtio-net.h | 2 +- hw/virtio-pci.c | 6 +++--- hw/virtio-scsi.h | 2 +- hw/vmware_vga.c | 2 +- hw/vt82c686.c | 4 ++-- hw/wdt_i6300esb.c | 2 +- hw/xen-host-pci-device.h | 2 +- hw/xen_apic.c | 2 +- hw/xen_platform.c | 2 +- hw/xen_pt.c | 2 +- hw/xen_pt.h | 2 +- hw/xio3130_downstream.c | 6 +++--- hw/xio3130_downstream.h | 2 +- hw/xio3130_upstream.c | 6 +++--- hw/xio3130_upstream.h | 2 +- kvm-all.c | 2 +- kvm-stub.c | 2 +- monitor.c | 2 +- target-i386/kvm.c | 2 +- xen-all.c | 2 +- 102 files changed, 159 insertions(+), 159 deletions(-) diff --git a/arch_init.c b/arch_init.c index e6effe809a..e307b23310 100644 --- a/arch_init.c +++ b/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" diff --git a/hw/ac97.c b/hw/ac97.c index ce6a1dc609..3e659b38df 100644 --- a/hw/ac97.c +++ b/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 { diff --git a/hw/acpi_ich9.c b/hw/acpi_ich9.c index 85d441c33c..755fa050f7 100644 --- a/hw/acpi_ich9.c +++ b/hw/acpi_ich9.c @@ -25,7 +25,7 @@ */ #include "hw.h" #include "pc.h" -#include "pci.h" +#include "pci/pci.h" #include "qemu-timer.h" #include "sysemu.h" #include "acpi.h" diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index 0b5b0d3d3e..46f9843891 100644 --- a/hw/acpi_piix4.c +++ b/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" diff --git a/hw/alpha_sys.h b/hw/alpha_sys.h index 7604d09c80..b1e52585b3 100644 --- a/hw/alpha_sys.h +++ b/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" diff --git a/hw/apb_pci.c b/hw/apb_pci.c index 054814fd4b..de594f8c0b 100644 --- a/hw/apb_pci.c +++ b/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_internals.h" #include "apb_pci.h" #include "sysemu.h" #include "exec-memory.h" diff --git a/hw/apic.c b/hw/apic.c index f73fc877aa..d66a476aac 100644 --- a/hw/apic.c +++ b/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" diff --git a/hw/apm.c b/hw/apm.c index e988ad9939..2e1b1372d2 100644 --- a/hw/apm.c +++ b/hw/apm.c @@ -22,7 +22,7 @@ #include "apm.h" #include "hw.h" -#include "pci.h" +#include "pci/pci.h" //#define DEBUG diff --git a/hw/bonito.c b/hw/bonito.c index 0bf6d4aa5f..a1fc38c784 100644 --- a/hw/bonito.c +++ b/hw/bonito.c @@ -40,10 +40,10 @@ #include #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" diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c index 40efa8a523..7d021f2e1d 100644 --- a/hw/cirrus_vga.c +++ b/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" diff --git a/hw/dec_pci.c b/hw/dec_pci.c index c30ade38bd..a6a7c846fd 100644 --- a/hw/dec_pci.c +++ b/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_internals.h" /* debug DEC */ //#define DEBUG_DEC diff --git a/hw/e1000.c b/hw/e1000.c index 5537ad2fc4..c89c8d22ab 100644 --- a/hw/e1000.c +++ b/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" diff --git a/hw/eepro100.c b/hw/eepro100.c index a189474d31..992f03ace7 100644 --- a/hw/eepro100.c +++ b/hw/eepro100.c @@ -42,7 +42,7 @@ #include /* offsetof */ #include "hw.h" -#include "pci.h" +#include "pci/pci.h" #include "net.h" #include "eeprom93xx.h" #include "sysemu.h" diff --git a/hw/es1370.c b/hw/es1370.c index e0c9729dc9..65365788e1 100644 --- a/hw/es1370.c +++ b/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: diff --git a/hw/esp-pci.c b/hw/esp-pci.c index d9a8e59c98..d433473d6a 100644 --- a/hw/esp-pci.c +++ b/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" diff --git a/hw/grackle_pci.c b/hw/grackle_pci.c index 67da307284..948416632a 100644 --- a/hw/grackle_pci.c +++ b/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 diff --git a/hw/gt64xxx.c b/hw/gt64xxx.c index 95d491d932..5aa49c6148 100644 --- a/hw/gt64xxx.c +++ b/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" diff --git a/hw/hda-audio.c b/hw/hda-audio.c index 36761dd2de..92a91b5ab1 100644 --- a/hw/hda-audio.c +++ b/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" diff --git a/hw/i82378.c b/hw/i82378.c index 99f35d41ef..c6b0b5ec55 100644 --- a/hw/i82378.c +++ b/hw/i82378.c @@ -17,7 +17,7 @@ * License along with this library; if not, see . */ -#include "pci.h" +#include "pci/pci.h" #include "pc.h" #include "i8254.h" #include "pcspk.h" diff --git a/hw/i82801b11.c b/hw/i82801b11.c index 3d1f996b2f..3dc10000a4 100644 --- a/hw/i82801b11.c +++ b/hw/i82801b11.c @@ -41,7 +41,7 @@ * License along with this library; if not, see */ -#include "pci.h" +#include "pci/pci.h" #include "ich9.h" diff --git a/hw/ich9.h b/hw/ich9.h index 34e216f142..ddd12934d5 100644 --- a/hw/ich9.h +++ b/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_internals.h" void ich9_lpc_set_irq(void *opaque, int irq_num, int level); int ich9_lpc_map_irq(PCIDevice *pci_dev, int intx); diff --git a/hw/ide.h b/hw/ide.h index add742c4a8..081c710d56 100644 --- a/hw/ide.h +++ b/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 diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 67562db041..2ea64bd316 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -22,9 +22,9 @@ */ #include -#include +#include #include -#include +#include #include #include "monitor.h" diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c index 804db60ffe..88210eabc8 100644 --- a/hw/ide/cmd646.c +++ b/hw/ide/cmd646.c @@ -24,7 +24,7 @@ */ #include #include -#include +#include #include #include "block.h" #include "sysemu.h" diff --git a/hw/ide/core.c b/hw/ide/core.c index c4f93d0e47..adc4aa41b9 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -24,7 +24,7 @@ */ #include #include -#include +#include #include #include "qemu-error.h" #include "qemu-timer.h" diff --git a/hw/ide/ich.c b/hw/ide/ich.c index 272b7734b5..8e1a48e257 100644 --- a/hw/ide/ich.c +++ b/hw/ide/ich.c @@ -61,9 +61,9 @@ */ #include -#include +#include #include -#include +#include #include #include "block.h" #include "dma.h" diff --git a/hw/ide/pci.c b/hw/ide/pci.c index bcdd70e450..23a0e237fb 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -24,7 +24,7 @@ */ #include #include -#include +#include #include #include "block.h" #include "dma.h" diff --git a/hw/ide/piix.c b/hw/ide/piix.c index 9431badadf..5cf39cf8f0 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include "blockdev.h" #include "sysemu.h" diff --git a/hw/ide/via.c b/hw/ide/via.c index efda1733d9..8b4a24e5c2 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -25,7 +25,7 @@ */ #include #include -#include +#include #include #include "block.h" #include "sysemu.h" diff --git a/hw/intel-hda.c b/hw/intel-hda.c index a68c3685e3..c21bf7204a 100644 --- a/hw/intel-hda.c +++ b/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" diff --git a/hw/ioh3420.c b/hw/ioh3420.c index 4d314733b9..d706e195df 100644 --- a/hw/ioh3420.c +++ b/hw/ioh3420.c @@ -20,9 +20,9 @@ * with this program; if not, see . */ -#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 */ diff --git a/hw/ioh3420.h b/hw/ioh3420.h index 68c523ab46..046cf2c281 100644 --- a/hw/ioh3420.h +++ b/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, diff --git a/hw/ivshmem.c b/hw/ivshmem.c index f6dbb212f2..cf64f32ac0 100644 --- a/hw/ivshmem.c +++ b/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" diff --git a/hw/kvm/apic.c b/hw/kvm/apic.c index 8b65d513db..beb418de8d 100644 --- a/hw/kvm/apic.c +++ b/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, diff --git a/hw/kvm/pci-assign.c b/hw/kvm/pci-assign.c index e80dad009c..42291592e3 100644 --- a/hw/kvm/pci-assign.c +++ b/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 diff --git a/hw/lpc_ich9.c b/hw/lpc_ich9.c index 7a113633ed..811bf261c3 100644 --- a/hw/lpc_ich9.c +++ b/hw/lpc_ich9.c @@ -35,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_internals.h" #include "exec-memory.h" #include "sysemu.h" diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c index 04f2faef42..4aac9a0cff 100644 --- a/hw/lsi53c895a.c +++ b/hw/lsi53c895a.c @@ -13,7 +13,7 @@ #include #include "hw.h" -#include "pci.h" +#include "pci/pci.h" #include "scsi.h" #include "dma.h" diff --git a/hw/macio.c b/hw/macio.c index eb15b890b1..362afdc7ec 100644 --- a/hw/macio.c +++ b/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 diff --git a/hw/megasas.c b/hw/megasas.c index 61b6527928..f4fbe9790a 100644 --- a/hw/megasas.c +++ b/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" diff --git a/hw/mips_fulong2e.c b/hw/mips_fulong2e.c index 5fcf900e04..d5cf33b4b6 100644 --- a/hw/mips_fulong2e.c +++ b/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" diff --git a/hw/mips_malta.c b/hw/mips_malta.c index 4d2464a02c..571903dfc5 100644 --- a/hw/mips_malta.c +++ b/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" diff --git a/hw/ne2000.c b/hw/ne2000.c index d3dd9a6f26..fb78e5b252 100644 --- a/hw/ne2000.c +++ b/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" diff --git a/hw/openpic.c b/hw/openpic.c index 8b3784a6bd..4791dc6eaf 100644 --- a/hw/openpic.c +++ b/hw/openpic.c @@ -35,7 +35,7 @@ */ #include "hw.h" #include "ppc_mac.h" -#include "pci.h" +#include "pci/pci.h" #include "openpic.h" //#define DEBUG_OPENPIC diff --git a/hw/pc.c b/hw/pc.c index b11e7c4adc..d1b102c879 100644 --- a/hw/pc.c +++ b/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" diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 19e342aeb4..c2b4cb07e5 100644 --- a/hw/pc_piix.c +++ b/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" diff --git a/hw/pci_bridge_dev.c b/hw/pci_bridge_dev.c index f7063961a0..5c9fc5036b 100644 --- a/hw/pci_bridge_dev.c +++ b/hw/pci_bridge_dev.c @@ -19,13 +19,13 @@ * with this program; if not, see . */ -#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_internals.h" #define REDHAT_PCI_VENDOR_ID 0x1b36 #define PCI_BRIDGE_DEV_VENDOR_ID REDHAT_PCI_VENDOR_ID diff --git a/hw/pcnet-pci.c b/hw/pcnet-pci.c index 0bf438ffee..c1abbf8d0d 100644 --- a/hw/pcnet-pci.c +++ b/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" diff --git a/hw/piix4.c b/hw/piix4.c index ce4eb0d1ae..799ed1729c 100644 --- a/hw/piix4.c +++ b/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" diff --git a/hw/piix_pci.c b/hw/piix_pci.c index ba1b3de749..b5ea68bc61 100644 --- a/hw/piix_pci.c +++ b/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" diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 6749ffffb3..f77c488af7 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -20,7 +20,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" diff --git a/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c index cc85607cb7..0b39a81ec5 100644 --- a/hw/ppc440_bamboo.c +++ b/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" diff --git a/hw/ppc4xx.h b/hw/ppc4xx.h index d795ced57e..2b96d47f36 100644 --- a/hw/ppc4xx.h +++ b/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, diff --git a/hw/ppc4xx_pci.c b/hw/ppc4xx_pci.c index d3ad6a0b79..3e8af11f08 100644 --- a/hw/ppc4xx_pci.c +++ b/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 diff --git a/hw/ppc_newworld.c b/hw/ppc_newworld.c index 664747ead3..c1ff9d7c31 100644 --- a/hw/ppc_newworld.c +++ b/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" diff --git a/hw/ppc_oldworld.c b/hw/ppc_oldworld.c index e8138c091e..3bc29c619c 100644 --- a/hw/ppc_oldworld.c +++ b/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" diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c index bf15730d8b..f6ffb593b7 100644 --- a/hw/ppc_prep.c +++ b/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" diff --git a/hw/ppce500_pci.c b/hw/ppce500_pci.c index 2ff7438d09..39022aada0 100644 --- a/hw/ppce500_pci.c +++ b/hw/ppce500_pci.c @@ -15,8 +15,8 @@ */ #include "hw.h" -#include "pci.h" -#include "pci_host.h" +#include "pci/pci.h" +#include "pci/pci_host.h" #include "bswap.h" #ifdef DEBUG_PCI diff --git a/hw/prep_pci.c b/hw/prep_pci.c index 0bc479cd1f..5f22de647a 100644 --- a/hw/prep_pci.c +++ b/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" diff --git a/hw/q35.h b/hw/q35.h index e34f7c165f..2f951c8a94 100644 --- a/hw/q35.h +++ b/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" diff --git a/hw/qxl.h b/hw/qxl.h index e583cfb750..41246c7554 100644 --- a/hw/qxl.h +++ b/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" diff --git a/hw/r2d.c b/hw/r2d.c index 66212e9cda..e18c23b28b 100644 --- a/hw/r2d.c +++ b/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" diff --git a/hw/realview.c b/hw/realview.c index e789c159a9..149bb562af 100644 --- a/hw/realview.c +++ b/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" diff --git a/hw/rtl8139.c b/hw/rtl8139.c index e3aa8bfb11..e294a2a5e3 100644 --- a/hw/rtl8139.c +++ b/hw/rtl8139.c @@ -52,7 +52,7 @@ #include #include "hw.h" -#include "pci.h" +#include "pci/pci.h" #include "dma.h" #include "qemu-timer.h" #include "net.h" diff --git a/hw/serial-pci.c b/hw/serial-pci.c index 95dc5c8d2f..6a2548a515 100644 --- a/hw/serial-pci.c +++ b/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 diff --git a/hw/sga.c b/hw/sga.c index a666349f82..5d80efd0c2 100644 --- a/hw/sga.c +++ b/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" diff --git a/hw/sh_pci.c b/hw/sh_pci.c index fdec71b9e8..9ea08c8f8e 100644 --- a/hw/sh_pci.c +++ b/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" diff --git a/hw/smbus_ich9.c b/hw/smbus_ich9.c index d202664a36..b7bddc80d3 100644 --- a/hw/smbus_ich9.c +++ b/hw/smbus_ich9.c @@ -27,7 +27,7 @@ #include "hw.h" #include "pc.h" #include "pm_smbus.h" -#include "pci.h" +#include "pci/pci.h" #include "sysemu.h" #include "i2c.h" #include "smbus.h" diff --git a/hw/spapr.c b/hw/spapr.c index ad3f0ea7fc..b0125a892c 100644 --- a/hw/spapr.c +++ b/hw/spapr.c @@ -41,11 +41,11 @@ #include "hw/spapr_vio.h" #include "hw/spapr_pci.h" #include "hw/xics.h" -#include "hw/msi.h" +#include "hw/pci/msi.h" #include "kvm.h" #include "kvm_ppc.h" -#include "pci.h" +#include "pci/pci.h" #include "exec-memory.h" #include "hw/usb.h" diff --git a/hw/spapr_pci.c b/hw/spapr_pci.c index 3c5b855bc0..2386164d5d 100644 --- a/hw/spapr_pci.c +++ b/hw/spapr_pci.c @@ -23,17 +23,17 @@ * THE SOFTWARE. */ #include "hw.h" -#include "pci.h" -#include "msi.h" -#include "msix.h" -#include "pci_host.h" +#include "pci/pci.h" +#include "pci/msi.h" +#include "pci/msix.h" +#include "pci/pci_host.h" #include "hw/spapr.h" #include "hw/spapr_pci.h" #include "exec-memory.h" #include #include "trace.h" -#include "hw/pci_internals.h" +#include "hw/pci/pci_internals.h" /* Copied from the kernel arch/powerpc/platforms/pseries/msi.c */ #define RTAS_QUERY_FN 0 diff --git a/hw/spapr_pci.h b/hw/spapr_pci.h index e307ac8035..7b26ba1561 100644 --- a/hw/spapr_pci.h +++ b/hw/spapr_pci.h @@ -23,8 +23,8 @@ #if !defined(__HW_SPAPR_PCI_H__) #define __HW_SPAPR_PCI_H__ -#include "hw/pci.h" -#include "hw/pci_host.h" +#include "hw/pci/pci.h" +#include "hw/pci/pci_host.h" #include "hw/xics.h" #define SPAPR_MSIX_MAX_DEVS 32 diff --git a/hw/sun4u.c b/hw/sun4u.c index b2b51e30c2..47bcf9382d 100644 --- a/hw/sun4u.c +++ b/hw/sun4u.c @@ -22,7 +22,7 @@ * THE SOFTWARE. */ #include "hw.h" -#include "pci.h" +#include "pci/pci.h" #include "apb_pci.h" #include "pc.h" #include "serial.h" diff --git a/hw/unin_pci.c b/hw/unin_pci.c index 9981d949d2..46757924b6 100644 --- a/hw/unin_pci.c +++ b/hw/unin_pci.c @@ -23,8 +23,8 @@ */ #include "hw.h" #include "ppc_mac.h" -#include "pci.h" -#include "pci_host.h" +#include "pci/pci.h" +#include "pci/pci_host.h" /* debug UniNorth */ //#define DEBUG_UNIN diff --git a/hw/usb/hcd-ehci-pci.c b/hw/usb/hcd-ehci-pci.c index 41dbb539f2..8b043966f6 100644 --- a/hw/usb/hcd-ehci-pci.c +++ b/hw/usb/hcd-ehci-pci.c @@ -16,7 +16,7 @@ */ #include "hw/usb/hcd-ehci.h" -#include "hw/pci.h" +#include "hw/pci/pci.h" #include "range.h" typedef struct EHCIPCIState { diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index e16a2ecab4..4faf8e1aed 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@ -29,7 +29,7 @@ #include "hw/hw.h" #include "qemu-timer.h" #include "hw/usb.h" -#include "hw/pci.h" +#include "hw/pci/pci.h" #include "hw/sysbus.h" #include "hw/qdev-dma.h" diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index d053791de0..04c944613c 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -27,7 +27,7 @@ */ #include "hw/hw.h" #include "hw/usb.h" -#include "hw/pci.h" +#include "hw/pci/pci.h" #include "qemu-timer.h" #include "iov.h" #include "dma.h" diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index efb509e423..220c3b536a 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -21,9 +21,9 @@ #include "hw/hw.h" #include "qemu-timer.h" #include "hw/usb.h" -#include "hw/pci.h" -#include "hw/msi.h" -#include "hw/msix.h" +#include "hw/pci/pci.h" +#include "hw/pci/msi.h" +#include "hw/pci/msix.h" #include "trace.h" //#define DEBUG_XHCI diff --git a/hw/versatile_pci.c b/hw/versatile_pci.c index e0c3ee36a5..7a543b47d0 100644 --- a/hw/versatile_pci.c +++ b/hw/versatile_pci.c @@ -8,8 +8,8 @@ */ #include "sysbus.h" -#include "pci.h" -#include "pci_host.h" +#include "pci/pci.h" +#include "pci/pci_host.h" #include "exec-memory.h" typedef struct { diff --git a/hw/versatilepb.c b/hw/versatilepb.c index 25e652b1aa..41e39d8fb9 100644 --- a/hw/versatilepb.c +++ b/hw/versatilepb.c @@ -12,7 +12,7 @@ #include "devices.h" #include "net.h" #include "sysemu.h" -#include "pci.h" +#include "pci/pci.h" #include "i2c.h" #include "boards.h" #include "blockdev.h" diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index 7c27834e06..45d90ab490 100644 --- a/hw/vfio_pci.c +++ b/hw/vfio_pci.c @@ -31,9 +31,9 @@ #include "exec-memory.h" #include "kvm.h" #include "memory.h" -#include "msi.h" -#include "msix.h" -#include "pci.h" +#include "pci/msi.h" +#include "pci/msix.h" +#include "pci/pci.h" #include "qemu-common.h" #include "qemu-error.h" #include "qemu-queue.h" diff --git a/hw/vga-pci.c b/hw/vga-pci.c index 947e35c76f..0cb318eab6 100644 --- a/hw/vga-pci.c +++ b/hw/vga-pci.c @@ -25,7 +25,7 @@ */ #include "hw.h" #include "console.h" -#include "pci.h" +#include "pci/pci.h" #include "vga_int.h" #include "pixel_ops.h" #include "qemu-timer.h" diff --git a/hw/vga.c b/hw/vga.c index 2b0200a164..6d56f8a5d9 100644 --- a/hw/vga.c +++ b/hw/vga.c @@ -25,7 +25,7 @@ #include "vga.h" #include "console.h" #include "pc.h" -#include "pci.h" +#include "pci/pci.h" #include "vga_int.h" #include "pixel_ops.h" #include "qemu-timer.h" diff --git a/hw/virtio-balloon.h b/hw/virtio-balloon.h index 73300ddc86..b1828f4a48 100644 --- a/hw/virtio-balloon.h +++ b/hw/virtio-balloon.h @@ -16,7 +16,7 @@ #define _QEMU_VIRTIO_BALLOON_H #include "virtio.h" -#include "pci.h" +#include "pci/pci.h" /* from Linux's linux/virtio_balloon.h */ diff --git a/hw/virtio-net.h b/hw/virtio-net.h index 36aa463812..b13be7ccb5 100644 --- a/hw/virtio-net.h +++ b/hw/virtio-net.h @@ -16,7 +16,7 @@ #include "virtio.h" #include "net.h" -#include "pci.h" +#include "pci/pci.h" #define ETH_ALEN 6 diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index 71f4fb5dc6..e9b722dd96 100644 --- a/hw/virtio-pci.c +++ b/hw/virtio-pci.c @@ -22,10 +22,10 @@ #include "virtio-net.h" #include "virtio-serial.h" #include "virtio-scsi.h" -#include "pci.h" +#include "pci/pci.h" #include "qemu-error.h" -#include "msi.h" -#include "msix.h" +#include "pci/msi.h" +#include "pci/msix.h" #include "net.h" #include "loader.h" #include "kvm.h" diff --git a/hw/virtio-scsi.h b/hw/virtio-scsi.h index 91924f6dfc..7d7cba752d 100644 --- a/hw/virtio-scsi.h +++ b/hw/virtio-scsi.h @@ -16,7 +16,7 @@ #include "virtio.h" #include "net.h" -#include "pci.h" +#include "pci/pci.h" /* The ID for virtio_scsi */ #define VIRTIO_ID_SCSI 8 diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c index 834588daf6..333ec8cebe 100644 --- a/hw/vmware_vga.c +++ b/hw/vmware_vga.c @@ -24,7 +24,7 @@ #include "hw.h" #include "loader.h" #include "console.h" -#include "pci.h" +#include "pci/pci.h" #undef VERBOSE #define HW_RECT_ACCEL diff --git a/hw/vt82c686.c b/hw/vt82c686.c index 57d16c0134..f963912112 100644 --- a/hw/vt82c686.c +++ b/hw/vt82c686.c @@ -15,7 +15,7 @@ #include "vt82c686.h" #include "i2c.h" #include "smbus.h" -#include "pci.h" +#include "pci/pci.h" #include "isa.h" #include "sysbus.h" #include "mips.h" @@ -27,7 +27,7 @@ #include "exec-memory.h" typedef uint32_t pci_addr_t; -#include "pci_host.h" +#include "pci/pci_host.h" //#define DEBUG_VT82C686B #ifdef DEBUG_VT82C686B diff --git a/hw/wdt_i6300esb.c b/hw/wdt_i6300esb.c index da15c73918..181774220d 100644 --- a/hw/wdt_i6300esb.c +++ b/hw/wdt_i6300esb.c @@ -25,7 +25,7 @@ #include "qemu-timer.h" #include "watchdog.h" #include "hw.h" -#include "pci.h" +#include "pci/pci.h" /*#define I6300ESB_DEBUG 1*/ diff --git a/hw/xen-host-pci-device.h b/hw/xen-host-pci-device.h index 0079daca51..942b24dccc 100644 --- a/hw/xen-host-pci-device.h +++ b/hw/xen-host-pci-device.h @@ -1,7 +1,7 @@ #ifndef XEN_HOST_PCI_DEVICE_H #define XEN_HOST_PCI_DEVICE_H -#include "pci.h" +#include "pci/pci.h" enum { XEN_HOST_PCI_REGION_TYPE_IO = 1 << 1, diff --git a/hw/xen_apic.c b/hw/xen_apic.c index fc4536651a..a6632fe798 100644 --- a/hw/xen_apic.c +++ b/hw/xen_apic.c @@ -10,7 +10,7 @@ * later. See the COPYING file in the top-level directory. */ #include "hw/apic_internal.h" -#include "hw/msi.h" +#include "hw/pci/msi.h" #include "xen.h" static uint64_t xen_apic_mem_read(void *opaque, hwaddr addr, diff --git a/hw/xen_platform.c b/hw/xen_platform.c index a54e7a2cdb..10bb560073 100644 --- a/hw/xen_platform.c +++ b/hw/xen_platform.c @@ -27,7 +27,7 @@ #include "hw.h" #include "pc.h" -#include "pci.h" +#include "pci/pci.h" #include "irq.h" #include "xen_common.h" #include "net.h" diff --git a/hw/xen_pt.c b/hw/xen_pt.c index 7a3846e649..c782cdb283 100644 --- a/hw/xen_pt.c +++ b/hw/xen_pt.c @@ -54,7 +54,7 @@ #include -#include "pci.h" +#include "pci/pci.h" #include "xen.h" #include "xen_backend.h" #include "xen_pt.h" diff --git a/hw/xen_pt.h b/hw/xen_pt.h index f15e69a290..e3497302cf 100644 --- a/hw/xen_pt.h +++ b/hw/xen_pt.h @@ -3,7 +3,7 @@ #include "qemu-common.h" #include "xen_common.h" -#include "pci.h" +#include "pci/pci.h" #include "xen-host-pci-device.h" void xen_pt_log(const PCIDevice *d, const char *f, ...) GCC_FMT_ATTR(2, 3); diff --git a/hw/xio3130_downstream.c b/hw/xio3130_downstream.c index 0d8a5e7020..2dcd46bff1 100644 --- a/hw/xio3130_downstream.c +++ b/hw/xio3130_downstream.c @@ -19,9 +19,9 @@ * with this program; if not, see . */ -#include "pci_ids.h" -#include "msi.h" -#include "pcie.h" +#include "pci/pci_ids.h" +#include "pci/msi.h" +#include "pci/pcie.h" #include "xio3130_downstream.h" #define PCI_DEVICE_ID_TI_XIO3130D 0x8233 /* downstream port */ diff --git a/hw/xio3130_downstream.h b/hw/xio3130_downstream.h index 010487f2d9..559dff6565 100644 --- a/hw/xio3130_downstream.h +++ b/hw/xio3130_downstream.h @@ -1,7 +1,7 @@ #ifndef QEMU_XIO3130_DOWNSTREAM_H #define QEMU_XIO3130_DOWNSTREAM_H -#include "pcie_port.h" +#include "pci/pcie_port.h" PCIESlot *xio3130_downstream_init(PCIBus *bus, int devfn, bool multifunction, const char *bus_name, pci_map_irq_fn map_irq, diff --git a/hw/xio3130_upstream.c b/hw/xio3130_upstream.c index d46b86c74d..713caf2dda 100644 --- a/hw/xio3130_upstream.c +++ b/hw/xio3130_upstream.c @@ -19,9 +19,9 @@ * with this program; if not, see . */ -#include "pci_ids.h" -#include "msi.h" -#include "pcie.h" +#include "pci/pci_ids.h" +#include "pci/msi.h" +#include "pci/pcie.h" #include "xio3130_upstream.h" #define PCI_DEVICE_ID_TI_XIO3130U 0x8232 /* upstream port */ diff --git a/hw/xio3130_upstream.h b/hw/xio3130_upstream.h index e9969975ff..fa09656b35 100644 --- a/hw/xio3130_upstream.h +++ b/hw/xio3130_upstream.h @@ -1,7 +1,7 @@ #ifndef QEMU_XIO3130_UPSTREAM_H #define QEMU_XIO3130_UPSTREAM_H -#include "pcie_port.h" +#include "pci/pcie_port.h" PCIEPort *xio3130_upstream_init(PCIBus *bus, int devfn, bool multifunction, const char *bus_name, pci_map_irq_fn map_irq, diff --git a/kvm-all.c b/kvm-all.c index 8e9a8d8fd2..bfa09ad05b 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -26,7 +26,7 @@ #include "qemu-config.h" #include "sysemu.h" #include "hw/hw.h" -#include "hw/msi.h" +#include "hw/pci/msi.h" #include "gdbstub.h" #include "kvm.h" #include "bswap.h" diff --git a/kvm-stub.c b/kvm-stub.c index a3455e2203..d65fd04507 100644 --- a/kvm-stub.c +++ b/kvm-stub.c @@ -12,7 +12,7 @@ #include "qemu-common.h" #include "hw/hw.h" -#include "hw/msi.h" +#include "hw/pci/msi.h" #include "cpu.h" #include "gdbstub.h" #include "kvm.h" diff --git a/monitor.c b/monitor.c index c0e32d60c3..a92ab44384 100644 --- a/monitor.c +++ b/monitor.c @@ -27,7 +27,7 @@ #include "hw/usb.h" #include "hw/pcmcia.h" #include "hw/pc.h" -#include "hw/pci.h" +#include "hw/pci/pci.h" #include "hw/watchdog.h" #include "hw/loader.h" #include "gdbstub.h" diff --git a/target-i386/kvm.c b/target-i386/kvm.c index f669281e13..0901589a88 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -31,7 +31,7 @@ #include "hw/apic.h" #include "ioport.h" #include "hyperv.h" -#include "hw/pci.h" +#include "hw/pci/pci.h" //#define DEBUG_KVM diff --git a/xen-all.c b/xen-all.c index 046cc2ac37..e3a51ccc81 100644 --- a/xen-all.c +++ b/xen-all.c @@ -10,7 +10,7 @@ #include -#include "hw/pci.h" +#include "hw/pci/pci.h" #include "hw/pc.h" #include "hw/xen_common.h" #include "hw/xen_backend.h" From c759b24fae08c6c333df03e1db48e13b7f5eda30 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Wed, 12 Dec 2012 23:05:42 +0200 Subject: [PATCH 08/13] pci: fix path for local includes Include dependencies from pci core using the correct path. This is required now that it's in the separate directory. Need to check whether they can be minimized, for now, keep the code as is. Signed-off-by: Michael S. Tsirkin --- hw/pci/msi.c | 2 +- hw/pci/msi.h | 2 +- hw/pci/msix.c | 8 ++++---- hw/pci/msix.h | 2 +- hw/pci/pci-hotplug.c | 12 ++++++------ hw/pci/pci-stub.c | 2 +- hw/pci/pci.c | 14 +++++++------- hw/pci/pci.h | 10 +++++----- hw/pci/pci_bridge.c | 4 ++-- hw/pci/pci_bridge.h | 2 +- hw/pci/pci_host.c | 4 ++-- hw/pci/pci_host.h | 2 +- hw/pci/pcie.c | 12 ++++++------ hw/pci/pcie.h | 8 ++++---- hw/pci/pcie_aer.c | 12 ++++++------ hw/pci/pcie_aer.h | 2 +- hw/pci/pcie_host.c | 6 +++--- hw/pci/pcie_host.h | 2 +- hw/pci/pcie_port.c | 2 +- hw/pci/pcie_port.h | 4 ++-- hw/pci/shpc.c | 8 ++++---- hw/pci/slotid_cap.c | 4 ++-- 22 files changed, 62 insertions(+), 62 deletions(-) diff --git a/hw/pci/msi.c b/hw/pci/msi.c index 33037a80e9..680e4637d7 100644 --- a/hw/pci/msi.c +++ b/hw/pci/msi.c @@ -18,7 +18,7 @@ * with this program; if not, see . */ -#include "msi.h" +#include "hw/pci/msi.h" #include "range.h" /* Eventually those constants should go to Linux pci_regs.h */ diff --git a/hw/pci/msi.h b/hw/pci/msi.h index 150b09a19d..81a3848a31 100644 --- a/hw/pci/msi.h +++ b/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; diff --git a/hw/pci/msix.c b/hw/pci/msix.c index 136ef09373..917327bfe6 100644 --- a/hw/pci/msix.c +++ b/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 diff --git a/hw/pci/msix.h b/hw/pci/msix.h index 15211cb592..ff07ae2e8f 100644 --- a/hw/pci/msix.h +++ b/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, diff --git a/hw/pci/pci-hotplug.c b/hw/pci/pci-hotplug.c index 3bcfdcc1a6..4b4c931c74 100644 --- a/hw/pci/pci-hotplug.c +++ b/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" diff --git a/hw/pci/pci-stub.c b/hw/pci/pci-stub.c index 134c4484b6..b5c43a935b 100644 --- a/hw/pci/pci-stub.c +++ b/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) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 97a0cd77c1..c107fe2232 100644 --- a/hw/pci/pci.c +++ b/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_internals.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 diff --git a/hw/pci/pci.h b/hw/pci/pci.h index 4da0c2a4c9..41e5ddd1c4 100644 --- a/hw/pci/pci.h +++ b/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 diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c index 4680501e4e..eb6b70bb64 100644 --- a/hw/pci/pci_bridge.c +++ b/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_internals.h" #include "range.h" /* PCI bridge subsystem vendor ID helper functions */ diff --git a/hw/pci/pci_bridge.h b/hw/pci/pci_bridge.h index a00accc172..455cb6677a 100644 --- a/hw/pci/pci_bridge.h +++ b/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); diff --git a/hw/pci/pci_host.c b/hw/pci/pci_host.c index 68e328cd23..daca1c1ea0 100644 --- a/hw/pci/pci_host.c +++ b/hw/pci/pci_host.c @@ -18,8 +18,8 @@ * with this program; if not, see . */ -#include "pci.h" -#include "pci_host.h" +#include "hw/pci/pci.h" +#include "hw/pci/pci_host.h" /* debug PCI */ //#define DEBUG_PCI diff --git a/hw/pci/pci_host.h b/hw/pci/pci_host.h index 4b9c300fcf..1845d4dfd5 100644 --- a/hw/pci/pci_host.h +++ b/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) \ diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index 7c92f193e7..b98adbf87a 100644 --- a/hw/pci/pcie.c +++ b/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_internals.h" +#include "hw/pci/pcie_regs.h" #include "range.h" //#define DEBUG_PCIE diff --git a/hw/pci/pcie.h b/hw/pci/pcie.h index 4889194ae6..31604e2742 100644 --- a/hw/pci/pcie.h +++ b/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 */ diff --git a/hw/pci/pcie_aer.c b/hw/pci/pcie_aer.c index b04c164e22..3026b66916 100644 --- a/hw/pci/pcie_aer.c +++ b/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_internals.h" +#include "hw/pci/pcie_regs.h" //#define DEBUG_PCIE #ifdef DEBUG_PCIE diff --git a/hw/pci/pcie_aer.h b/hw/pci/pcie_aer.h index 7539500cd8..bcac80a7b0 100644 --- a/hw/pci/pcie_aer.h +++ b/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 */ diff --git a/hw/pci/pcie_host.c b/hw/pci/pcie_host.c index c257fb43ca..ab8d251de6 100644 --- a/hw/pci/pcie_host.c +++ b/hw/pci/pcie_host.c @@ -19,9 +19,9 @@ * with this program; if not, see . */ -#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" /* diff --git a/hw/pci/pcie_host.h b/hw/pci/pcie_host.h index 392193530d..150bef9736 100644 --- a/hw/pci/pcie_host.h +++ b/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" diff --git a/hw/pci/pcie_port.c b/hw/pci/pcie_port.c index d6350e5e73..33a6b0a08a 100644 --- a/hw/pci/pcie_port.c +++ b/hw/pci/pcie_port.c @@ -18,7 +18,7 @@ * with this program; if not, see . */ -#include "pcie_port.h" +#include "hw/pci/pcie_port.h" void pcie_port_init_reg(PCIDevice *d) { diff --git a/hw/pci/pcie_port.h b/hw/pci/pcie_port.h index 3709583cc0..3259e6a9b9 100644 --- a/hw/pci/pcie_port.h +++ b/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_internals.h" struct PCIEPort { PCIBridge br; diff --git a/hw/pci/shpc.c b/hw/pci/shpc.c index 4597bbde75..38693f759f 100644 --- a/hw/pci/shpc.c +++ b/hw/pci/shpc.c @@ -2,10 +2,10 @@ #include #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_internals.h" +#include "hw/pci/msi.h" /* TODO: model power only and disabled slot states. */ /* TODO: handle SERR and wakeups */ diff --git a/hw/pci/slotid_cap.c b/hw/pci/slotid_cap.c index 01064521a9..99a30f429d 100644 --- a/hw/pci/slotid_cap.c +++ b/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) From d9fb58054825ef141e6d03f455654b2e3e767bce Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Wed, 12 Dec 2012 14:39:01 +0200 Subject: [PATCH 09/13] Revert "pci: prepare makefiles for pci code reorganization" This reverts commit 475d67c3bcd6ba9fef917b6e59d96ae69eb1a9b4. Now that all users have been updated, we don't need the makefile hack or the softlink anymore. Signed-off-by: Michael S. Tsirkin --- Makefile | 1 - Makefile.target | 1 - Makefile.user | 1 - hw/pci/hw | 1 - 4 files changed, 4 deletions(-) delete mode 120000 hw/pci/hw diff --git a/Makefile b/Makefile index b9a81d18a2..9ecbcbb0a7 100644 --- a/Makefile +++ b/Makefile @@ -146,7 +146,6 @@ audio/audio.o audio/fmodaudio.o: QEMU_CFLAGS += $(FMOD_CFLAGS) QEMU_CFLAGS+=$(CURL_CFLAGS) QEMU_CFLAGS += -I$(SRC_PATH)/include -QEMU_CFLAGS+=-I$(SRC_PATH)/hw/pci -I$(SRC_PATH)/hw ui/cocoa.o: ui/cocoa.m diff --git a/Makefile.target b/Makefile.target index fe2cc0d8b0..927347bac2 100644 --- a/Makefile.target +++ b/Makefile.target @@ -12,7 +12,6 @@ endif QEMU_CFLAGS += -I.. -I$(SRC_PATH)/target-$(TARGET_BASE_ARCH) -DNEED_CPU_H QEMU_CFLAGS+=-I$(SRC_PATH)/include -QEMU_CFLAGS+=-I$(SRC_PATH)/hw/pci -I$(SRC_PATH)/hw ifdef CONFIG_USER_ONLY # user emulator name diff --git a/Makefile.user b/Makefile.user index 045ecd3bea..9302d33245 100644 --- a/Makefile.user +++ b/Makefile.user @@ -11,7 +11,6 @@ $(call set-vpath, $(SRC_PATH)) QEMU_CFLAGS+=-I.. QEMU_CFLAGS += -I$(SRC_PATH)/include QEMU_CFLAGS += -DCONFIG_USER_ONLY -QEMU_CFLAGS+=-I$(SRC_PATH)/hw/pci -I$(SRC_PATH)/hw include $(SRC_PATH)/Makefile.objs diff --git a/hw/pci/hw b/hw/pci/hw deleted file mode 120000 index 945c9b46d6..0000000000 --- a/hw/pci/hw +++ /dev/null @@ -1 +0,0 @@ -. \ No newline at end of file From 06aac7bd50cd934f416fe355633c045fee832905 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Wed, 12 Dec 2012 15:00:45 +0200 Subject: [PATCH 10/13] pci: rename pci_internals.h pci_bus.h There are lots of external users of pci_internals.h, apparently making it an internal interface only didn't work out. Let's stop pretending it's an internal header. Signed-off-by: Michael S. Tsirkin --- hw/apb_pci.c | 2 +- hw/dec_pci.c | 2 +- hw/ich9.h | 2 +- hw/lpc_ich9.c | 2 +- hw/pci/pci.c | 2 +- hw/pci/pci_bridge.c | 2 +- hw/pci/{pci_internals.h => pci_bus.h} | 0 hw/pci/pcie.c | 2 +- hw/pci/pcie_aer.c | 2 +- hw/pci/pcie_port.h | 2 +- hw/pci/shpc.c | 2 +- hw/pci_bridge_dev.c | 2 +- hw/spapr_pci.c | 2 +- 13 files changed, 12 insertions(+), 12 deletions(-) rename hw/pci/{pci_internals.h => pci_bus.h} (100%) diff --git a/hw/apb_pci.c b/hw/apb_pci.c index de594f8c0b..fb7a07de37 100644 --- a/hw/apb_pci.c +++ b/hw/apb_pci.c @@ -30,7 +30,7 @@ #include "pci/pci.h" #include "pci/pci_host.h" #include "pci/pci_bridge.h" -#include "pci/pci_internals.h" +#include "pci/pci_bus.h" #include "apb_pci.h" #include "sysemu.h" #include "exec-memory.h" diff --git a/hw/dec_pci.c b/hw/dec_pci.c index a6a7c846fd..ee3f4ca834 100644 --- a/hw/dec_pci.c +++ b/hw/dec_pci.c @@ -28,7 +28,7 @@ #include "pci/pci.h" #include "pci/pci_host.h" #include "pci/pci_bridge.h" -#include "pci/pci_internals.h" +#include "pci/pci_bus.h" /* debug DEC */ //#define DEBUG_DEC diff --git a/hw/ich9.h b/hw/ich9.h index ddd12934d5..5c73f94caf 100644 --- a/hw/ich9.h +++ b/hw/ich9.h @@ -14,7 +14,7 @@ #include "acpi.h" #include "acpi_ich9.h" #include "pam.h" -#include "pci/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); diff --git a/hw/lpc_ich9.c b/hw/lpc_ich9.c index 811bf261c3..30505789f8 100644 --- a/hw/lpc_ich9.c +++ b/hw/lpc_ich9.c @@ -42,7 +42,7 @@ #include "acpi.h" #include "acpi_ich9.h" #include "pam.h" -#include "pci/pci_internals.h" +#include "pci/pci_bus.h" #include "exec-memory.h" #include "sysemu.h" diff --git a/hw/pci/pci.c b/hw/pci/pci.c index c107fe2232..2e455e22d2 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -24,7 +24,7 @@ #include "hw/hw.h" #include "hw/pci/pci.h" #include "hw/pci/pci_bridge.h" -#include "hw/pci/pci_internals.h" +#include "hw/pci/pci_bus.h" #include "monitor.h" #include "net.h" #include "sysemu.h" diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c index eb6b70bb64..131091408d 100644 --- a/hw/pci/pci_bridge.c +++ b/hw/pci/pci_bridge.c @@ -30,7 +30,7 @@ */ #include "hw/pci/pci_bridge.h" -#include "hw/pci/pci_internals.h" +#include "hw/pci/pci_bus.h" #include "range.h" /* PCI bridge subsystem vendor ID helper functions */ diff --git a/hw/pci/pci_internals.h b/hw/pci/pci_bus.h similarity index 100% rename from hw/pci/pci_internals.h rename to hw/pci/pci_bus.h diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index b98adbf87a..b60a6faaf3 100644 --- a/hw/pci/pcie.c +++ b/hw/pci/pcie.c @@ -23,7 +23,7 @@ #include "hw/pci/pcie.h" #include "hw/pci/msix.h" #include "hw/pci/msi.h" -#include "hw/pci/pci_internals.h" +#include "hw/pci/pci_bus.h" #include "hw/pci/pcie_regs.h" #include "range.h" diff --git a/hw/pci/pcie_aer.c b/hw/pci/pcie_aer.c index 3026b66916..8a2032ca49 100644 --- a/hw/pci/pcie_aer.c +++ b/hw/pci/pcie_aer.c @@ -25,7 +25,7 @@ #include "hw/pci/pcie.h" #include "hw/pci/msix.h" #include "hw/pci/msi.h" -#include "hw/pci/pci_internals.h" +#include "hw/pci/pci_bus.h" #include "hw/pci/pcie_regs.h" //#define DEBUG_PCIE diff --git a/hw/pci/pcie_port.h b/hw/pci/pcie_port.h index 3259e6a9b9..d89aa615c5 100644 --- a/hw/pci/pcie_port.h +++ b/hw/pci/pcie_port.h @@ -22,7 +22,7 @@ #define QEMU_PCIE_PORT_H #include "hw/pci/pci_bridge.h" -#include "hw/pci/pci_internals.h" +#include "hw/pci/pci_bus.h" struct PCIEPort { PCIBridge br; diff --git a/hw/pci/shpc.c b/hw/pci/shpc.c index 38693f759f..18b1512b43 100644 --- a/hw/pci/shpc.c +++ b/hw/pci/shpc.c @@ -4,7 +4,7 @@ #include "range.h" #include "hw/pci/shpc.h" #include "hw/pci/pci.h" -#include "hw/pci/pci_internals.h" +#include "hw/pci/pci_bus.h" #include "hw/pci/msi.h" /* TODO: model power only and disabled slot states. */ diff --git a/hw/pci_bridge_dev.c b/hw/pci_bridge_dev.c index 5c9fc5036b..dbb4b3b433 100644 --- a/hw/pci_bridge_dev.c +++ b/hw/pci_bridge_dev.c @@ -25,7 +25,7 @@ #include "pci/shpc.h" #include "pci/slotid_cap.h" #include "memory.h" -#include "pci/pci_internals.h" +#include "pci/pci_bus.h" #define REDHAT_PCI_VENDOR_ID 0x1b36 #define PCI_BRIDGE_DEV_VENDOR_ID REDHAT_PCI_VENDOR_ID diff --git a/hw/spapr_pci.c b/hw/spapr_pci.c index 2386164d5d..786f6f4222 100644 --- a/hw/spapr_pci.c +++ b/hw/spapr_pci.c @@ -33,7 +33,7 @@ #include #include "trace.h" -#include "hw/pci/pci_internals.h" +#include "hw/pci/pci_bus.h" /* Copied from the kernel arch/powerpc/platforms/pseries/msi.c */ #define RTAS_QUERY_FN 0 From 952deab6cff5d6d81ff7a63955e958894c07177c Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Wed, 12 Dec 2012 15:04:09 +0200 Subject: [PATCH 11/13] pci_bus: update comment Don't ask everyone to desist from including this header, simply recommend using accessors. Signed-off-by: Michael S. Tsirkin --- hw/pci/pci_bus.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/hw/pci/pci_bus.h b/hw/pci/pci_bus.h index 21d0ce6973..8217f61969 100644 --- a/hw/pci/pci_bus.h +++ b/hw/pci/pci_bus.h @@ -2,14 +2,10 @@ #define QEMU_PCI_INTERNALS_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" From 2059946358999da80be22494af2d5c3174142902 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Wed, 12 Dec 2012 23:11:16 +0200 Subject: [PATCH 12/13] pci_bus.h: tweak include guards Now that header has been renamed, tweak include guards to match. Signed-off-by: Michael S. Tsirkin --- hw/pci/pci_bus.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/pci/pci_bus.h b/hw/pci/pci_bus.h index 8217f61969..f905b9e11e 100644 --- a/hw/pci/pci_bus.h +++ b/hw/pci/pci_bus.h @@ -1,5 +1,5 @@ -#ifndef QEMU_PCI_INTERNALS_H -#define QEMU_PCI_INTERNALS_H +#ifndef QEMU_PCI_BUS_H +#define QEMU_PCI_BUS_H /* * PCI Bus and Bridge datastructures. @@ -71,4 +71,4 @@ struct PCIBridge { const char *bus_name; }; -#endif /* QEMU_PCI_INTERNALS_H */ +#endif /* QEMU_PCI_BUS_H */ From 1dd3a74d2ee2d873cde0b390b536e45420b3fe05 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Mon, 10 Dec 2012 13:00:45 +0200 Subject: [PATCH 13/13] kvm: do not flush after deleting gsi Deleting a GSI isn't necessary: it is enough to stop using it. Delay flush until an entry is used. Signed-off-by: Michael S. Tsirkin --- kvm-all.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index bfa09ad05b..759ef17ab0 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -991,8 +991,6 @@ void kvm_irqchip_release_virq(KVMState *s, int virq) } } clear_gsi(s, virq); - - kvm_irqchip_commit_routes(s); } static unsigned int kvm_hash_msi(uint32_t data)