WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] RE: [PATCH] to fix ACPI slit table access at runtime

To: Jan Beulich <JBeulich@xxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: RE: [Xen-devel] RE: [PATCH] to fix ACPI slit table access at runtime
From: "Kamble, Nitin A" <nitin.a.kamble@xxxxxxxxx>
Date: Fri, 26 Feb 2010 10:37:10 -0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 26 Feb 2010 10:37:46 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4B8796120200007800031701@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <8EA2C2C4116BF44AB370468FBF85A7770124F8B8CF@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C7AC6B91.B623%keir.fraser@xxxxxxxxxxxxx> <8EA2C2C4116BF44AB370468FBF85A7770124F8BB50@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4B8796120200007800031701@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acq2vsZiRG51DNnAQiCAyKMQDJK9NwAU9orA
Thread-topic: [Xen-devel] RE: [PATCH] to fix ACPI slit table access at runtime
Thanks Jan for point it out. Keir already took care of that part.
Regards,
Nitin


-----Original Message-----
From: Jan Beulich [mailto:JBeulich@xxxxxxxxxx] 
Sent: Friday, February 26, 2010 12:36 AM
To: Keir Fraser; Kamble, Nitin A
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] RE: [PATCH] to fix ACPI slit table access at runtime

But the alloc_boot_pages() isn't done on x86-64 only, as Keir pointed
out has to be the case.

Jan

>>> "Kamble, Nitin A" <nitin.a.kamble@xxxxxxxxx> 25.02.10 20:31 >>>
> Keir, here is the updated patch. I did verify that it is giving right 
> information at runtime.

This is re-updated and bit simplified patch.
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@xxxxxxxxx>


diff -r b474725a242b xen/arch/x86/srat.c
--- a/xen/arch/x86/srat.c       Thu Feb 25 07:50:38 2010 -0800
+++ b/xen/arch/x86/srat.c       Fri Feb 26 03:26:08 2010 -0800
@@ -140,11 +140,18 @@
 /* Callback for SLIT parsing */
 void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
 {
+       unsigned long mfn;
        if (!slit_valid(slit)) {
                printk(KERN_INFO "ACPI: SLIT table looks invalid. Not used.\n");
                return;
        }
-       acpi_slit = slit;
+       mfn = alloc_boot_pages(PFN_UP(slit->header.length), 1);
+       if (!mfn) {
+               printk(KERN_ERR "ACPI: Unable to allocate memory for saving 
ACPI SLIT numa information.\n");
+               return;
+       }
+       acpi_slit = mfn_to_virt(mfn);
+       memcpy(acpi_slit, slit, slit->header.length);
 }
 
 /* Callback for Proximity Domain -> LAPIC mapping */


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx 
http://lists.xensource.com/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel