]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commitdiff
x86/srat: vmap the pages for acpi_slit
authorHongyan Xia <hongyxia@amazon.com>
Tue, 6 Feb 2024 10:55:49 +0000 (11:55 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 6 Feb 2024 10:55:49 +0000 (11:55 +0100)
This avoids the assumption that boot pages are in the direct map.

Signed-off-by: Hongyan Xia <hongyxia@amazon.com>
Signed-off-by: Julien Grall <jgrall@amazon.com>
Signed-off-by: Elias El Yandouzi <eliasely@amazon.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/srat.c

index 3f70338e6e235079ff262fa1fd212cf5b3c301c5..688f410287d4a9c47ef21ff8b4cf78e174490ac9 100644 (file)
@@ -135,7 +135,9 @@ void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
                return;
        }
        mfn = alloc_boot_pages(PFN_UP(slit->header.length), 1);
-       acpi_slit = mfn_to_virt(mfn_x(mfn));
+       acpi_slit = vmap_contig(mfn, PFN_UP(slit->header.length));
+       if ( !acpi_slit )
+               panic("Unable to map the ACPI SLIT. Retry with numa=off");
        memcpy(acpi_slit, slit, slit->header.length);
 }