[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 51/57] hw/i386/acpi: fix conflicting IO address range for acpi pci
From: |
Michael S. Tsirkin |
Subject: |
[PULL 51/57] hw/i386/acpi: fix conflicting IO address range for acpi pci hotplug in q35 |
Date: |
Tue, 5 Oct 2021 12:04:25 -0400 |
From: Ani Sinha <ani@anisinha.ca>
Change caf108bc58790 ("hw/i386/acpi-build: Add ACPI PCI hot-plug methods to
Q35")
selects an IO address range for acpi based PCI hotplug for q35 arbitrarily. It
starts at address 0x0cc4 and ends at 0x0cdb. At the time when the patch was
written but the final version of the patch was not yet pushed upstream, this
address range was free and did not conflict with any other IO address ranges.
However, with the following change, this address range was no
longer conflict free as in this change, the IO address range
(value of ACPI_PCIHP_SIZE) was incremented by four bytes:
b32bd763a1ca92 ("pci: introduce acpi-index property for PCI device")
This can be seen from the output of QMP command 'info mtree' :
0000000000000600-0000000000000603 (prio 0, i/o): acpi-evt
0000000000000604-0000000000000605 (prio 0, i/o): acpi-cnt
0000000000000608-000000000000060b (prio 0, i/o): acpi-tmr
0000000000000620-000000000000062f (prio 0, i/o): acpi-gpe0
0000000000000630-0000000000000637 (prio 0, i/o): acpi-smi
0000000000000cc4-0000000000000cdb (prio 0, i/o): acpi-pci-hotplug
0000000000000cd8-0000000000000ce3 (prio 0, i/o): acpi-cpu-hotplug
It shows that there is a region of conflict between IO regions of acpi
pci hotplug and acpi cpu hotplug.
Unfortunately, the change caf108bc58790 did not update the IO address range
appropriately before it was pushed upstream to accommodate the increased
length of the IO address space introduced in change b32bd763a1ca92.
Due to this bug, windows guests complain 'This device cannot find
enough free resources it can use' in the device manager panel for extended
IO buses. This issue also breaks the correct functioning of pci hotplug as the
following shows that the IO space for pci hotplug has been truncated:
(qemu) info mtree -f
FlatView #0
AS "I/O", root: io
Root memory region: io
0000000000000cc4-0000000000000cd7 (prio 0, i/o): acpi-pci-hotplug
0000000000000cd8-0000000000000cf7 (prio 0, i/o): acpi-cpu-hotplug
Therefore, in this fix, we adjust the IO address range for the acpi pci
hotplug so that it does not conflict with cpu hotplug and there is no
truncation of IO spaces. The starting IO address of PCI hotplug region
has been decremented by four bytes in order to accommodate four byte
increment in the IO address space introduced by change
b32bd763a1ca92 ("pci: introduce acpi-index property for PCI device")
After fixing, the following are the corrected IO ranges:
0000000000000600-0000000000000603 (prio 0, i/o): acpi-evt
0000000000000604-0000000000000605 (prio 0, i/o): acpi-cnt
0000000000000608-000000000000060b (prio 0, i/o): acpi-tmr
0000000000000620-000000000000062f (prio 0, i/o): acpi-gpe0
0000000000000630-0000000000000637 (prio 0, i/o): acpi-smi
0000000000000cc0-0000000000000cd7 (prio 0, i/o): acpi-pci-hotplug
0000000000000cd8-0000000000000ce3 (prio 0, i/o): acpi-cpu-hotplug
This change has been tested using a Windows Server 2019 guest VM. Windows
no longer complains after this change.
Fixes: caf108bc58790 ("hw/i386/acpi-build: Add ACPI PCI hot-plug methods to
Q35")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/561
Signed-off-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Julia Suvorova <jusual@redhat.com>
Message-Id: <20210916132838.3469580-3-ani@anisinha.ca>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/acpi/ich9.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/hw/acpi/ich9.h b/include/hw/acpi/ich9.h
index a329ce43ab..f04f1791bd 100644
--- a/include/hw/acpi/ich9.h
+++ b/include/hw/acpi/ich9.h
@@ -29,7 +29,7 @@
#include "hw/acpi/acpi_dev_interface.h"
#include "hw/acpi/tco.h"
-#define ACPI_PCIHP_ADDR_ICH9 0x0cc4
+#define ACPI_PCIHP_ADDR_ICH9 0x0cc0
typedef struct ICH9LPCPMRegs {
/*
--
MST
- [PULL 44/57] acpi: arm/virt: build_spcr: fix invalid cast, (continued)
- [PULL 44/57] acpi: arm/virt: build_spcr: fix invalid cast, Michael S. Tsirkin, 2021/10/05
- [PULL 41/57] acpi: arm: virt: build_dsdt: use acpi_table_begin()/acpi_table_end() instead of build_header(), Michael S. Tsirkin, 2021/10/05
- [PULL 43/57] acpi: arm/virt: convert build_iort() to endian agnostic build_append_FOO() API, Michael S. Tsirkin, 2021/10/05
- [PULL 46/57] acpi: arm/virt: build_gtdt: use acpi_table_begin()/acpi_table_end() instead of build_header(), Michael S. Tsirkin, 2021/10/05
- [PULL 47/57] acpi: build_facs: use build_append_int_noprefix() API to compose table, Michael S. Tsirkin, 2021/10/05
- [PULL 50/57] bios-tables-test: allow changes in DSDT ACPI tables for q35, Michael S. Tsirkin, 2021/10/05
- [PULL 06/57] vhost-vdpa: let net_vhost_vdpa_init() returns NetClientState *, Michael S. Tsirkin, 2021/10/05
- [PULL 48/57] acpi: remove no longer used build_header(), Michael S. Tsirkin, 2021/10/05
- [PULL 45/57] acpi: arm/virt: build_spcr: use acpi_table_begin()/acpi_table_end() instead of build_header(), Michael S. Tsirkin, 2021/10/05
- [PULL 49/57] acpi: AcpiGenericAddress no longer used to map/access fields of MMIO, drop packed attribute, Michael S. Tsirkin, 2021/10/05
- [PULL 51/57] hw/i386/acpi: fix conflicting IO address range for acpi pci hotplug in q35,
Michael S. Tsirkin <=
- [PULL 56/57] hw/i386/amd_iommu: Rename SysBus specific functions as amdvi_sysbus_X(), Michael S. Tsirkin, 2021/10/05
- [PULL 22/57] acpi: build_mcfg: use acpi_table_begin()/acpi_table_end() instead of build_header(), Michael S. Tsirkin, 2021/10/05
- [PULL 55/57] hw/i386/amd_iommu: Rename amdviPCI TypeInfo, Michael S. Tsirkin, 2021/10/05
- [PULL 53/57] virtio-balloon: Fix page-poison subsection name, Michael S. Tsirkin, 2021/10/05
- [PULL 54/57] nvdimm: release the correct device list, Michael S. Tsirkin, 2021/10/05
- [PULL 52/57] bios-tables-test: Update ACPI DSDT table golden blobs for q35, Michael S. Tsirkin, 2021/10/05
- [PULL 57/57] hw/i386/amd_iommu: Add description/category to TYPE_AMD_IOMMU_PCI, Michael S. Tsirkin, 2021/10/05
- [PULL 27/57] acpi: x86: build_dsdt: use acpi_table_begin()/acpi_table_end() instead of build_header(), Michael S. Tsirkin, 2021/10/05
- [PULL 33/57] acpi: build_waet: use acpi_table_begin()/acpi_table_end() instead of build_header(), Michael S. Tsirkin, 2021/10/05
- Re: [PULL 00/57] pc,pci,virtio: features, fixes, Richard Henderson, 2021/10/05