diff options
author | Igor Mammedov | 2019-04-09 17:00:37 +0200 |
---|---|---|
committer | Michael S. Tsirkin | 2019-05-21 00:40:02 +0200 |
commit | fe4970ad466dc14b919224d10179a8858130db43 (patch) | |
tree | d37de78e282cea226cc6e2f2b6486034a33befd0 /hw/i386/acpi-build.c | |
parent | acpi/pcihp: Add a few more trace points related to unplug (diff) | |
download | qemu-fe4970ad466dc14b919224d10179a8858130db43.tar.gz qemu-fe4970ad466dc14b919224d10179a8858130db43.tar.xz qemu-fe4970ad466dc14b919224d10179a8858130db43.zip |
q35: acpi: do not create dummy MCFG table
Dummy table (with signature "QEMU") creation came from original SeaBIOS
codebase. And QEMU would have to keep it around if there were Q35 machine
that depended on keeping ACPI tables blob constant size. Luckily there
were no versioned Q35 machine types before commit:
(since 2.3) a1666142db acpi-build: make ROMs RAM blocks resizeable
which obsoleted need to keep ACPI tables blob the same size on source/destination.
Considering the 1st versioned machine is pc-q35-2.4, the dummy table
is not really necessary and it's safe to drop it without breaking
cross version migration in both directions unconditionally.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <1554822037-329838-1-git-send-email-imammedo@redhat.com>
Reviewed-by: Wei Yang <richardw.yang@linux.intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386/acpi-build.c')
-rw-r--r-- | hw/i386/acpi-build.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index b4ec14e349..4fb6184cbc 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2413,7 +2413,6 @@ static void build_mcfg_q35(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info) { AcpiTableMcfg *mcfg; - const char *sig; int len = sizeof(*mcfg) + 1 * sizeof(mcfg->allocation[0]); mcfg = acpi_data_push(table_data, len); @@ -2423,19 +2422,7 @@ build_mcfg_q35(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info) mcfg->allocation[0].start_bus_number = 0; mcfg->allocation[0].end_bus_number = PCIE_MMCFG_BUS(info->mcfg_size - 1); - /* MCFG is used for ECAM which can be enabled or disabled by guest. - * To avoid table size changes (which create migration issues), - * always create the table even if there are no allocations, - * but set the signature to a reserved value in this case. - * ACPI spec requires OSPMs to ignore such tables. - */ - if (info->mcfg_base == PCIE_BASE_ADDR_UNMAPPED) { - /* Reserved signature: ignored by OSPM */ - sig = "QEMU"; - } else { - sig = "MCFG"; - } - build_header(linker, table_data, (void *)mcfg, sig, len, 1, NULL, NULL); + build_header(linker, table_data, (void *)mcfg, "MCFG", len, 1, NULL, NULL); } /* @@ -2604,6 +2591,9 @@ static bool acpi_get_mcfg(AcpiMcfgInfo *mcfg) } mcfg->mcfg_base = qnum_get_uint(qobject_to(QNum, o)); qobject_unref(o); + if (mcfg->mcfg_base == PCIE_BASE_ADDR_UNMAPPED) { + return false; + } o = object_property_get_qobject(pci_host, PCIE_HOST_MCFG_SIZE, NULL); assert(o); |