[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] x86/srat: vmap the pages for acpi_slit



commit 8ac8999d7011c4339a14ce01f2a9d1e6801eefb1
Author:     Hongyan Xia <hongyxia@xxxxxxxxxx>
AuthorDate: Tue Feb 6 11:55:49 2024 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Feb 6 11:55:49 2024 +0100

    x86/srat: vmap the pages for acpi_slit
    
    This avoids the assumption that boot pages are in the direct map.
    
    Signed-off-by: Hongyan Xia <hongyxia@xxxxxxxxxx>
    Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
    Signed-off-by: Elias El Yandouzi <eliasely@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/arch/x86/srat.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/srat.c b/xen/arch/x86/srat.c
index 3f70338e6e..688f410287 100644
--- a/xen/arch/x86/srat.c
+++ b/xen/arch/x86/srat.c
@@ -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);
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.