diff for duplicates of <20190521062836.6541-2-richardw.yang@linux.intel.com> diff --git a/a/1.txt b/N1/1.txt index db36af6..76c4628 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,3 +1,5 @@ +From: Wei Yang <richardw.yang@linux.intel.com> + Now we have two identical build_mcfg functions. Consolidate them in acpi/pci.c. @@ -9,15 +11,19 @@ v4: * rebase on latest master, adjust arm Kconfig v3: * adjust changelog based on Igor's suggestion +Message-Id: <20190521062836.6541-2-richardw.yang@linux.intel.com> +Reviewed-by: Igor Mammedov <imammedo@redhat.com> +Reviewed-by: Michael S. Tsirkin <mst@redhat.com> +Signed-off-by: Michael S. Tsirkin <mst@redhat.com> --- default-configs/i386-softmmu.mak | 1 + - hw/acpi/Kconfig | 4 +++ - hw/acpi/Makefile.objs | 1 + + include/hw/acpi/pci.h | 1 + hw/acpi/pci.c | 46 ++++++++++++++++++++++++++++++++ - hw/arm/Kconfig | 1 + hw/arm/virt-acpi-build.c | 17 ------------ hw/i386/acpi-build.c | 18 +------------ - include/hw/acpi/pci.h | 1 + + hw/acpi/Kconfig | 4 +++ + hw/acpi/Makefile.objs | 1 + + hw/arm/Kconfig | 1 + 8 files changed, 55 insertions(+), 34 deletions(-) create mode 100644 hw/acpi/pci.c @@ -30,33 +36,16 @@ index ba3fb3ff50..cd5ea391e8 100644 CONFIG_I440FX=y CONFIG_Q35=y +CONFIG_ACPI_PCI=y -diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig -index eca3beed75..7c59cf900b 100644 ---- a/hw/acpi/Kconfig -+++ b/hw/acpi/Kconfig -@@ -23,6 +23,10 @@ config ACPI_NVDIMM - bool - depends on ACPI - -+config ACPI_PCI -+ bool -+ depends on ACPI && PCI -+ - config ACPI_VMGENID - bool - default y -diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs -index 2d46e3789a..661a9b8c2f 100644 ---- a/hw/acpi/Makefile.objs -+++ b/hw/acpi/Makefile.objs -@@ -11,6 +11,7 @@ common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o - common-obj-y += acpi_interface.o - common-obj-y += bios-linker-loader.o - common-obj-y += aml-build.o -+common-obj-$(CONFIG_ACPI_PCI) += pci.o - common-obj-$(CONFIG_TPM) += tpm.o +diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h +index 124af7d32a..8bbd32cf45 100644 +--- a/include/hw/acpi/pci.h ++++ b/include/hw/acpi/pci.h +@@ -30,4 +30,5 @@ typedef struct AcpiMcfgInfo { + uint32_t size; + } AcpiMcfgInfo; - common-obj-$(CONFIG_IPMI) += ipmi.o ++void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info); + #endif diff --git a/hw/acpi/pci.c b/hw/acpi/pci.c new file mode 100644 index 0000000000..fa0fa30bb9 @@ -109,18 +98,6 @@ index 0000000000..fa0fa30bb9 + build_header(linker, table_data, (void *)mcfg, "MCFG", len, 1, NULL, NULL); +} + -diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig -index af8cffde9c..9aced9d54d 100644 ---- a/hw/arm/Kconfig -+++ b/hw/arm/Kconfig -@@ -19,6 +19,7 @@ config ARM_VIRT - select PLATFORM_BUS - select SMBIOS - select VIRTIO_MMIO -+ select ACPI_PCI - - config CHEETAH - bool diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index e7c96d658e..4a64f9985c 100644 --- a/hw/arm/virt-acpi-build.c @@ -185,15 +162,44 @@ index 0d78d73894..85dc1640bc 100644 } if (x86_iommu_get_default()) { IommuType IOMMUType = x86_iommu_get_type(); -diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h -index 124af7d32a..8bbd32cf45 100644 ---- a/include/hw/acpi/pci.h -+++ b/include/hw/acpi/pci.h -@@ -30,4 +30,5 @@ typedef struct AcpiMcfgInfo { - uint32_t size; - } AcpiMcfgInfo; +diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig +index eca3beed75..7c59cf900b 100644 +--- a/hw/acpi/Kconfig ++++ b/hw/acpi/Kconfig +@@ -23,6 +23,10 @@ config ACPI_NVDIMM + bool + depends on ACPI -+void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info); - #endif ++config ACPI_PCI ++ bool ++ depends on ACPI && PCI ++ + config ACPI_VMGENID + bool + default y +diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs +index 2d46e3789a..661a9b8c2f 100644 +--- a/hw/acpi/Makefile.objs ++++ b/hw/acpi/Makefile.objs +@@ -11,6 +11,7 @@ common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o + common-obj-y += acpi_interface.o + common-obj-y += bios-linker-loader.o + common-obj-y += aml-build.o ++common-obj-$(CONFIG_ACPI_PCI) += pci.o + common-obj-$(CONFIG_TPM) += tpm.o + + common-obj-$(CONFIG_IPMI) += ipmi.o +diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig +index af8cffde9c..9aced9d54d 100644 +--- a/hw/arm/Kconfig ++++ b/hw/arm/Kconfig +@@ -19,6 +19,7 @@ config ARM_VIRT + select PLATFORM_BUS + select SMBIOS + select VIRTIO_MMIO ++ select ACPI_PCI + + config CHEETAH + bool -- -2.19.1 +MST diff --git a/a/content_digest b/N1/content_digest index 87fd2de..2f305d1 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,20 +1,21 @@ - "ref\020190521062836.6541-1-richardw.yang@linux.intel.com\0" - "From\0Wei Yang <richardw.yang@linux.intel.com>\0" - "Subject\0[Qemu-arm] [PATCH v6 1/2] hw/acpi: Consolidate build_mcfg to pci.c\0" - "Date\0Tue, 21 May 2019 14:28:35 +0800\0" - "To\0qemu-devel@nongnu.org" - " qemu-arm@nongnu.org\0" - "Cc\0yang.zhong@intel.com" - peter.maydell@linaro.org - thuth@redhat.com - mst@redhat.com - shannon.zhaosl@gmail.com + "ref\020190529163604.18560-1-mst@redhat.com\0" + "From\0Michael S. Tsirkin <mst@redhat.com>\0" + "Subject\0[Qemu-arm] [PULL 02/10] hw/acpi: Consolidate build_mcfg to pci.c\0" + "Date\0Wed, 29 May 2019 12:37:11 -0400\0" + "To\0qemu-devel@nongnu.org\0" + "Cc\0Peter Maydell <peter.maydell@linaro.org>" + Eduardo Habkost <ehabkost@redhat.com> + Shannon Zhao <shannon.zhaosl@gmail.com> + qemu-arm@nongnu.org Wei Yang <richardw.yang@linux.intel.com> - marcel.apfelbaum@gmail.com - imammedo@redhat.com - " philmd@redhat.com\0" + Marcel Apfelbaum <marcel.apfelbaum@gmail.com> + Igor Mammedov <imammedo@redhat.com> + Paolo Bonzini <pbonzini@redhat.com> + " Richard Henderson <rth@twiddle.net>\0" "\00:1\0" "b\0" + "From: Wei Yang <richardw.yang@linux.intel.com>\n" + "\n" "Now we have two identical build_mcfg functions.\n" "\n" "Consolidate them in acpi/pci.c.\n" @@ -26,15 +27,19 @@ " * rebase on latest master, adjust arm Kconfig\n" "v3:\n" " * adjust changelog based on Igor's suggestion\n" + "Message-Id: <20190521062836.6541-2-richardw.yang@linux.intel.com>\n" + "Reviewed-by: Igor Mammedov <imammedo@redhat.com>\n" + "Reviewed-by: Michael S. Tsirkin <mst@redhat.com>\n" + "Signed-off-by: Michael S. Tsirkin <mst@redhat.com>\n" "---\n" " default-configs/i386-softmmu.mak | 1 +\n" - " hw/acpi/Kconfig | 4 +++\n" - " hw/acpi/Makefile.objs | 1 +\n" + " include/hw/acpi/pci.h | 1 +\n" " hw/acpi/pci.c | 46 ++++++++++++++++++++++++++++++++\n" - " hw/arm/Kconfig | 1 +\n" " hw/arm/virt-acpi-build.c | 17 ------------\n" " hw/i386/acpi-build.c | 18 +------------\n" - " include/hw/acpi/pci.h | 1 +\n" + " hw/acpi/Kconfig | 4 +++\n" + " hw/acpi/Makefile.objs | 1 +\n" + " hw/arm/Kconfig | 1 +\n" " 8 files changed, 55 insertions(+), 34 deletions(-)\n" " create mode 100644 hw/acpi/pci.c\n" "\n" @@ -47,33 +52,16 @@ " CONFIG_I440FX=y\n" " CONFIG_Q35=y\n" "+CONFIG_ACPI_PCI=y\n" - "diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig\n" - "index eca3beed75..7c59cf900b 100644\n" - "--- a/hw/acpi/Kconfig\n" - "+++ b/hw/acpi/Kconfig\n" - "@@ -23,6 +23,10 @@ config ACPI_NVDIMM\n" - " bool\n" - " depends on ACPI\n" - " \n" - "+config ACPI_PCI\n" - "+ bool\n" - "+ depends on ACPI && PCI\n" - "+\n" - " config ACPI_VMGENID\n" - " bool\n" - " default y\n" - "diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs\n" - "index 2d46e3789a..661a9b8c2f 100644\n" - "--- a/hw/acpi/Makefile.objs\n" - "+++ b/hw/acpi/Makefile.objs\n" - "@@ -11,6 +11,7 @@ common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o\n" - " common-obj-y += acpi_interface.o\n" - " common-obj-y += bios-linker-loader.o\n" - " common-obj-y += aml-build.o\n" - "+common-obj-$(CONFIG_ACPI_PCI) += pci.o\n" - " common-obj-$(CONFIG_TPM) += tpm.o\n" + "diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h\n" + "index 124af7d32a..8bbd32cf45 100644\n" + "--- a/include/hw/acpi/pci.h\n" + "+++ b/include/hw/acpi/pci.h\n" + "@@ -30,4 +30,5 @@ typedef struct AcpiMcfgInfo {\n" + " uint32_t size;\n" + " } AcpiMcfgInfo;\n" " \n" - " common-obj-$(CONFIG_IPMI) += ipmi.o\n" + "+void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info);\n" + " #endif\n" "diff --git a/hw/acpi/pci.c b/hw/acpi/pci.c\n" "new file mode 100644\n" "index 0000000000..fa0fa30bb9\n" @@ -126,18 +114,6 @@ "+ build_header(linker, table_data, (void *)mcfg, \"MCFG\", len, 1, NULL, NULL);\n" "+}\n" "+\n" - "diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig\n" - "index af8cffde9c..9aced9d54d 100644\n" - "--- a/hw/arm/Kconfig\n" - "+++ b/hw/arm/Kconfig\n" - "@@ -19,6 +19,7 @@ config ARM_VIRT\n" - " select PLATFORM_BUS\n" - " select SMBIOS\n" - " select VIRTIO_MMIO\n" - "+ select ACPI_PCI\n" - " \n" - " config CHEETAH\n" - " bool\n" "diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c\n" "index e7c96d658e..4a64f9985c 100644\n" "--- a/hw/arm/virt-acpi-build.c\n" @@ -202,17 +178,46 @@ " }\n" " if (x86_iommu_get_default()) {\n" " IommuType IOMMUType = x86_iommu_get_type();\n" - "diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h\n" - "index 124af7d32a..8bbd32cf45 100644\n" - "--- a/include/hw/acpi/pci.h\n" - "+++ b/include/hw/acpi/pci.h\n" - "@@ -30,4 +30,5 @@ typedef struct AcpiMcfgInfo {\n" - " uint32_t size;\n" - " } AcpiMcfgInfo;\n" + "diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig\n" + "index eca3beed75..7c59cf900b 100644\n" + "--- a/hw/acpi/Kconfig\n" + "+++ b/hw/acpi/Kconfig\n" + "@@ -23,6 +23,10 @@ config ACPI_NVDIMM\n" + " bool\n" + " depends on ACPI\n" " \n" - "+void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info);\n" - " #endif\n" + "+config ACPI_PCI\n" + "+ bool\n" + "+ depends on ACPI && PCI\n" + "+\n" + " config ACPI_VMGENID\n" + " bool\n" + " default y\n" + "diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs\n" + "index 2d46e3789a..661a9b8c2f 100644\n" + "--- a/hw/acpi/Makefile.objs\n" + "+++ b/hw/acpi/Makefile.objs\n" + "@@ -11,6 +11,7 @@ common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o\n" + " common-obj-y += acpi_interface.o\n" + " common-obj-y += bios-linker-loader.o\n" + " common-obj-y += aml-build.o\n" + "+common-obj-$(CONFIG_ACPI_PCI) += pci.o\n" + " common-obj-$(CONFIG_TPM) += tpm.o\n" + " \n" + " common-obj-$(CONFIG_IPMI) += ipmi.o\n" + "diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig\n" + "index af8cffde9c..9aced9d54d 100644\n" + "--- a/hw/arm/Kconfig\n" + "+++ b/hw/arm/Kconfig\n" + "@@ -19,6 +19,7 @@ config ARM_VIRT\n" + " select PLATFORM_BUS\n" + " select SMBIOS\n" + " select VIRTIO_MMIO\n" + "+ select ACPI_PCI\n" + " \n" + " config CHEETAH\n" + " bool\n" "-- \n" - 2.19.1 + MST -1ee16ba22bbb89bca79c1040c0a50c9f35f9ab3df244960f65c38703b3bbb0f5 +9439e39d140da0a32431c178657acf487010ba863f2259faa875ffacfa966cd7
diff --git a/a/1.txt b/N2/1.txt index db36af6..76c4628 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -1,3 +1,5 @@ +From: Wei Yang <richardw.yang@linux.intel.com> + Now we have two identical build_mcfg functions. Consolidate them in acpi/pci.c. @@ -9,15 +11,19 @@ v4: * rebase on latest master, adjust arm Kconfig v3: * adjust changelog based on Igor's suggestion +Message-Id: <20190521062836.6541-2-richardw.yang@linux.intel.com> +Reviewed-by: Igor Mammedov <imammedo@redhat.com> +Reviewed-by: Michael S. Tsirkin <mst@redhat.com> +Signed-off-by: Michael S. Tsirkin <mst@redhat.com> --- default-configs/i386-softmmu.mak | 1 + - hw/acpi/Kconfig | 4 +++ - hw/acpi/Makefile.objs | 1 + + include/hw/acpi/pci.h | 1 + hw/acpi/pci.c | 46 ++++++++++++++++++++++++++++++++ - hw/arm/Kconfig | 1 + hw/arm/virt-acpi-build.c | 17 ------------ hw/i386/acpi-build.c | 18 +------------ - include/hw/acpi/pci.h | 1 + + hw/acpi/Kconfig | 4 +++ + hw/acpi/Makefile.objs | 1 + + hw/arm/Kconfig | 1 + 8 files changed, 55 insertions(+), 34 deletions(-) create mode 100644 hw/acpi/pci.c @@ -30,33 +36,16 @@ index ba3fb3ff50..cd5ea391e8 100644 CONFIG_I440FX=y CONFIG_Q35=y +CONFIG_ACPI_PCI=y -diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig -index eca3beed75..7c59cf900b 100644 ---- a/hw/acpi/Kconfig -+++ b/hw/acpi/Kconfig -@@ -23,6 +23,10 @@ config ACPI_NVDIMM - bool - depends on ACPI - -+config ACPI_PCI -+ bool -+ depends on ACPI && PCI -+ - config ACPI_VMGENID - bool - default y -diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs -index 2d46e3789a..661a9b8c2f 100644 ---- a/hw/acpi/Makefile.objs -+++ b/hw/acpi/Makefile.objs -@@ -11,6 +11,7 @@ common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o - common-obj-y += acpi_interface.o - common-obj-y += bios-linker-loader.o - common-obj-y += aml-build.o -+common-obj-$(CONFIG_ACPI_PCI) += pci.o - common-obj-$(CONFIG_TPM) += tpm.o +diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h +index 124af7d32a..8bbd32cf45 100644 +--- a/include/hw/acpi/pci.h ++++ b/include/hw/acpi/pci.h +@@ -30,4 +30,5 @@ typedef struct AcpiMcfgInfo { + uint32_t size; + } AcpiMcfgInfo; - common-obj-$(CONFIG_IPMI) += ipmi.o ++void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info); + #endif diff --git a/hw/acpi/pci.c b/hw/acpi/pci.c new file mode 100644 index 0000000000..fa0fa30bb9 @@ -109,18 +98,6 @@ index 0000000000..fa0fa30bb9 + build_header(linker, table_data, (void *)mcfg, "MCFG", len, 1, NULL, NULL); +} + -diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig -index af8cffde9c..9aced9d54d 100644 ---- a/hw/arm/Kconfig -+++ b/hw/arm/Kconfig -@@ -19,6 +19,7 @@ config ARM_VIRT - select PLATFORM_BUS - select SMBIOS - select VIRTIO_MMIO -+ select ACPI_PCI - - config CHEETAH - bool diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index e7c96d658e..4a64f9985c 100644 --- a/hw/arm/virt-acpi-build.c @@ -185,15 +162,44 @@ index 0d78d73894..85dc1640bc 100644 } if (x86_iommu_get_default()) { IommuType IOMMUType = x86_iommu_get_type(); -diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h -index 124af7d32a..8bbd32cf45 100644 ---- a/include/hw/acpi/pci.h -+++ b/include/hw/acpi/pci.h -@@ -30,4 +30,5 @@ typedef struct AcpiMcfgInfo { - uint32_t size; - } AcpiMcfgInfo; +diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig +index eca3beed75..7c59cf900b 100644 +--- a/hw/acpi/Kconfig ++++ b/hw/acpi/Kconfig +@@ -23,6 +23,10 @@ config ACPI_NVDIMM + bool + depends on ACPI -+void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info); - #endif ++config ACPI_PCI ++ bool ++ depends on ACPI && PCI ++ + config ACPI_VMGENID + bool + default y +diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs +index 2d46e3789a..661a9b8c2f 100644 +--- a/hw/acpi/Makefile.objs ++++ b/hw/acpi/Makefile.objs +@@ -11,6 +11,7 @@ common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o + common-obj-y += acpi_interface.o + common-obj-y += bios-linker-loader.o + common-obj-y += aml-build.o ++common-obj-$(CONFIG_ACPI_PCI) += pci.o + common-obj-$(CONFIG_TPM) += tpm.o + + common-obj-$(CONFIG_IPMI) += ipmi.o +diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig +index af8cffde9c..9aced9d54d 100644 +--- a/hw/arm/Kconfig ++++ b/hw/arm/Kconfig +@@ -19,6 +19,7 @@ config ARM_VIRT + select PLATFORM_BUS + select SMBIOS + select VIRTIO_MMIO ++ select ACPI_PCI + + config CHEETAH + bool -- -2.19.1 +MST diff --git a/a/content_digest b/N2/content_digest index 87fd2de..1096779 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -1,20 +1,21 @@ - "ref\020190521062836.6541-1-richardw.yang@linux.intel.com\0" - "From\0Wei Yang <richardw.yang@linux.intel.com>\0" - "Subject\0[Qemu-arm] [PATCH v6 1/2] hw/acpi: Consolidate build_mcfg to pci.c\0" - "Date\0Tue, 21 May 2019 14:28:35 +0800\0" - "To\0qemu-devel@nongnu.org" - " qemu-arm@nongnu.org\0" - "Cc\0yang.zhong@intel.com" - peter.maydell@linaro.org - thuth@redhat.com - mst@redhat.com - shannon.zhaosl@gmail.com + "ref\020190603180807.16140-1-mst@redhat.com\0" + "From\0Michael S. Tsirkin <mst@redhat.com>\0" + "Subject\0[Qemu-arm] [PULL v2 01/14] hw/acpi: Consolidate build_mcfg to pci.c\0" + "Date\0Mon, 3 Jun 2019 14:08:22 -0400\0" + "To\0qemu-devel@nongnu.org\0" + "Cc\0Peter Maydell <peter.maydell@linaro.org>" + Eduardo Habkost <ehabkost@redhat.com> + Shannon Zhao <shannon.zhaosl@gmail.com> + qemu-arm@nongnu.org Wei Yang <richardw.yang@linux.intel.com> - marcel.apfelbaum@gmail.com - imammedo@redhat.com - " philmd@redhat.com\0" + Marcel Apfelbaum <marcel.apfelbaum@gmail.com> + Igor Mammedov <imammedo@redhat.com> + Paolo Bonzini <pbonzini@redhat.com> + " Richard Henderson <rth@twiddle.net>\0" "\00:1\0" "b\0" + "From: Wei Yang <richardw.yang@linux.intel.com>\n" + "\n" "Now we have two identical build_mcfg functions.\n" "\n" "Consolidate them in acpi/pci.c.\n" @@ -26,15 +27,19 @@ " * rebase on latest master, adjust arm Kconfig\n" "v3:\n" " * adjust changelog based on Igor's suggestion\n" + "Message-Id: <20190521062836.6541-2-richardw.yang@linux.intel.com>\n" + "Reviewed-by: Igor Mammedov <imammedo@redhat.com>\n" + "Reviewed-by: Michael S. Tsirkin <mst@redhat.com>\n" + "Signed-off-by: Michael S. Tsirkin <mst@redhat.com>\n" "---\n" " default-configs/i386-softmmu.mak | 1 +\n" - " hw/acpi/Kconfig | 4 +++\n" - " hw/acpi/Makefile.objs | 1 +\n" + " include/hw/acpi/pci.h | 1 +\n" " hw/acpi/pci.c | 46 ++++++++++++++++++++++++++++++++\n" - " hw/arm/Kconfig | 1 +\n" " hw/arm/virt-acpi-build.c | 17 ------------\n" " hw/i386/acpi-build.c | 18 +------------\n" - " include/hw/acpi/pci.h | 1 +\n" + " hw/acpi/Kconfig | 4 +++\n" + " hw/acpi/Makefile.objs | 1 +\n" + " hw/arm/Kconfig | 1 +\n" " 8 files changed, 55 insertions(+), 34 deletions(-)\n" " create mode 100644 hw/acpi/pci.c\n" "\n" @@ -47,33 +52,16 @@ " CONFIG_I440FX=y\n" " CONFIG_Q35=y\n" "+CONFIG_ACPI_PCI=y\n" - "diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig\n" - "index eca3beed75..7c59cf900b 100644\n" - "--- a/hw/acpi/Kconfig\n" - "+++ b/hw/acpi/Kconfig\n" - "@@ -23,6 +23,10 @@ config ACPI_NVDIMM\n" - " bool\n" - " depends on ACPI\n" - " \n" - "+config ACPI_PCI\n" - "+ bool\n" - "+ depends on ACPI && PCI\n" - "+\n" - " config ACPI_VMGENID\n" - " bool\n" - " default y\n" - "diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs\n" - "index 2d46e3789a..661a9b8c2f 100644\n" - "--- a/hw/acpi/Makefile.objs\n" - "+++ b/hw/acpi/Makefile.objs\n" - "@@ -11,6 +11,7 @@ common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o\n" - " common-obj-y += acpi_interface.o\n" - " common-obj-y += bios-linker-loader.o\n" - " common-obj-y += aml-build.o\n" - "+common-obj-$(CONFIG_ACPI_PCI) += pci.o\n" - " common-obj-$(CONFIG_TPM) += tpm.o\n" + "diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h\n" + "index 124af7d32a..8bbd32cf45 100644\n" + "--- a/include/hw/acpi/pci.h\n" + "+++ b/include/hw/acpi/pci.h\n" + "@@ -30,4 +30,5 @@ typedef struct AcpiMcfgInfo {\n" + " uint32_t size;\n" + " } AcpiMcfgInfo;\n" " \n" - " common-obj-$(CONFIG_IPMI) += ipmi.o\n" + "+void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info);\n" + " #endif\n" "diff --git a/hw/acpi/pci.c b/hw/acpi/pci.c\n" "new file mode 100644\n" "index 0000000000..fa0fa30bb9\n" @@ -126,18 +114,6 @@ "+ build_header(linker, table_data, (void *)mcfg, \"MCFG\", len, 1, NULL, NULL);\n" "+}\n" "+\n" - "diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig\n" - "index af8cffde9c..9aced9d54d 100644\n" - "--- a/hw/arm/Kconfig\n" - "+++ b/hw/arm/Kconfig\n" - "@@ -19,6 +19,7 @@ config ARM_VIRT\n" - " select PLATFORM_BUS\n" - " select SMBIOS\n" - " select VIRTIO_MMIO\n" - "+ select ACPI_PCI\n" - " \n" - " config CHEETAH\n" - " bool\n" "diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c\n" "index e7c96d658e..4a64f9985c 100644\n" "--- a/hw/arm/virt-acpi-build.c\n" @@ -202,17 +178,46 @@ " }\n" " if (x86_iommu_get_default()) {\n" " IommuType IOMMUType = x86_iommu_get_type();\n" - "diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h\n" - "index 124af7d32a..8bbd32cf45 100644\n" - "--- a/include/hw/acpi/pci.h\n" - "+++ b/include/hw/acpi/pci.h\n" - "@@ -30,4 +30,5 @@ typedef struct AcpiMcfgInfo {\n" - " uint32_t size;\n" - " } AcpiMcfgInfo;\n" + "diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig\n" + "index eca3beed75..7c59cf900b 100644\n" + "--- a/hw/acpi/Kconfig\n" + "+++ b/hw/acpi/Kconfig\n" + "@@ -23,6 +23,10 @@ config ACPI_NVDIMM\n" + " bool\n" + " depends on ACPI\n" " \n" - "+void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info);\n" - " #endif\n" + "+config ACPI_PCI\n" + "+ bool\n" + "+ depends on ACPI && PCI\n" + "+\n" + " config ACPI_VMGENID\n" + " bool\n" + " default y\n" + "diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs\n" + "index 2d46e3789a..661a9b8c2f 100644\n" + "--- a/hw/acpi/Makefile.objs\n" + "+++ b/hw/acpi/Makefile.objs\n" + "@@ -11,6 +11,7 @@ common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o\n" + " common-obj-y += acpi_interface.o\n" + " common-obj-y += bios-linker-loader.o\n" + " common-obj-y += aml-build.o\n" + "+common-obj-$(CONFIG_ACPI_PCI) += pci.o\n" + " common-obj-$(CONFIG_TPM) += tpm.o\n" + " \n" + " common-obj-$(CONFIG_IPMI) += ipmi.o\n" + "diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig\n" + "index af8cffde9c..9aced9d54d 100644\n" + "--- a/hw/arm/Kconfig\n" + "+++ b/hw/arm/Kconfig\n" + "@@ -19,6 +19,7 @@ config ARM_VIRT\n" + " select PLATFORM_BUS\n" + " select SMBIOS\n" + " select VIRTIO_MMIO\n" + "+ select ACPI_PCI\n" + " \n" + " config CHEETAH\n" + " bool\n" "-- \n" - 2.19.1 + MST -1ee16ba22bbb89bca79c1040c0a50c9f35f9ab3df244960f65c38703b3bbb0f5 +a2a9a6e4d1688d86172bd0facfbdd9af74cfd36e0d86bb86c014693b6089fa72
diff --git a/a/1.txt b/N3/1.txt index db36af6..76c4628 100644 --- a/a/1.txt +++ b/N3/1.txt @@ -1,3 +1,5 @@ +From: Wei Yang <richardw.yang@linux.intel.com> + Now we have two identical build_mcfg functions. Consolidate them in acpi/pci.c. @@ -9,15 +11,19 @@ v4: * rebase on latest master, adjust arm Kconfig v3: * adjust changelog based on Igor's suggestion +Message-Id: <20190521062836.6541-2-richardw.yang@linux.intel.com> +Reviewed-by: Igor Mammedov <imammedo@redhat.com> +Reviewed-by: Michael S. Tsirkin <mst@redhat.com> +Signed-off-by: Michael S. Tsirkin <mst@redhat.com> --- default-configs/i386-softmmu.mak | 1 + - hw/acpi/Kconfig | 4 +++ - hw/acpi/Makefile.objs | 1 + + include/hw/acpi/pci.h | 1 + hw/acpi/pci.c | 46 ++++++++++++++++++++++++++++++++ - hw/arm/Kconfig | 1 + hw/arm/virt-acpi-build.c | 17 ------------ hw/i386/acpi-build.c | 18 +------------ - include/hw/acpi/pci.h | 1 + + hw/acpi/Kconfig | 4 +++ + hw/acpi/Makefile.objs | 1 + + hw/arm/Kconfig | 1 + 8 files changed, 55 insertions(+), 34 deletions(-) create mode 100644 hw/acpi/pci.c @@ -30,33 +36,16 @@ index ba3fb3ff50..cd5ea391e8 100644 CONFIG_I440FX=y CONFIG_Q35=y +CONFIG_ACPI_PCI=y -diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig -index eca3beed75..7c59cf900b 100644 ---- a/hw/acpi/Kconfig -+++ b/hw/acpi/Kconfig -@@ -23,6 +23,10 @@ config ACPI_NVDIMM - bool - depends on ACPI - -+config ACPI_PCI -+ bool -+ depends on ACPI && PCI -+ - config ACPI_VMGENID - bool - default y -diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs -index 2d46e3789a..661a9b8c2f 100644 ---- a/hw/acpi/Makefile.objs -+++ b/hw/acpi/Makefile.objs -@@ -11,6 +11,7 @@ common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o - common-obj-y += acpi_interface.o - common-obj-y += bios-linker-loader.o - common-obj-y += aml-build.o -+common-obj-$(CONFIG_ACPI_PCI) += pci.o - common-obj-$(CONFIG_TPM) += tpm.o +diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h +index 124af7d32a..8bbd32cf45 100644 +--- a/include/hw/acpi/pci.h ++++ b/include/hw/acpi/pci.h +@@ -30,4 +30,5 @@ typedef struct AcpiMcfgInfo { + uint32_t size; + } AcpiMcfgInfo; - common-obj-$(CONFIG_IPMI) += ipmi.o ++void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info); + #endif diff --git a/hw/acpi/pci.c b/hw/acpi/pci.c new file mode 100644 index 0000000000..fa0fa30bb9 @@ -109,18 +98,6 @@ index 0000000000..fa0fa30bb9 + build_header(linker, table_data, (void *)mcfg, "MCFG", len, 1, NULL, NULL); +} + -diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig -index af8cffde9c..9aced9d54d 100644 ---- a/hw/arm/Kconfig -+++ b/hw/arm/Kconfig -@@ -19,6 +19,7 @@ config ARM_VIRT - select PLATFORM_BUS - select SMBIOS - select VIRTIO_MMIO -+ select ACPI_PCI - - config CHEETAH - bool diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index e7c96d658e..4a64f9985c 100644 --- a/hw/arm/virt-acpi-build.c @@ -185,15 +162,44 @@ index 0d78d73894..85dc1640bc 100644 } if (x86_iommu_get_default()) { IommuType IOMMUType = x86_iommu_get_type(); -diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h -index 124af7d32a..8bbd32cf45 100644 ---- a/include/hw/acpi/pci.h -+++ b/include/hw/acpi/pci.h -@@ -30,4 +30,5 @@ typedef struct AcpiMcfgInfo { - uint32_t size; - } AcpiMcfgInfo; +diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig +index eca3beed75..7c59cf900b 100644 +--- a/hw/acpi/Kconfig ++++ b/hw/acpi/Kconfig +@@ -23,6 +23,10 @@ config ACPI_NVDIMM + bool + depends on ACPI -+void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info); - #endif ++config ACPI_PCI ++ bool ++ depends on ACPI && PCI ++ + config ACPI_VMGENID + bool + default y +diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs +index 2d46e3789a..661a9b8c2f 100644 +--- a/hw/acpi/Makefile.objs ++++ b/hw/acpi/Makefile.objs +@@ -11,6 +11,7 @@ common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o + common-obj-y += acpi_interface.o + common-obj-y += bios-linker-loader.o + common-obj-y += aml-build.o ++common-obj-$(CONFIG_ACPI_PCI) += pci.o + common-obj-$(CONFIG_TPM) += tpm.o + + common-obj-$(CONFIG_IPMI) += ipmi.o +diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig +index af8cffde9c..9aced9d54d 100644 +--- a/hw/arm/Kconfig ++++ b/hw/arm/Kconfig +@@ -19,6 +19,7 @@ config ARM_VIRT + select PLATFORM_BUS + select SMBIOS + select VIRTIO_MMIO ++ select ACPI_PCI + + config CHEETAH + bool -- -2.19.1 +MST diff --git a/a/content_digest b/N3/content_digest index 87fd2de..ec2b941 100644 --- a/a/content_digest +++ b/N3/content_digest @@ -1,20 +1,21 @@ - "ref\020190521062836.6541-1-richardw.yang@linux.intel.com\0" - "From\0Wei Yang <richardw.yang@linux.intel.com>\0" - "Subject\0[Qemu-arm] [PATCH v6 1/2] hw/acpi: Consolidate build_mcfg to pci.c\0" - "Date\0Tue, 21 May 2019 14:28:35 +0800\0" - "To\0qemu-devel@nongnu.org" - " qemu-arm@nongnu.org\0" - "Cc\0yang.zhong@intel.com" - peter.maydell@linaro.org - thuth@redhat.com - mst@redhat.com - shannon.zhaosl@gmail.com + "ref\020190605195913.12243-1-mst@redhat.com\0" + "From\0Michael S. Tsirkin <mst@redhat.com>\0" + "Subject\0[Qemu-arm] [PULL v3 01/17] hw/acpi: Consolidate build_mcfg to pci.c\0" + "Date\0Wed, 5 Jun 2019 16:00:06 -0400\0" + "To\0qemu-devel@nongnu.org\0" + "Cc\0Peter Maydell <peter.maydell@linaro.org>" + Eduardo Habkost <ehabkost@redhat.com> + Shannon Zhao <shannon.zhaosl@gmail.com> + qemu-arm@nongnu.org Wei Yang <richardw.yang@linux.intel.com> - marcel.apfelbaum@gmail.com - imammedo@redhat.com - " philmd@redhat.com\0" + Marcel Apfelbaum <marcel.apfelbaum@gmail.com> + Igor Mammedov <imammedo@redhat.com> + Paolo Bonzini <pbonzini@redhat.com> + " Richard Henderson <rth@twiddle.net>\0" "\00:1\0" "b\0" + "From: Wei Yang <richardw.yang@linux.intel.com>\n" + "\n" "Now we have two identical build_mcfg functions.\n" "\n" "Consolidate them in acpi/pci.c.\n" @@ -26,15 +27,19 @@ " * rebase on latest master, adjust arm Kconfig\n" "v3:\n" " * adjust changelog based on Igor's suggestion\n" + "Message-Id: <20190521062836.6541-2-richardw.yang@linux.intel.com>\n" + "Reviewed-by: Igor Mammedov <imammedo@redhat.com>\n" + "Reviewed-by: Michael S. Tsirkin <mst@redhat.com>\n" + "Signed-off-by: Michael S. Tsirkin <mst@redhat.com>\n" "---\n" " default-configs/i386-softmmu.mak | 1 +\n" - " hw/acpi/Kconfig | 4 +++\n" - " hw/acpi/Makefile.objs | 1 +\n" + " include/hw/acpi/pci.h | 1 +\n" " hw/acpi/pci.c | 46 ++++++++++++++++++++++++++++++++\n" - " hw/arm/Kconfig | 1 +\n" " hw/arm/virt-acpi-build.c | 17 ------------\n" " hw/i386/acpi-build.c | 18 +------------\n" - " include/hw/acpi/pci.h | 1 +\n" + " hw/acpi/Kconfig | 4 +++\n" + " hw/acpi/Makefile.objs | 1 +\n" + " hw/arm/Kconfig | 1 +\n" " 8 files changed, 55 insertions(+), 34 deletions(-)\n" " create mode 100644 hw/acpi/pci.c\n" "\n" @@ -47,33 +52,16 @@ " CONFIG_I440FX=y\n" " CONFIG_Q35=y\n" "+CONFIG_ACPI_PCI=y\n" - "diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig\n" - "index eca3beed75..7c59cf900b 100644\n" - "--- a/hw/acpi/Kconfig\n" - "+++ b/hw/acpi/Kconfig\n" - "@@ -23,6 +23,10 @@ config ACPI_NVDIMM\n" - " bool\n" - " depends on ACPI\n" - " \n" - "+config ACPI_PCI\n" - "+ bool\n" - "+ depends on ACPI && PCI\n" - "+\n" - " config ACPI_VMGENID\n" - " bool\n" - " default y\n" - "diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs\n" - "index 2d46e3789a..661a9b8c2f 100644\n" - "--- a/hw/acpi/Makefile.objs\n" - "+++ b/hw/acpi/Makefile.objs\n" - "@@ -11,6 +11,7 @@ common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o\n" - " common-obj-y += acpi_interface.o\n" - " common-obj-y += bios-linker-loader.o\n" - " common-obj-y += aml-build.o\n" - "+common-obj-$(CONFIG_ACPI_PCI) += pci.o\n" - " common-obj-$(CONFIG_TPM) += tpm.o\n" + "diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h\n" + "index 124af7d32a..8bbd32cf45 100644\n" + "--- a/include/hw/acpi/pci.h\n" + "+++ b/include/hw/acpi/pci.h\n" + "@@ -30,4 +30,5 @@ typedef struct AcpiMcfgInfo {\n" + " uint32_t size;\n" + " } AcpiMcfgInfo;\n" " \n" - " common-obj-$(CONFIG_IPMI) += ipmi.o\n" + "+void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info);\n" + " #endif\n" "diff --git a/hw/acpi/pci.c b/hw/acpi/pci.c\n" "new file mode 100644\n" "index 0000000000..fa0fa30bb9\n" @@ -126,18 +114,6 @@ "+ build_header(linker, table_data, (void *)mcfg, \"MCFG\", len, 1, NULL, NULL);\n" "+}\n" "+\n" - "diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig\n" - "index af8cffde9c..9aced9d54d 100644\n" - "--- a/hw/arm/Kconfig\n" - "+++ b/hw/arm/Kconfig\n" - "@@ -19,6 +19,7 @@ config ARM_VIRT\n" - " select PLATFORM_BUS\n" - " select SMBIOS\n" - " select VIRTIO_MMIO\n" - "+ select ACPI_PCI\n" - " \n" - " config CHEETAH\n" - " bool\n" "diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c\n" "index e7c96d658e..4a64f9985c 100644\n" "--- a/hw/arm/virt-acpi-build.c\n" @@ -202,17 +178,46 @@ " }\n" " if (x86_iommu_get_default()) {\n" " IommuType IOMMUType = x86_iommu_get_type();\n" - "diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h\n" - "index 124af7d32a..8bbd32cf45 100644\n" - "--- a/include/hw/acpi/pci.h\n" - "+++ b/include/hw/acpi/pci.h\n" - "@@ -30,4 +30,5 @@ typedef struct AcpiMcfgInfo {\n" - " uint32_t size;\n" - " } AcpiMcfgInfo;\n" + "diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig\n" + "index eca3beed75..7c59cf900b 100644\n" + "--- a/hw/acpi/Kconfig\n" + "+++ b/hw/acpi/Kconfig\n" + "@@ -23,6 +23,10 @@ config ACPI_NVDIMM\n" + " bool\n" + " depends on ACPI\n" " \n" - "+void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info);\n" - " #endif\n" + "+config ACPI_PCI\n" + "+ bool\n" + "+ depends on ACPI && PCI\n" + "+\n" + " config ACPI_VMGENID\n" + " bool\n" + " default y\n" + "diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs\n" + "index 2d46e3789a..661a9b8c2f 100644\n" + "--- a/hw/acpi/Makefile.objs\n" + "+++ b/hw/acpi/Makefile.objs\n" + "@@ -11,6 +11,7 @@ common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o\n" + " common-obj-y += acpi_interface.o\n" + " common-obj-y += bios-linker-loader.o\n" + " common-obj-y += aml-build.o\n" + "+common-obj-$(CONFIG_ACPI_PCI) += pci.o\n" + " common-obj-$(CONFIG_TPM) += tpm.o\n" + " \n" + " common-obj-$(CONFIG_IPMI) += ipmi.o\n" + "diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig\n" + "index af8cffde9c..9aced9d54d 100644\n" + "--- a/hw/arm/Kconfig\n" + "+++ b/hw/arm/Kconfig\n" + "@@ -19,6 +19,7 @@ config ARM_VIRT\n" + " select PLATFORM_BUS\n" + " select SMBIOS\n" + " select VIRTIO_MMIO\n" + "+ select ACPI_PCI\n" + " \n" + " config CHEETAH\n" + " bool\n" "-- \n" - 2.19.1 + MST -1ee16ba22bbb89bca79c1040c0a50c9f35f9ab3df244960f65c38703b3bbb0f5 +1de2dbe48bffb537d32a61de9ae259ed8adb1695a1243ec4b70cb7d916a58cf7
diff --git a/a/content_digest b/N4/content_digest index 87fd2de..9eb38e8 100644 --- a/a/content_digest +++ b/N4/content_digest @@ -1,6 +1,6 @@ "ref\020190521062836.6541-1-richardw.yang@linux.intel.com\0" "From\0Wei Yang <richardw.yang@linux.intel.com>\0" - "Subject\0[Qemu-arm] [PATCH v6 1/2] hw/acpi: Consolidate build_mcfg to pci.c\0" + "Subject\0[Qemu-devel] [PATCH v6 1/2] hw/acpi: Consolidate build_mcfg to pci.c\0" "Date\0Tue, 21 May 2019 14:28:35 +0800\0" "To\0qemu-devel@nongnu.org" " qemu-arm@nongnu.org\0" @@ -10,7 +10,6 @@ mst@redhat.com shannon.zhaosl@gmail.com Wei Yang <richardw.yang@linux.intel.com> - marcel.apfelbaum@gmail.com imammedo@redhat.com " philmd@redhat.com\0" "\00:1\0" @@ -215,4 +214,4 @@ "-- \n" 2.19.1 -1ee16ba22bbb89bca79c1040c0a50c9f35f9ab3df244960f65c38703b3bbb0f5 +a30554174d31093b2f897485f4757967c1a13fd857bafe3babdc7bd603ec618a
diff --git a/a/1.txt b/N5/1.txt index db36af6..76c4628 100644 --- a/a/1.txt +++ b/N5/1.txt @@ -1,3 +1,5 @@ +From: Wei Yang <richardw.yang@linux.intel.com> + Now we have two identical build_mcfg functions. Consolidate them in acpi/pci.c. @@ -9,15 +11,19 @@ v4: * rebase on latest master, adjust arm Kconfig v3: * adjust changelog based on Igor's suggestion +Message-Id: <20190521062836.6541-2-richardw.yang@linux.intel.com> +Reviewed-by: Igor Mammedov <imammedo@redhat.com> +Reviewed-by: Michael S. Tsirkin <mst@redhat.com> +Signed-off-by: Michael S. Tsirkin <mst@redhat.com> --- default-configs/i386-softmmu.mak | 1 + - hw/acpi/Kconfig | 4 +++ - hw/acpi/Makefile.objs | 1 + + include/hw/acpi/pci.h | 1 + hw/acpi/pci.c | 46 ++++++++++++++++++++++++++++++++ - hw/arm/Kconfig | 1 + hw/arm/virt-acpi-build.c | 17 ------------ hw/i386/acpi-build.c | 18 +------------ - include/hw/acpi/pci.h | 1 + + hw/acpi/Kconfig | 4 +++ + hw/acpi/Makefile.objs | 1 + + hw/arm/Kconfig | 1 + 8 files changed, 55 insertions(+), 34 deletions(-) create mode 100644 hw/acpi/pci.c @@ -30,33 +36,16 @@ index ba3fb3ff50..cd5ea391e8 100644 CONFIG_I440FX=y CONFIG_Q35=y +CONFIG_ACPI_PCI=y -diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig -index eca3beed75..7c59cf900b 100644 ---- a/hw/acpi/Kconfig -+++ b/hw/acpi/Kconfig -@@ -23,6 +23,10 @@ config ACPI_NVDIMM - bool - depends on ACPI - -+config ACPI_PCI -+ bool -+ depends on ACPI && PCI -+ - config ACPI_VMGENID - bool - default y -diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs -index 2d46e3789a..661a9b8c2f 100644 ---- a/hw/acpi/Makefile.objs -+++ b/hw/acpi/Makefile.objs -@@ -11,6 +11,7 @@ common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o - common-obj-y += acpi_interface.o - common-obj-y += bios-linker-loader.o - common-obj-y += aml-build.o -+common-obj-$(CONFIG_ACPI_PCI) += pci.o - common-obj-$(CONFIG_TPM) += tpm.o +diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h +index 124af7d32a..8bbd32cf45 100644 +--- a/include/hw/acpi/pci.h ++++ b/include/hw/acpi/pci.h +@@ -30,4 +30,5 @@ typedef struct AcpiMcfgInfo { + uint32_t size; + } AcpiMcfgInfo; - common-obj-$(CONFIG_IPMI) += ipmi.o ++void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info); + #endif diff --git a/hw/acpi/pci.c b/hw/acpi/pci.c new file mode 100644 index 0000000000..fa0fa30bb9 @@ -109,18 +98,6 @@ index 0000000000..fa0fa30bb9 + build_header(linker, table_data, (void *)mcfg, "MCFG", len, 1, NULL, NULL); +} + -diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig -index af8cffde9c..9aced9d54d 100644 ---- a/hw/arm/Kconfig -+++ b/hw/arm/Kconfig -@@ -19,6 +19,7 @@ config ARM_VIRT - select PLATFORM_BUS - select SMBIOS - select VIRTIO_MMIO -+ select ACPI_PCI - - config CHEETAH - bool diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index e7c96d658e..4a64f9985c 100644 --- a/hw/arm/virt-acpi-build.c @@ -185,15 +162,44 @@ index 0d78d73894..85dc1640bc 100644 } if (x86_iommu_get_default()) { IommuType IOMMUType = x86_iommu_get_type(); -diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h -index 124af7d32a..8bbd32cf45 100644 ---- a/include/hw/acpi/pci.h -+++ b/include/hw/acpi/pci.h -@@ -30,4 +30,5 @@ typedef struct AcpiMcfgInfo { - uint32_t size; - } AcpiMcfgInfo; +diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig +index eca3beed75..7c59cf900b 100644 +--- a/hw/acpi/Kconfig ++++ b/hw/acpi/Kconfig +@@ -23,6 +23,10 @@ config ACPI_NVDIMM + bool + depends on ACPI -+void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info); - #endif ++config ACPI_PCI ++ bool ++ depends on ACPI && PCI ++ + config ACPI_VMGENID + bool + default y +diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs +index 2d46e3789a..661a9b8c2f 100644 +--- a/hw/acpi/Makefile.objs ++++ b/hw/acpi/Makefile.objs +@@ -11,6 +11,7 @@ common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o + common-obj-y += acpi_interface.o + common-obj-y += bios-linker-loader.o + common-obj-y += aml-build.o ++common-obj-$(CONFIG_ACPI_PCI) += pci.o + common-obj-$(CONFIG_TPM) += tpm.o + + common-obj-$(CONFIG_IPMI) += ipmi.o +diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig +index af8cffde9c..9aced9d54d 100644 +--- a/hw/arm/Kconfig ++++ b/hw/arm/Kconfig +@@ -19,6 +19,7 @@ config ARM_VIRT + select PLATFORM_BUS + select SMBIOS + select VIRTIO_MMIO ++ select ACPI_PCI + + config CHEETAH + bool -- -2.19.1 +MST diff --git a/a/content_digest b/N5/content_digest index 87fd2de..38ce72c 100644 --- a/a/content_digest +++ b/N5/content_digest @@ -1,20 +1,20 @@ - "ref\020190521062836.6541-1-richardw.yang@linux.intel.com\0" - "From\0Wei Yang <richardw.yang@linux.intel.com>\0" - "Subject\0[Qemu-arm] [PATCH v6 1/2] hw/acpi: Consolidate build_mcfg to pci.c\0" - "Date\0Tue, 21 May 2019 14:28:35 +0800\0" - "To\0qemu-devel@nongnu.org" - " qemu-arm@nongnu.org\0" - "Cc\0yang.zhong@intel.com" - peter.maydell@linaro.org - thuth@redhat.com - mst@redhat.com - shannon.zhaosl@gmail.com + "ref\020190529163604.18560-1-mst@redhat.com\0" + "From\0Michael S. Tsirkin <mst@redhat.com>\0" + "Subject\0[Qemu-devel] [PULL 02/10] hw/acpi: Consolidate build_mcfg to pci.c\0" + "Date\0Wed, 29 May 2019 12:37:11 -0400\0" + "To\0qemu-devel@nongnu.org\0" + "Cc\0Peter Maydell <peter.maydell@linaro.org>" + Eduardo Habkost <ehabkost@redhat.com> + Shannon Zhao <shannon.zhaosl@gmail.com> + qemu-arm@nongnu.org Wei Yang <richardw.yang@linux.intel.com> - marcel.apfelbaum@gmail.com - imammedo@redhat.com - " philmd@redhat.com\0" + Igor Mammedov <imammedo@redhat.com> + Paolo Bonzini <pbonzini@redhat.com> + " Richard Henderson <rth@twiddle.net>\0" "\00:1\0" "b\0" + "From: Wei Yang <richardw.yang@linux.intel.com>\n" + "\n" "Now we have two identical build_mcfg functions.\n" "\n" "Consolidate them in acpi/pci.c.\n" @@ -26,15 +26,19 @@ " * rebase on latest master, adjust arm Kconfig\n" "v3:\n" " * adjust changelog based on Igor's suggestion\n" + "Message-Id: <20190521062836.6541-2-richardw.yang@linux.intel.com>\n" + "Reviewed-by: Igor Mammedov <imammedo@redhat.com>\n" + "Reviewed-by: Michael S. Tsirkin <mst@redhat.com>\n" + "Signed-off-by: Michael S. Tsirkin <mst@redhat.com>\n" "---\n" " default-configs/i386-softmmu.mak | 1 +\n" - " hw/acpi/Kconfig | 4 +++\n" - " hw/acpi/Makefile.objs | 1 +\n" + " include/hw/acpi/pci.h | 1 +\n" " hw/acpi/pci.c | 46 ++++++++++++++++++++++++++++++++\n" - " hw/arm/Kconfig | 1 +\n" " hw/arm/virt-acpi-build.c | 17 ------------\n" " hw/i386/acpi-build.c | 18 +------------\n" - " include/hw/acpi/pci.h | 1 +\n" + " hw/acpi/Kconfig | 4 +++\n" + " hw/acpi/Makefile.objs | 1 +\n" + " hw/arm/Kconfig | 1 +\n" " 8 files changed, 55 insertions(+), 34 deletions(-)\n" " create mode 100644 hw/acpi/pci.c\n" "\n" @@ -47,33 +51,16 @@ " CONFIG_I440FX=y\n" " CONFIG_Q35=y\n" "+CONFIG_ACPI_PCI=y\n" - "diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig\n" - "index eca3beed75..7c59cf900b 100644\n" - "--- a/hw/acpi/Kconfig\n" - "+++ b/hw/acpi/Kconfig\n" - "@@ -23,6 +23,10 @@ config ACPI_NVDIMM\n" - " bool\n" - " depends on ACPI\n" - " \n" - "+config ACPI_PCI\n" - "+ bool\n" - "+ depends on ACPI && PCI\n" - "+\n" - " config ACPI_VMGENID\n" - " bool\n" - " default y\n" - "diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs\n" - "index 2d46e3789a..661a9b8c2f 100644\n" - "--- a/hw/acpi/Makefile.objs\n" - "+++ b/hw/acpi/Makefile.objs\n" - "@@ -11,6 +11,7 @@ common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o\n" - " common-obj-y += acpi_interface.o\n" - " common-obj-y += bios-linker-loader.o\n" - " common-obj-y += aml-build.o\n" - "+common-obj-$(CONFIG_ACPI_PCI) += pci.o\n" - " common-obj-$(CONFIG_TPM) += tpm.o\n" + "diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h\n" + "index 124af7d32a..8bbd32cf45 100644\n" + "--- a/include/hw/acpi/pci.h\n" + "+++ b/include/hw/acpi/pci.h\n" + "@@ -30,4 +30,5 @@ typedef struct AcpiMcfgInfo {\n" + " uint32_t size;\n" + " } AcpiMcfgInfo;\n" " \n" - " common-obj-$(CONFIG_IPMI) += ipmi.o\n" + "+void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info);\n" + " #endif\n" "diff --git a/hw/acpi/pci.c b/hw/acpi/pci.c\n" "new file mode 100644\n" "index 0000000000..fa0fa30bb9\n" @@ -126,18 +113,6 @@ "+ build_header(linker, table_data, (void *)mcfg, \"MCFG\", len, 1, NULL, NULL);\n" "+}\n" "+\n" - "diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig\n" - "index af8cffde9c..9aced9d54d 100644\n" - "--- a/hw/arm/Kconfig\n" - "+++ b/hw/arm/Kconfig\n" - "@@ -19,6 +19,7 @@ config ARM_VIRT\n" - " select PLATFORM_BUS\n" - " select SMBIOS\n" - " select VIRTIO_MMIO\n" - "+ select ACPI_PCI\n" - " \n" - " config CHEETAH\n" - " bool\n" "diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c\n" "index e7c96d658e..4a64f9985c 100644\n" "--- a/hw/arm/virt-acpi-build.c\n" @@ -202,17 +177,46 @@ " }\n" " if (x86_iommu_get_default()) {\n" " IommuType IOMMUType = x86_iommu_get_type();\n" - "diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h\n" - "index 124af7d32a..8bbd32cf45 100644\n" - "--- a/include/hw/acpi/pci.h\n" - "+++ b/include/hw/acpi/pci.h\n" - "@@ -30,4 +30,5 @@ typedef struct AcpiMcfgInfo {\n" - " uint32_t size;\n" - " } AcpiMcfgInfo;\n" + "diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig\n" + "index eca3beed75..7c59cf900b 100644\n" + "--- a/hw/acpi/Kconfig\n" + "+++ b/hw/acpi/Kconfig\n" + "@@ -23,6 +23,10 @@ config ACPI_NVDIMM\n" + " bool\n" + " depends on ACPI\n" " \n" - "+void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info);\n" - " #endif\n" + "+config ACPI_PCI\n" + "+ bool\n" + "+ depends on ACPI && PCI\n" + "+\n" + " config ACPI_VMGENID\n" + " bool\n" + " default y\n" + "diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs\n" + "index 2d46e3789a..661a9b8c2f 100644\n" + "--- a/hw/acpi/Makefile.objs\n" + "+++ b/hw/acpi/Makefile.objs\n" + "@@ -11,6 +11,7 @@ common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o\n" + " common-obj-y += acpi_interface.o\n" + " common-obj-y += bios-linker-loader.o\n" + " common-obj-y += aml-build.o\n" + "+common-obj-$(CONFIG_ACPI_PCI) += pci.o\n" + " common-obj-$(CONFIG_TPM) += tpm.o\n" + " \n" + " common-obj-$(CONFIG_IPMI) += ipmi.o\n" + "diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig\n" + "index af8cffde9c..9aced9d54d 100644\n" + "--- a/hw/arm/Kconfig\n" + "+++ b/hw/arm/Kconfig\n" + "@@ -19,6 +19,7 @@ config ARM_VIRT\n" + " select PLATFORM_BUS\n" + " select SMBIOS\n" + " select VIRTIO_MMIO\n" + "+ select ACPI_PCI\n" + " \n" + " config CHEETAH\n" + " bool\n" "-- \n" - 2.19.1 + MST -1ee16ba22bbb89bca79c1040c0a50c9f35f9ab3df244960f65c38703b3bbb0f5 +d8067c68a706035e227113401b19f257a2b0f1a142c7644bb6fa2fce59ac7e8f
diff --git a/a/1.txt b/N6/1.txt index db36af6..76c4628 100644 --- a/a/1.txt +++ b/N6/1.txt @@ -1,3 +1,5 @@ +From: Wei Yang <richardw.yang@linux.intel.com> + Now we have two identical build_mcfg functions. Consolidate them in acpi/pci.c. @@ -9,15 +11,19 @@ v4: * rebase on latest master, adjust arm Kconfig v3: * adjust changelog based on Igor's suggestion +Message-Id: <20190521062836.6541-2-richardw.yang@linux.intel.com> +Reviewed-by: Igor Mammedov <imammedo@redhat.com> +Reviewed-by: Michael S. Tsirkin <mst@redhat.com> +Signed-off-by: Michael S. Tsirkin <mst@redhat.com> --- default-configs/i386-softmmu.mak | 1 + - hw/acpi/Kconfig | 4 +++ - hw/acpi/Makefile.objs | 1 + + include/hw/acpi/pci.h | 1 + hw/acpi/pci.c | 46 ++++++++++++++++++++++++++++++++ - hw/arm/Kconfig | 1 + hw/arm/virt-acpi-build.c | 17 ------------ hw/i386/acpi-build.c | 18 +------------ - include/hw/acpi/pci.h | 1 + + hw/acpi/Kconfig | 4 +++ + hw/acpi/Makefile.objs | 1 + + hw/arm/Kconfig | 1 + 8 files changed, 55 insertions(+), 34 deletions(-) create mode 100644 hw/acpi/pci.c @@ -30,33 +36,16 @@ index ba3fb3ff50..cd5ea391e8 100644 CONFIG_I440FX=y CONFIG_Q35=y +CONFIG_ACPI_PCI=y -diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig -index eca3beed75..7c59cf900b 100644 ---- a/hw/acpi/Kconfig -+++ b/hw/acpi/Kconfig -@@ -23,6 +23,10 @@ config ACPI_NVDIMM - bool - depends on ACPI - -+config ACPI_PCI -+ bool -+ depends on ACPI && PCI -+ - config ACPI_VMGENID - bool - default y -diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs -index 2d46e3789a..661a9b8c2f 100644 ---- a/hw/acpi/Makefile.objs -+++ b/hw/acpi/Makefile.objs -@@ -11,6 +11,7 @@ common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o - common-obj-y += acpi_interface.o - common-obj-y += bios-linker-loader.o - common-obj-y += aml-build.o -+common-obj-$(CONFIG_ACPI_PCI) += pci.o - common-obj-$(CONFIG_TPM) += tpm.o +diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h +index 124af7d32a..8bbd32cf45 100644 +--- a/include/hw/acpi/pci.h ++++ b/include/hw/acpi/pci.h +@@ -30,4 +30,5 @@ typedef struct AcpiMcfgInfo { + uint32_t size; + } AcpiMcfgInfo; - common-obj-$(CONFIG_IPMI) += ipmi.o ++void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info); + #endif diff --git a/hw/acpi/pci.c b/hw/acpi/pci.c new file mode 100644 index 0000000000..fa0fa30bb9 @@ -109,18 +98,6 @@ index 0000000000..fa0fa30bb9 + build_header(linker, table_data, (void *)mcfg, "MCFG", len, 1, NULL, NULL); +} + -diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig -index af8cffde9c..9aced9d54d 100644 ---- a/hw/arm/Kconfig -+++ b/hw/arm/Kconfig -@@ -19,6 +19,7 @@ config ARM_VIRT - select PLATFORM_BUS - select SMBIOS - select VIRTIO_MMIO -+ select ACPI_PCI - - config CHEETAH - bool diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index e7c96d658e..4a64f9985c 100644 --- a/hw/arm/virt-acpi-build.c @@ -185,15 +162,44 @@ index 0d78d73894..85dc1640bc 100644 } if (x86_iommu_get_default()) { IommuType IOMMUType = x86_iommu_get_type(); -diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h -index 124af7d32a..8bbd32cf45 100644 ---- a/include/hw/acpi/pci.h -+++ b/include/hw/acpi/pci.h -@@ -30,4 +30,5 @@ typedef struct AcpiMcfgInfo { - uint32_t size; - } AcpiMcfgInfo; +diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig +index eca3beed75..7c59cf900b 100644 +--- a/hw/acpi/Kconfig ++++ b/hw/acpi/Kconfig +@@ -23,6 +23,10 @@ config ACPI_NVDIMM + bool + depends on ACPI -+void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info); - #endif ++config ACPI_PCI ++ bool ++ depends on ACPI && PCI ++ + config ACPI_VMGENID + bool + default y +diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs +index 2d46e3789a..661a9b8c2f 100644 +--- a/hw/acpi/Makefile.objs ++++ b/hw/acpi/Makefile.objs +@@ -11,6 +11,7 @@ common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o + common-obj-y += acpi_interface.o + common-obj-y += bios-linker-loader.o + common-obj-y += aml-build.o ++common-obj-$(CONFIG_ACPI_PCI) += pci.o + common-obj-$(CONFIG_TPM) += tpm.o + + common-obj-$(CONFIG_IPMI) += ipmi.o +diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig +index af8cffde9c..9aced9d54d 100644 +--- a/hw/arm/Kconfig ++++ b/hw/arm/Kconfig +@@ -19,6 +19,7 @@ config ARM_VIRT + select PLATFORM_BUS + select SMBIOS + select VIRTIO_MMIO ++ select ACPI_PCI + + config CHEETAH + bool -- -2.19.1 +MST diff --git a/a/content_digest b/N6/content_digest index 87fd2de..210c10f 100644 --- a/a/content_digest +++ b/N6/content_digest @@ -1,20 +1,20 @@ - "ref\020190521062836.6541-1-richardw.yang@linux.intel.com\0" - "From\0Wei Yang <richardw.yang@linux.intel.com>\0" - "Subject\0[Qemu-arm] [PATCH v6 1/2] hw/acpi: Consolidate build_mcfg to pci.c\0" - "Date\0Tue, 21 May 2019 14:28:35 +0800\0" - "To\0qemu-devel@nongnu.org" - " qemu-arm@nongnu.org\0" - "Cc\0yang.zhong@intel.com" - peter.maydell@linaro.org - thuth@redhat.com - mst@redhat.com - shannon.zhaosl@gmail.com + "ref\020190603180807.16140-1-mst@redhat.com\0" + "From\0Michael S. Tsirkin <mst@redhat.com>\0" + "Subject\0[Qemu-devel] [PULL v2 01/14] hw/acpi: Consolidate build_mcfg to pci.c\0" + "Date\0Mon, 3 Jun 2019 14:08:22 -0400\0" + "To\0qemu-devel@nongnu.org\0" + "Cc\0Peter Maydell <peter.maydell@linaro.org>" + Eduardo Habkost <ehabkost@redhat.com> + Shannon Zhao <shannon.zhaosl@gmail.com> + qemu-arm@nongnu.org Wei Yang <richardw.yang@linux.intel.com> - marcel.apfelbaum@gmail.com - imammedo@redhat.com - " philmd@redhat.com\0" + Igor Mammedov <imammedo@redhat.com> + Paolo Bonzini <pbonzini@redhat.com> + " Richard Henderson <rth@twiddle.net>\0" "\00:1\0" "b\0" + "From: Wei Yang <richardw.yang@linux.intel.com>\n" + "\n" "Now we have two identical build_mcfg functions.\n" "\n" "Consolidate them in acpi/pci.c.\n" @@ -26,15 +26,19 @@ " * rebase on latest master, adjust arm Kconfig\n" "v3:\n" " * adjust changelog based on Igor's suggestion\n" + "Message-Id: <20190521062836.6541-2-richardw.yang@linux.intel.com>\n" + "Reviewed-by: Igor Mammedov <imammedo@redhat.com>\n" + "Reviewed-by: Michael S. Tsirkin <mst@redhat.com>\n" + "Signed-off-by: Michael S. Tsirkin <mst@redhat.com>\n" "---\n" " default-configs/i386-softmmu.mak | 1 +\n" - " hw/acpi/Kconfig | 4 +++\n" - " hw/acpi/Makefile.objs | 1 +\n" + " include/hw/acpi/pci.h | 1 +\n" " hw/acpi/pci.c | 46 ++++++++++++++++++++++++++++++++\n" - " hw/arm/Kconfig | 1 +\n" " hw/arm/virt-acpi-build.c | 17 ------------\n" " hw/i386/acpi-build.c | 18 +------------\n" - " include/hw/acpi/pci.h | 1 +\n" + " hw/acpi/Kconfig | 4 +++\n" + " hw/acpi/Makefile.objs | 1 +\n" + " hw/arm/Kconfig | 1 +\n" " 8 files changed, 55 insertions(+), 34 deletions(-)\n" " create mode 100644 hw/acpi/pci.c\n" "\n" @@ -47,33 +51,16 @@ " CONFIG_I440FX=y\n" " CONFIG_Q35=y\n" "+CONFIG_ACPI_PCI=y\n" - "diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig\n" - "index eca3beed75..7c59cf900b 100644\n" - "--- a/hw/acpi/Kconfig\n" - "+++ b/hw/acpi/Kconfig\n" - "@@ -23,6 +23,10 @@ config ACPI_NVDIMM\n" - " bool\n" - " depends on ACPI\n" - " \n" - "+config ACPI_PCI\n" - "+ bool\n" - "+ depends on ACPI && PCI\n" - "+\n" - " config ACPI_VMGENID\n" - " bool\n" - " default y\n" - "diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs\n" - "index 2d46e3789a..661a9b8c2f 100644\n" - "--- a/hw/acpi/Makefile.objs\n" - "+++ b/hw/acpi/Makefile.objs\n" - "@@ -11,6 +11,7 @@ common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o\n" - " common-obj-y += acpi_interface.o\n" - " common-obj-y += bios-linker-loader.o\n" - " common-obj-y += aml-build.o\n" - "+common-obj-$(CONFIG_ACPI_PCI) += pci.o\n" - " common-obj-$(CONFIG_TPM) += tpm.o\n" + "diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h\n" + "index 124af7d32a..8bbd32cf45 100644\n" + "--- a/include/hw/acpi/pci.h\n" + "+++ b/include/hw/acpi/pci.h\n" + "@@ -30,4 +30,5 @@ typedef struct AcpiMcfgInfo {\n" + " uint32_t size;\n" + " } AcpiMcfgInfo;\n" " \n" - " common-obj-$(CONFIG_IPMI) += ipmi.o\n" + "+void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info);\n" + " #endif\n" "diff --git a/hw/acpi/pci.c b/hw/acpi/pci.c\n" "new file mode 100644\n" "index 0000000000..fa0fa30bb9\n" @@ -126,18 +113,6 @@ "+ build_header(linker, table_data, (void *)mcfg, \"MCFG\", len, 1, NULL, NULL);\n" "+}\n" "+\n" - "diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig\n" - "index af8cffde9c..9aced9d54d 100644\n" - "--- a/hw/arm/Kconfig\n" - "+++ b/hw/arm/Kconfig\n" - "@@ -19,6 +19,7 @@ config ARM_VIRT\n" - " select PLATFORM_BUS\n" - " select SMBIOS\n" - " select VIRTIO_MMIO\n" - "+ select ACPI_PCI\n" - " \n" - " config CHEETAH\n" - " bool\n" "diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c\n" "index e7c96d658e..4a64f9985c 100644\n" "--- a/hw/arm/virt-acpi-build.c\n" @@ -202,17 +177,46 @@ " }\n" " if (x86_iommu_get_default()) {\n" " IommuType IOMMUType = x86_iommu_get_type();\n" - "diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h\n" - "index 124af7d32a..8bbd32cf45 100644\n" - "--- a/include/hw/acpi/pci.h\n" - "+++ b/include/hw/acpi/pci.h\n" - "@@ -30,4 +30,5 @@ typedef struct AcpiMcfgInfo {\n" - " uint32_t size;\n" - " } AcpiMcfgInfo;\n" + "diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig\n" + "index eca3beed75..7c59cf900b 100644\n" + "--- a/hw/acpi/Kconfig\n" + "+++ b/hw/acpi/Kconfig\n" + "@@ -23,6 +23,10 @@ config ACPI_NVDIMM\n" + " bool\n" + " depends on ACPI\n" " \n" - "+void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info);\n" - " #endif\n" + "+config ACPI_PCI\n" + "+ bool\n" + "+ depends on ACPI && PCI\n" + "+\n" + " config ACPI_VMGENID\n" + " bool\n" + " default y\n" + "diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs\n" + "index 2d46e3789a..661a9b8c2f 100644\n" + "--- a/hw/acpi/Makefile.objs\n" + "+++ b/hw/acpi/Makefile.objs\n" + "@@ -11,6 +11,7 @@ common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o\n" + " common-obj-y += acpi_interface.o\n" + " common-obj-y += bios-linker-loader.o\n" + " common-obj-y += aml-build.o\n" + "+common-obj-$(CONFIG_ACPI_PCI) += pci.o\n" + " common-obj-$(CONFIG_TPM) += tpm.o\n" + " \n" + " common-obj-$(CONFIG_IPMI) += ipmi.o\n" + "diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig\n" + "index af8cffde9c..9aced9d54d 100644\n" + "--- a/hw/arm/Kconfig\n" + "+++ b/hw/arm/Kconfig\n" + "@@ -19,6 +19,7 @@ config ARM_VIRT\n" + " select PLATFORM_BUS\n" + " select SMBIOS\n" + " select VIRTIO_MMIO\n" + "+ select ACPI_PCI\n" + " \n" + " config CHEETAH\n" + " bool\n" "-- \n" - 2.19.1 + MST -1ee16ba22bbb89bca79c1040c0a50c9f35f9ab3df244960f65c38703b3bbb0f5 +40f7cd2fac1d8e99c81d71083cba376c7274fc76ec3e845d59a57aa6a47eb8cd
diff --git a/a/1.txt b/N7/1.txt index db36af6..76c4628 100644 --- a/a/1.txt +++ b/N7/1.txt @@ -1,3 +1,5 @@ +From: Wei Yang <richardw.yang@linux.intel.com> + Now we have two identical build_mcfg functions. Consolidate them in acpi/pci.c. @@ -9,15 +11,19 @@ v4: * rebase on latest master, adjust arm Kconfig v3: * adjust changelog based on Igor's suggestion +Message-Id: <20190521062836.6541-2-richardw.yang@linux.intel.com> +Reviewed-by: Igor Mammedov <imammedo@redhat.com> +Reviewed-by: Michael S. Tsirkin <mst@redhat.com> +Signed-off-by: Michael S. Tsirkin <mst@redhat.com> --- default-configs/i386-softmmu.mak | 1 + - hw/acpi/Kconfig | 4 +++ - hw/acpi/Makefile.objs | 1 + + include/hw/acpi/pci.h | 1 + hw/acpi/pci.c | 46 ++++++++++++++++++++++++++++++++ - hw/arm/Kconfig | 1 + hw/arm/virt-acpi-build.c | 17 ------------ hw/i386/acpi-build.c | 18 +------------ - include/hw/acpi/pci.h | 1 + + hw/acpi/Kconfig | 4 +++ + hw/acpi/Makefile.objs | 1 + + hw/arm/Kconfig | 1 + 8 files changed, 55 insertions(+), 34 deletions(-) create mode 100644 hw/acpi/pci.c @@ -30,33 +36,16 @@ index ba3fb3ff50..cd5ea391e8 100644 CONFIG_I440FX=y CONFIG_Q35=y +CONFIG_ACPI_PCI=y -diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig -index eca3beed75..7c59cf900b 100644 ---- a/hw/acpi/Kconfig -+++ b/hw/acpi/Kconfig -@@ -23,6 +23,10 @@ config ACPI_NVDIMM - bool - depends on ACPI - -+config ACPI_PCI -+ bool -+ depends on ACPI && PCI -+ - config ACPI_VMGENID - bool - default y -diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs -index 2d46e3789a..661a9b8c2f 100644 ---- a/hw/acpi/Makefile.objs -+++ b/hw/acpi/Makefile.objs -@@ -11,6 +11,7 @@ common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o - common-obj-y += acpi_interface.o - common-obj-y += bios-linker-loader.o - common-obj-y += aml-build.o -+common-obj-$(CONFIG_ACPI_PCI) += pci.o - common-obj-$(CONFIG_TPM) += tpm.o +diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h +index 124af7d32a..8bbd32cf45 100644 +--- a/include/hw/acpi/pci.h ++++ b/include/hw/acpi/pci.h +@@ -30,4 +30,5 @@ typedef struct AcpiMcfgInfo { + uint32_t size; + } AcpiMcfgInfo; - common-obj-$(CONFIG_IPMI) += ipmi.o ++void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info); + #endif diff --git a/hw/acpi/pci.c b/hw/acpi/pci.c new file mode 100644 index 0000000000..fa0fa30bb9 @@ -109,18 +98,6 @@ index 0000000000..fa0fa30bb9 + build_header(linker, table_data, (void *)mcfg, "MCFG", len, 1, NULL, NULL); +} + -diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig -index af8cffde9c..9aced9d54d 100644 ---- a/hw/arm/Kconfig -+++ b/hw/arm/Kconfig -@@ -19,6 +19,7 @@ config ARM_VIRT - select PLATFORM_BUS - select SMBIOS - select VIRTIO_MMIO -+ select ACPI_PCI - - config CHEETAH - bool diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index e7c96d658e..4a64f9985c 100644 --- a/hw/arm/virt-acpi-build.c @@ -185,15 +162,44 @@ index 0d78d73894..85dc1640bc 100644 } if (x86_iommu_get_default()) { IommuType IOMMUType = x86_iommu_get_type(); -diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h -index 124af7d32a..8bbd32cf45 100644 ---- a/include/hw/acpi/pci.h -+++ b/include/hw/acpi/pci.h -@@ -30,4 +30,5 @@ typedef struct AcpiMcfgInfo { - uint32_t size; - } AcpiMcfgInfo; +diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig +index eca3beed75..7c59cf900b 100644 +--- a/hw/acpi/Kconfig ++++ b/hw/acpi/Kconfig +@@ -23,6 +23,10 @@ config ACPI_NVDIMM + bool + depends on ACPI -+void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info); - #endif ++config ACPI_PCI ++ bool ++ depends on ACPI && PCI ++ + config ACPI_VMGENID + bool + default y +diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs +index 2d46e3789a..661a9b8c2f 100644 +--- a/hw/acpi/Makefile.objs ++++ b/hw/acpi/Makefile.objs +@@ -11,6 +11,7 @@ common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o + common-obj-y += acpi_interface.o + common-obj-y += bios-linker-loader.o + common-obj-y += aml-build.o ++common-obj-$(CONFIG_ACPI_PCI) += pci.o + common-obj-$(CONFIG_TPM) += tpm.o + + common-obj-$(CONFIG_IPMI) += ipmi.o +diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig +index af8cffde9c..9aced9d54d 100644 +--- a/hw/arm/Kconfig ++++ b/hw/arm/Kconfig +@@ -19,6 +19,7 @@ config ARM_VIRT + select PLATFORM_BUS + select SMBIOS + select VIRTIO_MMIO ++ select ACPI_PCI + + config CHEETAH + bool -- -2.19.1 +MST diff --git a/a/content_digest b/N7/content_digest index 87fd2de..9a3715a 100644 --- a/a/content_digest +++ b/N7/content_digest @@ -1,20 +1,20 @@ - "ref\020190521062836.6541-1-richardw.yang@linux.intel.com\0" - "From\0Wei Yang <richardw.yang@linux.intel.com>\0" - "Subject\0[Qemu-arm] [PATCH v6 1/2] hw/acpi: Consolidate build_mcfg to pci.c\0" - "Date\0Tue, 21 May 2019 14:28:35 +0800\0" - "To\0qemu-devel@nongnu.org" - " qemu-arm@nongnu.org\0" - "Cc\0yang.zhong@intel.com" - peter.maydell@linaro.org - thuth@redhat.com - mst@redhat.com - shannon.zhaosl@gmail.com + "ref\020190605195913.12243-1-mst@redhat.com\0" + "From\0Michael S. Tsirkin <mst@redhat.com>\0" + "Subject\0[Qemu-devel] [PULL v3 01/17] hw/acpi: Consolidate build_mcfg to pci.c\0" + "Date\0Wed, 5 Jun 2019 16:00:06 -0400\0" + "To\0qemu-devel@nongnu.org\0" + "Cc\0Peter Maydell <peter.maydell@linaro.org>" + Eduardo Habkost <ehabkost@redhat.com> + Shannon Zhao <shannon.zhaosl@gmail.com> + qemu-arm@nongnu.org Wei Yang <richardw.yang@linux.intel.com> - marcel.apfelbaum@gmail.com - imammedo@redhat.com - " philmd@redhat.com\0" + Igor Mammedov <imammedo@redhat.com> + Paolo Bonzini <pbonzini@redhat.com> + " Richard Henderson <rth@twiddle.net>\0" "\00:1\0" "b\0" + "From: Wei Yang <richardw.yang@linux.intel.com>\n" + "\n" "Now we have two identical build_mcfg functions.\n" "\n" "Consolidate them in acpi/pci.c.\n" @@ -26,15 +26,19 @@ " * rebase on latest master, adjust arm Kconfig\n" "v3:\n" " * adjust changelog based on Igor's suggestion\n" + "Message-Id: <20190521062836.6541-2-richardw.yang@linux.intel.com>\n" + "Reviewed-by: Igor Mammedov <imammedo@redhat.com>\n" + "Reviewed-by: Michael S. Tsirkin <mst@redhat.com>\n" + "Signed-off-by: Michael S. Tsirkin <mst@redhat.com>\n" "---\n" " default-configs/i386-softmmu.mak | 1 +\n" - " hw/acpi/Kconfig | 4 +++\n" - " hw/acpi/Makefile.objs | 1 +\n" + " include/hw/acpi/pci.h | 1 +\n" " hw/acpi/pci.c | 46 ++++++++++++++++++++++++++++++++\n" - " hw/arm/Kconfig | 1 +\n" " hw/arm/virt-acpi-build.c | 17 ------------\n" " hw/i386/acpi-build.c | 18 +------------\n" - " include/hw/acpi/pci.h | 1 +\n" + " hw/acpi/Kconfig | 4 +++\n" + " hw/acpi/Makefile.objs | 1 +\n" + " hw/arm/Kconfig | 1 +\n" " 8 files changed, 55 insertions(+), 34 deletions(-)\n" " create mode 100644 hw/acpi/pci.c\n" "\n" @@ -47,33 +51,16 @@ " CONFIG_I440FX=y\n" " CONFIG_Q35=y\n" "+CONFIG_ACPI_PCI=y\n" - "diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig\n" - "index eca3beed75..7c59cf900b 100644\n" - "--- a/hw/acpi/Kconfig\n" - "+++ b/hw/acpi/Kconfig\n" - "@@ -23,6 +23,10 @@ config ACPI_NVDIMM\n" - " bool\n" - " depends on ACPI\n" - " \n" - "+config ACPI_PCI\n" - "+ bool\n" - "+ depends on ACPI && PCI\n" - "+\n" - " config ACPI_VMGENID\n" - " bool\n" - " default y\n" - "diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs\n" - "index 2d46e3789a..661a9b8c2f 100644\n" - "--- a/hw/acpi/Makefile.objs\n" - "+++ b/hw/acpi/Makefile.objs\n" - "@@ -11,6 +11,7 @@ common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o\n" - " common-obj-y += acpi_interface.o\n" - " common-obj-y += bios-linker-loader.o\n" - " common-obj-y += aml-build.o\n" - "+common-obj-$(CONFIG_ACPI_PCI) += pci.o\n" - " common-obj-$(CONFIG_TPM) += tpm.o\n" + "diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h\n" + "index 124af7d32a..8bbd32cf45 100644\n" + "--- a/include/hw/acpi/pci.h\n" + "+++ b/include/hw/acpi/pci.h\n" + "@@ -30,4 +30,5 @@ typedef struct AcpiMcfgInfo {\n" + " uint32_t size;\n" + " } AcpiMcfgInfo;\n" " \n" - " common-obj-$(CONFIG_IPMI) += ipmi.o\n" + "+void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info);\n" + " #endif\n" "diff --git a/hw/acpi/pci.c b/hw/acpi/pci.c\n" "new file mode 100644\n" "index 0000000000..fa0fa30bb9\n" @@ -126,18 +113,6 @@ "+ build_header(linker, table_data, (void *)mcfg, \"MCFG\", len, 1, NULL, NULL);\n" "+}\n" "+\n" - "diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig\n" - "index af8cffde9c..9aced9d54d 100644\n" - "--- a/hw/arm/Kconfig\n" - "+++ b/hw/arm/Kconfig\n" - "@@ -19,6 +19,7 @@ config ARM_VIRT\n" - " select PLATFORM_BUS\n" - " select SMBIOS\n" - " select VIRTIO_MMIO\n" - "+ select ACPI_PCI\n" - " \n" - " config CHEETAH\n" - " bool\n" "diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c\n" "index e7c96d658e..4a64f9985c 100644\n" "--- a/hw/arm/virt-acpi-build.c\n" @@ -202,17 +177,46 @@ " }\n" " if (x86_iommu_get_default()) {\n" " IommuType IOMMUType = x86_iommu_get_type();\n" - "diff --git a/include/hw/acpi/pci.h b/include/hw/acpi/pci.h\n" - "index 124af7d32a..8bbd32cf45 100644\n" - "--- a/include/hw/acpi/pci.h\n" - "+++ b/include/hw/acpi/pci.h\n" - "@@ -30,4 +30,5 @@ typedef struct AcpiMcfgInfo {\n" - " uint32_t size;\n" - " } AcpiMcfgInfo;\n" + "diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig\n" + "index eca3beed75..7c59cf900b 100644\n" + "--- a/hw/acpi/Kconfig\n" + "+++ b/hw/acpi/Kconfig\n" + "@@ -23,6 +23,10 @@ config ACPI_NVDIMM\n" + " bool\n" + " depends on ACPI\n" " \n" - "+void build_mcfg(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info);\n" - " #endif\n" + "+config ACPI_PCI\n" + "+ bool\n" + "+ depends on ACPI && PCI\n" + "+\n" + " config ACPI_VMGENID\n" + " bool\n" + " default y\n" + "diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs\n" + "index 2d46e3789a..661a9b8c2f 100644\n" + "--- a/hw/acpi/Makefile.objs\n" + "+++ b/hw/acpi/Makefile.objs\n" + "@@ -11,6 +11,7 @@ common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o\n" + " common-obj-y += acpi_interface.o\n" + " common-obj-y += bios-linker-loader.o\n" + " common-obj-y += aml-build.o\n" + "+common-obj-$(CONFIG_ACPI_PCI) += pci.o\n" + " common-obj-$(CONFIG_TPM) += tpm.o\n" + " \n" + " common-obj-$(CONFIG_IPMI) += ipmi.o\n" + "diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig\n" + "index af8cffde9c..9aced9d54d 100644\n" + "--- a/hw/arm/Kconfig\n" + "+++ b/hw/arm/Kconfig\n" + "@@ -19,6 +19,7 @@ config ARM_VIRT\n" + " select PLATFORM_BUS\n" + " select SMBIOS\n" + " select VIRTIO_MMIO\n" + "+ select ACPI_PCI\n" + " \n" + " config CHEETAH\n" + " bool\n" "-- \n" - 2.19.1 + MST -1ee16ba22bbb89bca79c1040c0a50c9f35f9ab3df244960f65c38703b3bbb0f5 +fbee297cb7d2fedcbde3c7804b1b82652523ae7b88b47c7694548bdc0944b484
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.