[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging-4.20] x86/iommu: setup MMCFG ahead of IOMMU
commit a98591e217b7d1bdd5bb27d81184456bb69771b2 Author: Roger Pau Monné <roger.pau@xxxxxxxxxx> AuthorDate: Wed Sep 3 13:56:27 2025 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Wed Sep 3 13:56:27 2025 +0200 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: 3950f2485bbc ('x86/x2APIC: defer probe until after IOMMU ACPI table parsing') Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> master commit: c292772b4945d3a264a61c3c1920f1aebd17998b master date: 2025-08-21 11:57:25 +0200 --- xen/arch/x86/acpi/boot.c | 2 -- xen/arch/x86/setup.c | 6 ++++++ xen/arch/x86/x86_64/mmconfig-shared.c | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/acpi/boot.c b/xen/arch/x86/acpi/boot.c index 3901f9d982..1ca2360e00 100644 --- a/xen/arch/x86/acpi/boot.c +++ b/xen/arch/x86/acpi/boot.c @@ -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(); diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 6e49d2705b..10d55884ab 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -1897,6 +1897,12 @@ void asmlinkage __init noreturn __start_xen(void) */ 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 diff --git a/xen/arch/x86/x86_64/mmconfig-shared.c b/xen/arch/x86/x86_64/mmconfig-shared.c index 77ba1e28f1..d2ec3d808f 100644 --- a/xen/arch/x86/x86_64/mmconfig-shared.c +++ b/xen/arch/x86/x86_64/mmconfig-shared.c @@ -404,6 +404,9 @@ void __init acpi_mmcfg_init(void) pci_segments_init(); + if ( acpi_disabled ) + return; + /* MMCONFIG disabled */ if ((pci_probe & PCI_PROBE_MMCONF) == 0) return; -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.20
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |