mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
x86/iommu: setup MMCFG ahead of IOMMU
Otherwise the PCI accesses to segments different than the first one done by the IOMMU initialization code would silently fail by returning all ones. Introduce a new helper, called pci_setup(), and move both the creation of PCI segment 0 internal data structures, plus the parsing of ACPI MMCFG table to it. This moves acpi_mmcfg_init() slightly earlier from acpi_boot_init() into pci_setup(). Note that further work will be needed to support systems where access methods to segments different than 0 is not discoverable by Xen. Fixes:3950f2485b('x86/x2APIC: defer probe until after IOMMU ACPI table parsing') Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> master commit:c292772b49master date: 2025-08-21 11:57:25 +0200
This commit is contained in:
1 parent
0e0e09205d
commit
3f250a375f
3 files changed
+9
-2
No files matched your search
@@ -748,8 +748,6 @@ int __init acpi_boot_init(void)
|
||||
|
||||
acpi_table_parse(ACPI_SIG_HPET, acpi_parse_hpet);
|
||||
|
||||
acpi_mmcfg_init();
|
||||
|
||||
erst_init();
|
||||
|
||||
acpi_hest_init();
|
||||
|
||||
@@ -1802,6 +1802,12 @@ void asmlinkage __init noreturn __start_xen(unsigned long mbi_p)
|
||||
*/
|
||||
setup_system_domains();
|
||||
|
||||
/*
|
||||
* Initialize PCI (create segment 0, setup MMCFG access) ahead of IOMMU
|
||||
* setup, as devices in segment > 0 must also be discoverable.
|
||||
*/
|
||||
acpi_mmcfg_init();
|
||||
|
||||
/*
|
||||
* IOMMU-related ACPI table parsing has to happen before APIC probing, for
|
||||
* check_x2apic_preenabled() to be able to observe respective findings, in
|
||||
|
||||
@@ -403,6 +403,9 @@ void __init acpi_mmcfg_init(void)
|
||||
|
||||
pci_segments_init();
|
||||
|
||||
if ( acpi_disabled )
|
||||
return;
|
||||
|
||||
/* MMCONFIG disabled */
|
||||
if ((pci_probe & PCI_PROBE_MMCONF) == 0)
|
||||
return;
|
||||
|
||||