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

[Xen-changelog] There is no need to pin page tables when XENFEAT_writable_page_tables



# HG changeset patch
# User Ian.Campbell@xxxxxxxxxxxxx
# Node ID f00e257d200c0178e15eb32a0cb1fbf66e739971
# Parent  06e3c5ef29797bb73065b785fca1ae6a141217d8
There is no need to pin page tables when XENFEAT_writable_page_tables
is enabled.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxxxxx>

diff -r 06e3c5ef2979 -r f00e257d200c 
linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c   Wed Mar 15 10:09:20 2006
+++ b/linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c   Wed Mar 15 10:33:43 2006
@@ -587,6 +587,8 @@
 
 void mm_pin(struct mm_struct *mm)
 {
+       if (xen_feature(XENFEAT_writable_page_tables))
+           return;
        spin_lock(&mm->page_table_lock);
        __pgd_pin(mm->pgd);
        spin_unlock(&mm->page_table_lock);
@@ -594,6 +596,8 @@
 
 void mm_unpin(struct mm_struct *mm)
 {
+       if (xen_feature(XENFEAT_writable_page_tables))
+           return;
        spin_lock(&mm->page_table_lock);
        __pgd_unpin(mm->pgd);
        spin_unlock(&mm->page_table_lock);
@@ -602,6 +606,8 @@
 void mm_pin_all(void)
 {
        struct page *page;
+       if (xen_feature(XENFEAT_writable_page_tables))
+           return;
        for (page = pgd_list; page; page = (struct page *)page->index) {
                if (!test_bit(PG_pinned, &page->flags))
                        __pgd_pin((pgd_t *)page_address(page));
diff -r 06e3c5ef2979 -r f00e257d200c 
linux-2.6-xen-sparse/arch/x86_64/mm/pageattr-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/mm/pageattr-xen.c        Wed Mar 15 
10:09:20 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/mm/pageattr-xen.c        Wed Mar 15 
10:33:43 2006
@@ -71,6 +71,9 @@
 
 void mm_pin(struct mm_struct *mm)
 {
+       if (xen_feature(XENFEAT_writable_page_tables))
+               return;
+
        spin_lock(&mm->page_table_lock);
 
        mm_walk(mm, PAGE_KERNEL_RO);
@@ -94,6 +97,9 @@
 
 void mm_unpin(struct mm_struct *mm)
 {
+       if (xen_feature(XENFEAT_writable_page_tables))
+               return;
+
        spin_lock(&mm->page_table_lock);
 
        xen_pgd_unpin(__pa(mm->pgd));
@@ -116,6 +122,9 @@
 
 void mm_pin_all(void)
 {
+       if (xen_feature(XENFEAT_writable_page_tables))
+               return;
+
        while (!list_empty(&mm_unpinned))       
                mm_pin(list_entry(mm_unpinned.next, struct mm_struct,
                                  context.unpinned));

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


 


Rackspace

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