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

[Xen-devel] [patch] phys_to_machine_mapping alignment on x86_64

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [patch] phys_to_machine_mapping alignment on x86_64
From: "Kazuo Moriwaka" <moriwaka@xxxxxxxxx>
Date: Wed, 30 Aug 2006 21:13:52 +0900
Delivery-date: Wed, 30 Aug 2006 05:14:18 -0700
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=JVjLVRVgsxxhMvCGqHSA0kyPwISBafYen9qOLHix24D2Xd+pT5m9pX0Bjq1jYNEbsORPixlAk/9EnDjqklCg49ajgxYm3HLdv9l3MpUsGpl14RhAUozc+cdBR5JtfjMQv+P0jutATxzDbZLv59+SDPXKqZgVA4eQp+W5Jx20iEs=
Envelope-to: www-data@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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

At x86_64 linux domain, phys_to_machine_mapping,
pfn_to_mfn_frame_list_list, and pfn_to_mfn_frame_list should be
aligned to pagesize, but it can be misaligned now.
If they aren't aligned to pagesize, it will cause fails while saving
the domain.
This patch fixed it.

regards,

Signed-off-by: Kazuo Moriwaka <moriwaka@xxxxxxxxxxxxx>

set phys_to_machine_mapping alignment to pagesize.

diff -r a47951e59cbf -r 3bb0d973dfde
linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c       Wed
Aug 30 09:47:24 2006 +0100
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c       Wed
Aug 30 20:31:42 2006 +0900
@@ -846,7 +846,7 @@ void __init setup_arch(char **cmdline_p)

               if (!xen_feature(XENFEAT_auto_translated_physmap)) {
                       /* Make sure we have a large enough P->M table. */
-                       phys_to_machine_mapping = alloc_bootmem(
+                       phys_to_machine_mapping = alloc_bootmem_pages(
                               end_pfn * sizeof(unsigned long));
                       memset(phys_to_machine_mapping, ~0,
                              end_pfn * sizeof(unsigned long));
@@ -863,7 +863,7 @@ void __init setup_arch(char **cmdline_p)
                        * list of frames that make up the p2m table. Used by
                         * save/restore.
                        */
-                       pfn_to_mfn_frame_list_list = alloc_bootmem(PAGE_SIZE);
+                       pfn_to_mfn_frame_list_list =
alloc_bootmem_pages(PAGE_SIZE);

HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list_list =
                               virt_to_mfn(pfn_to_mfn_frame_list_list);

@@ -873,7 +873,7 @@ void __init setup_arch(char **cmdline_p)
                                       k++;
                                       BUG_ON(k>=fpp);
                                       pfn_to_mfn_frame_list[k] =
-                                               alloc_bootmem(PAGE_SIZE);
+                                               alloc_bootmem_pages(PAGE_SIZE);
                                       pfn_to_mfn_frame_list_list[k] =

virt_to_mfn(pfn_to_mfn_frame_list[k]);
                                       j=0;


--
Kazuo Moriwaka

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [patch] phys_to_machine_mapping alignment on x86_64, Kazuo Moriwaka <=