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 -3.0-testing <patchbot-3.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 21 Apr 2006 10:30:20 +0000
Delivery-date: Fri, 21 Apr 2006 04:40:57 -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 f79656988ecf191e75fd3cc63889c2893f0bdcec
# Parent  463fc8a9e7376a956c433de079a65893e9486e68
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 463fc8a9e737 -r f79656988ecf 
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:47 
2006 +0100
+++ b/linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c   Fri Apr 21 09:38:20 
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>