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-changelog

[Xen-changelog] PAE pgd construction code should use clone_pgd_range().

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] PAE pgd construction code should use clone_pgd_range().
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 21 Apr 2006 16:42:18 +0000
Delivery-date: Fri, 21 Apr 2006 09:48:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 72adf2025a9333546fdbe4a2dc49cccb87e699a4
# Parent  376d51321a3adce521e3646ac2703987c8a13f09
PAE pgd construction code should use clone_pgd_range().
Also fix the loop that allocates users pmds.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 376d51321a3a -r 72adf2025a93 
linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c   Fri Apr 21 09:14:07 
2006 +0100
+++ b/linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c   Fri Apr 21 09:37:22 
2006 +0100
@@ -306,14 +306,14 @@ void pgd_ctor(void *pgd, kmem_cache_t *c
                        BUG_ON(rc);
                }
                if (HAVE_SHARED_KERNEL_PMD)
-                       memcpy((pgd_t *)pgd + USER_PTRS_PER_PGD,
-                              swapper_pg_dir + USER_PTRS_PER_PGD,
-                              (PTRS_PER_PGD - USER_PTRS_PER_PGD) * 
sizeof(pgd_t));
+                       clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD,
+                                       swapper_pg_dir + USER_PTRS_PER_PGD,
+                                       KERNEL_PGD_PTRS);
        } else {
                spin_lock_irqsave(&pgd_lock, flags);
-               memcpy((pgd_t *)pgd + USER_PTRS_PER_PGD,
-                      swapper_pg_dir + USER_PTRS_PER_PGD,
-                      (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t));
+               clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD,
+                               swapper_pg_dir + USER_PTRS_PER_PGD,
+                               KERNEL_PGD_PTRS);
                memset(pgd, 0, USER_PTRS_PER_PGD*sizeof(pgd_t));
                pgd_list_add(pgd);
                spin_unlock_irqrestore(&pgd_lock, flags);
@@ -360,7 +360,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
                        pmd_t *pmd = kmem_cache_alloc(pmd_cache, GFP_KERNEL);
                        if (!pmd)
                                goto out_oom;
-                       set_pgd(&pgd[USER_PTRS_PER_PGD], __pgd(1 + __pa(pmd)));
+                       set_pgd(&pgd[i], __pgd(1 + __pa(pmd)));
                }
 
                spin_lock_irqsave(&pgd_lock, flags);

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

<Prev in Thread] Current Thread [Next in Thread>