Skip to contentSkip to conversation

q35: acpi: do not create dummy MCFG table

PATCH In review Igor Mammedov 3 participants 11 messages Apr 9, 2019 – Apr 11, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 hw/i386/acpi-build.c | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)
hw/i386/acpi-build.c +4 -14
index 416da31..8671e25 100644
@@ -2401,7 +2401,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);
@@ -2411,19 +2410,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);
 }
 
 /*
@@ -2592,6 +2579,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);
Signature · 1 line
2.7.4
#1 lore raw
Quoted 7 lines · Igor Mammedov

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.

I am not sure getting the "versioned Q35" correctly. Seems originally there is q35-1.4?

commit bf3caa3dc17552b323cec6831301a22cfc98ecd5

Author: Paolo Bonzini <[email protected]>
Date:   Fri Feb 8 14:06:15 2013 +0100

pc: add compatibility machine types for 1.4

Adds both pc-i440fx-1.4 and pc-q35-1.4.

Signature · 2 lines
Wei Yang
Help you, Help me
#2 lore raw
Quoted 12 lines · On Wed, 10 Apr 2019 09:12:31 +0800 Wei Yang <[email protected]>…
Quoted 7 lines · Igor Mammedov

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.

I am not sure getting the "versioned Q35" correctly. Seems originally there is q35-1.4?

Quoted 7 lines

commit bf3caa3dc17552b323cec6831301a22cfc98ecd5

Author: Paolo Bonzini <[email protected]>
Date:   Fri Feb 8 14:06:15 2013 +0100

pc: add compatibility machine types for 1.4

Adds both pc-i440fx-1.4 and pc-q35-1.4.

current upstream has only pc-q35-2.4 as earliest versioned Q35 machine type (try to run: qemu-system-x86_64 -M help)

#3 lore raw
Quoted 19 lines · Igor Mammedov
Quoted 16 lines · On Wed, 10 Apr 2019 09:12:31 +0800 Wei Yang <[email protected]>…
Quoted 7 lines · Igor Mammedov

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.

I am not sure getting the "versioned Q35" correctly. Seems originally there is q35-1.4?

commit bf3caa3dc17552b323cec6831301a22cfc98ecd5

Author: Paolo Bonzini <[email protected]>
Date:   Fri Feb 8 14:06:15 2013 +0100
Quoted 6 lines
Quoted 3 lines

pc: add compatibility machine types for 1.4

Adds both pc-i440fx-1.4 and pc-q35-1.4.

current upstream has only pc-q35-2.4 as earliest versioned Q35 machine type (try to run: qemu-system-x86_64 -M help)

Yes, I see those old type are removed. This means we don't want to support those old types, right? Because those old types can't be migrated to latest upstream qemu.

Signature · 2 lines
Wei Yang
Help you, Help me
#4 lore raw
Quoted 22 lines · On Wed, 10 Apr 2019 22:01:53 +0800 Wei Yang <[email protected]>…
Quoted 21 lines · Igor Mammedov
Quoted 18 lines · On Wed, 10 Apr 2019 09:12:31 +0800 Wei Yang <[email protected]>…
Quoted 7 lines · Igor Mammedov

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.

I am not sure getting the "versioned Q35" correctly. Seems originally there is q35-1.4?

commit bf3caa3dc17552b323cec6831301a22cfc98ecd5

Author: Paolo Bonzini <[email protected]>
Date:   Fri Feb 8 14:06:15 2013 +0100

pc: add compatibility machine types for 1.4

Quoted 8 lines
Quoted 4 lines
Quoted 1 line
    Adds both pc-i440fx-1.4 and pc-q35-1.4.  

current upstream has only pc-q35-2.4 as earliest versioned Q35 machine type (try to run: qemu-system-x86_64 -M help)

Yes, I see those old type are removed. This means we don't want to support those old types, right? Because those old types can't be migrated to latest upstream qemu.

Exactly

#5 lore raw
In reply to Igor Mammedov
Quoted 6 lines · Igor Mammedov

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.

I think we should keep table blob the same size on source/destination.

But with resizable MemoryRegion, we don't need to reserve some dummy space. Because we can expand it later.

Quoted 23 lines

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.

---
hw/i386/acpi-build.c | 18 ++++--------------

1 file changed, 4 insertions(+), 14 deletions(-)
hw/i386/acpi-build.c +0 -1
index 416da31..8671e25 100644
@@ -2401,7 +2401,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);

hw/i386/acpi-build.c build_mcfg_q35(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info) · line 2414

Quoted 4 lines
hw/i386/acpi-build.c +0 -1
@@ -2411,19 +2410,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.

I want to cnfirm what is "enabled or disabled by guest" here.

If we don't reserve mcfg and "guest" enable mcfg during running, the ACPI table size changed. But the destination still has the original table size, since destination "guest" keep sleep during this period.

Now the migration would face table size difference and break migration?

Quoted 28 lines
hw/i386/acpi-build.c +4 -12
-     * 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);
 }
 
 /*
@@ -2592,6 +2579,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);
Signature · 1 line
2.7.4
Signature · 2 lines
Wei Yang
Help you, Help me
#6 lore raw

On Wed, 10 Apr 2019 22:27:56 +0800
Wei Yang <[email protected]> wrote:

[...]

Quoted 7 lines

hw/i386/acpi-build.c build_mcfg_q35(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info) · line 2414

Quoted 5 lines
hw/i386/acpi-build.c +0 -1
@@ -2411,19 +2410,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.  

I want to cnfirm what is "enabled or disabled by guest" here.

Firmware theoretically during PCI initialization may disable ECAM support and that's when we do no need MCFG. In practice that's not happening (SeaBIOS or UEFI) but we in case there is out there a firmware that does disable ECAM we do not generate MCFG.

Note:
ACPI tables generated twice, 1st when QEMU starts and the second time when firmware accesses fwcfg to read blobs for the 1st time. The later happens after PCI subsystem was initialized by firmware. At that time we know if ECAM was enabled or not.

Quoted 5 lines

If we don't reserve mcfg and "guest" enable mcfg during running, the ACPI table size changed. But the destination still has the original table size, since destination "guest" keep sleep during this period.

Now the migration would face table size difference

with commit a1666142db we do not care as all the tables created on source will be migrated to destination as is overwriting whatever blobs destination created on startup.

Quoted 1 line

and break migration?

nope,

to help you figure out why it works
look at what following git commits did:
git log c8d6f66ae7..a1666142db
and pay attention to 'used_length'

Quoted 30 lines
Quoted 29 lines
hw/i386/acpi-build.c +4 -12
-     * 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);
 }
 
 /*
@@ -2592,6 +2579,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);
Signature · 1 line
2.7.4  
#7 lore raw
Quoted 17 lines · Igor Mammedov

On Wed, 10 Apr 2019 22:27:56 +0800
Wei Yang <[email protected]> wrote:

[...]

Quoted 7 lines

hw/i386/acpi-build.c build_mcfg_q35(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info) · line 2414

Quoted 5 lines
hw/i386/acpi-build.c +0 -1
@@ -2411,19 +2410,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.  

I want to cnfirm what is "enabled or disabled by guest" here.

Firmware theoretically during PCI initialization may disable ECAM support and that's when we do no need MCFG. In practice that's not happening (SeaBIOS or UEFI) but we in case there is out there a firmware that does disable ECAM we do not generate MCFG.

Quoted 6 lines

Note:
ACPI tables generated twice, 1st when QEMU starts and the second time when firmware accesses fwcfg to read blobs for the 1st time. The later happens after PCI subsystem was initialized by firmware. At that time we know if ECAM was enabled or not.

That's much clear, thanks :-)

So this is the guest BIOS instead of guest kernel who may disable/enable it.

Quoted 10 lines
Quoted 5 lines

If we don't reserve mcfg and "guest" enable mcfg during running, the ACPI table size changed. But the destination still has the original table size, since destination "guest" keep sleep during this period.

Now the migration would face table size difference

with commit a1666142db we do not care as all the tables created on source will be migrated to destination as is overwriting whatever blobs destination created on startup.

Quoted 8 lines
Quoted 1 line

and break migration?

nope,

to help you figure out why it works
look at what following git commits did:
git log c8d6f66ae7..a1666142db
and pay attention to 'used_length'

To be honest, this is what I feel confused in your previous reply.

First I want to confirm both fields in RAMBlock affects the migration:

* used_length
* max_length

Both of them should be the same on both source/destination, otherwise the migration would fail.

Then I thought the migration would be broken if source/destination has different knowledge about acpi table size. Because this will introduce different value of used_length, even we have resizable MemoryRegion.

The 1st time ACPI generation flow:

    acpi_add_rom_blob
        rom_add_blob
            rom_set_mr
                memory_region_init_resizable_ram
                    qemu_ram_alloc_resizable
    		        new_block->used_length = size
    		        new_block->max_length = max_size

The 2nd time ACPI generation flow:

    acpi_ram_update
        memory_regioin_ram_resize
            qemu_ram_resize
                block->used_length = new_size

The max_length is always the same, while used_length would be changed to the actual table_blob size.

In case source/destination has different knowledge about acpi table size, the table_blob size(even after aligned) could be different.

This is why I thought there is still some chance to break migration after resizable MemoryRegion.

Do I miss something?

Signature · 2 lines
Wei Yang
Help you, Help me
#8 lore raw
Quoted 50 lines · On Thu, 11 Apr 2019 09:32:11 +0800 Wei Yang <[email protected]>…
Quoted 17 lines · Igor Mammedov

On Wed, 10 Apr 2019 22:27:56 +0800
Wei Yang <[email protected]> wrote:

[...]

Quoted 7 lines

hw/i386/acpi-build.c build_mcfg_q35(GArray *table_data, BIOSLinker *linker, AcpiMcfgInfo *info) · line 2414

Quoted 5 lines
hw/i386/acpi-build.c +0 -1
@@ -2411,19 +2410,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.    

I want to cnfirm what is "enabled or disabled by guest" here.

Firmware theoretically during PCI initialization may disable ECAM support and that's when we do no need MCFG. In practice that's not happening (SeaBIOS or UEFI) but we in case there is out there a firmware that does disable ECAM we do not generate MCFG.

Quoted 6 lines

Note:
ACPI tables generated twice, 1st when QEMU starts and the second time when firmware accesses fwcfg to read blobs for the 1st time. The later happens after PCI subsystem was initialized by firmware. At that time we know if ECAM was enabled or not.

That's much clear, thanks :-)

So this is the guest BIOS instead of guest kernel who may disable/enable it.

Quoted 10 lines
Quoted 5 lines

If we don't reserve mcfg and "guest" enable mcfg during running, the ACPI table size changed. But the destination still has the original table size, since destination "guest" keep sleep during this period.

Now the migration would face table size difference

with commit a1666142db we do not care as all the tables created on source will be migrated to destination as is overwriting whatever blobs destination created on startup.

Quoted 8 lines
Quoted 1 line

and break migration?

nope,

to help you figure out why it works
look at what following git commits did:
git log c8d6f66ae7..a1666142db
and pay attention to 'used_length'

To be honest, this is what I feel confused in your previous reply.

Quoted 7 lines

First I want to confirm both fields in RAMBlock affects the migration:

* used_length
* max_length

Both of them should be the same on both source/destination, otherwise the migration would fail.

well, it works fine for me.
Where do you see max_length being used during migration?

Quoted 24 lines

Then I thought the migration would be broken if source/destination has different knowledge about acpi table size. Because this will introduce different value of used_length, even we have resizable MemoryRegion.

The 1st time ACPI generation flow:

    acpi_add_rom_blob
        rom_add_blob
            rom_set_mr
                memory_region_init_resizable_ram
                    qemu_ram_alloc_resizable
    		        new_block->used_length = size
    		        new_block->max_length = max_size

The 2nd time ACPI generation flow:

    acpi_ram_update
        memory_regioin_ram_resize
            qemu_ram_resize
                block->used_length = new_size

The max_length is always the same, while used_length would be changed to the actual table_blob size.

Quoted 7 lines

In case source/destination has different knowledge about acpi table size, the table_blob size(even after aligned) could be different.

This is why I thought there is still some chance to break migration after resizable MemoryRegion.

Do I miss something?

yes, you did, max_length does not influence migration stream.
see what above mentioned commits and ram_load() -> "if (length != block->used_length)" do.

#9 lore raw
Quoted 3 lines · Igor Mammedov

On Thu, 11 Apr 2019 09:32:11 +0800
Wei Yang <[email protected]> wrote:

[...]

Quoted 4 lines
Quoted 4 lines

To be honest, this is what I feel confused in your previous reply.

First I want to confirm both fields in RAMBlock affects the migration:

Quoted 8 lines
Quoted 5 lines

* used_length
* max_length

Both of them should be the same on both source/destination, otherwise the migration would fail.

well, it works fine for me.
Where do you see max_length being used during migration?

I asked my colleague, but seems you are right.

Quoted 28 lines
Quoted 28 lines

Then I thought the migration would be broken if source/destination has different knowledge about acpi table size. Because this will introduce different value of used_length, even we have resizable MemoryRegion.

The 1st time ACPI generation flow:

    acpi_add_rom_blob
        rom_add_blob
            rom_set_mr
                memory_region_init_resizable_ram
                    qemu_ram_alloc_resizable
    		        new_block->used_length = size
    		        new_block->max_length = max_size

The 2nd time ACPI generation flow:

    acpi_ram_update
        memory_regioin_ram_resize
            qemu_ram_resize
                block->used_length = new_size

The max_length is always the same, while used_length would be changed to the actual table_blob size.

In case source/destination has different knowledge about acpi table size, the table_blob size(even after aligned) could be different.

Quoted 7 lines
Quoted 4 lines

This is why I thought there is still some chance to break migration after resizable MemoryRegion.

Do I miss something?

yes, you did, max_length does not influence migration stream.
see what above mentioned commits and ram_load() -> "if (length != block->used_length)" do.

I see this in the code.

So the destination will check length and adjust self's length if it doesn't equal to the source.

Thanks :-)

Signature · 2 lines
Wei Yang
Help you, Help me
Reviewed-by on v1 1/1
#10 lore raw
In reply to Igor Mammedov
Quoted 7 lines · Igor Mammedov

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.

Quoted 5 lines

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.

Quoted 50 lines

---
hw/i386/acpi-build.c | 18 ++++--------------

1 file changed, 4 insertions(+), 14 deletions(-)
hw/i386/acpi-build.c +4 -14
index 416da31..8671e25 100644
@@ -2401,7 +2401,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);
@@ -2411,19 +2410,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);
 }
 
 /*
@@ -2592,6 +2579,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);
Signature · 1 line
2.7.4
Signature · 2 lines
Wei Yang
Help you, Help me