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] No need to pin/unpin intermediate pagetables in x86/64 x

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] No need to pin/unpin intermediate pagetables in x86/64 xenlinux.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 13 Mar 2006 00:56:07 +0000
Delivery-date: Mon, 13 Mar 2006 00:57:11 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 57f21f67b532c65758fd9d6a9fde36183caa0296
# Parent  9aefef31e0407b027e992cb5e42ade033a0d292a
No need to pin/unpin intermediate pagetables in x86/64 xenlinux.

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

diff -r 9aefef31e040 -r 57f21f67b532 
linux-2.6-xen-sparse/arch/i386/mm/hypervisor.c
--- a/linux-2.6-xen-sparse/arch/i386/mm/hypervisor.c    Sun Mar 12 18:37:00 2006
+++ b/linux-2.6-xen-sparse/arch/i386/mm/hypervisor.c    Sun Mar 12 18:37:38 2006
@@ -201,56 +201,6 @@
        BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
 }
 
-void xen_pte_pin(unsigned long ptr)
-{
-       struct mmuext_op op;
-       op.cmd = MMUEXT_PIN_L1_TABLE;
-       op.arg1.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
-       BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
-}
-
-void xen_pte_unpin(unsigned long ptr)
-{
-       struct mmuext_op op;
-       op.cmd = MMUEXT_UNPIN_TABLE;
-       op.arg1.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
-       BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
-}
-
-#ifdef CONFIG_X86_64
-void xen_pud_pin(unsigned long ptr)
-{
-       struct mmuext_op op;
-       op.cmd = MMUEXT_PIN_L3_TABLE;
-       op.arg1.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
-       BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
-}
-
-void xen_pud_unpin(unsigned long ptr)
-{
-       struct mmuext_op op;
-       op.cmd = MMUEXT_UNPIN_TABLE;
-       op.arg1.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
-       BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
-}
-
-void xen_pmd_pin(unsigned long ptr)
-{
-       struct mmuext_op op;
-       op.cmd = MMUEXT_PIN_L2_TABLE;
-       op.arg1.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
-       BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
-}
-
-void xen_pmd_unpin(unsigned long ptr)
-{
-       struct mmuext_op op;
-       op.cmd = MMUEXT_UNPIN_TABLE;
-       op.arg1.mfn = pfn_to_mfn(ptr >> PAGE_SHIFT);
-       BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
-}
-#endif /* CONFIG_X86_64 */
-
 void xen_set_ldt(unsigned long ptr, unsigned long len)
 {
        struct mmuext_op op;
diff -r 9aefef31e040 -r 57f21f67b532 
linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c    Sun Mar 12 18:37:00 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c    Sun Mar 12 18:37:38 2006
@@ -244,7 +244,6 @@
        if (pud_none(*pud)) {
                pmd = (pmd_t *) spp_getpage(); 
                make_page_readonly(pmd, XENFEAT_writable_page_tables);
-               xen_pmd_pin(__pa(pmd));
                set_pud(pud, __pud(__pa(pmd) | _KERNPG_TABLE | _PAGE_USER));
                if (pmd != pmd_offset(pud, 0)) {
                        printk("PAGETABLE BUG #01! %p <-> %p\n", pmd, 
pmd_offset(pud,0));
@@ -255,7 +254,6 @@
        if (pmd_none(*pmd)) {
                pte = (pte_t *) spp_getpage();
                make_page_readonly(pte, XENFEAT_writable_page_tables);
-               xen_pte_pin(__pa(pte));
                set_pmd(pmd, __pmd(__pa(pte) | _KERNPG_TABLE | _PAGE_USER));
                if (pte != pte_offset_kernel(pmd, 0)) {
                        printk("PAGETABLE BUG #02!\n");
@@ -297,7 +295,6 @@
 
                pmd = (pmd_t *) spp_getpage(); 
                make_page_readonly(pmd, XENFEAT_writable_page_tables);
-               xen_pmd_pin(__pa(pmd));
 
                set_pud(pud, __pud(__pa(pmd) | _KERNPG_TABLE | _PAGE_USER));
 
@@ -311,7 +308,6 @@
        if (pmd_none(*pmd)) {
                pte = (pte_t *) spp_getpage();
                make_page_readonly(pte, XENFEAT_writable_page_tables);
-               xen_pte_pin(__pa(pte));
 
                set_pmd(pmd, __pmd(__pa(pte) | _KERNPG_TABLE | _PAGE_USER));
                if (pte != pte_offset_kernel(pmd, 0)) {
@@ -461,7 +457,6 @@
                }
                pte = pte_save;
                early_make_page_readonly(pte, XENFEAT_writable_page_tables);
-               xen_pte_pin(pte_phys);
                set_pmd(pmd, __pmd(pte_phys | _KERNPG_TABLE));
        }
 }
@@ -500,7 +495,6 @@
 
                pmd = alloc_static_page(&pmd_phys);
                early_make_page_readonly(pmd, XENFEAT_writable_page_tables);
-               xen_pmd_pin(pmd_phys);
                spin_lock(&init_mm.page_table_lock);
                set_pud(pud, __pud(pmd_phys | _KERNPG_TABLE));
                phys_pmd_init(pmd, paddr, end);
@@ -545,9 +539,6 @@
 
        xen_pgd_pin(__pa_symbol(init_level4_pgt));
        xen_pgd_pin(__pa_symbol(init_level4_user_pgt));
-       xen_pud_pin(__pa_symbol(level3_kernel_pgt));
-       xen_pud_pin(__pa_symbol(level3_user_pgt));
-       xen_pmd_pin(__pa_symbol(level2_kernel_pgt));
 
        set_pgd((pgd_t *)(init_level4_user_pgt + 511), 
                mk_kernel_pgd(__pa_symbol(level3_user_pgt)));
@@ -581,7 +572,6 @@
                        pte_page = alloc_static_page(&phys);
                        early_make_page_readonly(
                                pte_page, XENFEAT_writable_page_tables);
-                       xen_pte_pin(phys);
                        set_pmd(pmd, __pmd(phys | _KERNPG_TABLE | _PAGE_USER));
                } else {
                        addr = page[pmd_index(va)];
@@ -662,7 +652,6 @@
                        pud = alloc_static_page(&pud_phys);
                        early_make_page_readonly(pud, 
XENFEAT_writable_page_tables);
                }
-               xen_pud_pin(pud_phys);
                next = start + PGDIR_SIZE;
                if (next > end) 
                        next = end; 
@@ -943,7 +932,6 @@
                ClearPageReserved(virt_to_page(addr));
                set_page_count(virt_to_page(addr), 1);
                memset((void *)(addr & ~(PAGE_SIZE-1)), 0xcc, PAGE_SIZE); 
-               xen_pte_unpin(__pa(addr));
                make_page_writable(
                        __va(__pa(addr)), XENFEAT_writable_page_tables);
                /*
diff -r 9aefef31e040 -r 57f21f67b532 
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypervisor.h
--- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypervisor.h   Sun Mar 
12 18:37:00 2006
+++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypervisor.h   Sun Mar 
12 18:37:38 2006
@@ -79,12 +79,6 @@
 void xen_l4_entry_update(pgd_t *ptr, pgd_t val); /* x86_64 only */
 void xen_pgd_pin(unsigned long ptr);
 void xen_pgd_unpin(unsigned long ptr);
-void xen_pud_pin(unsigned long ptr); /* x86_64 only */
-void xen_pud_unpin(unsigned long ptr); /* x86_64 only */
-void xen_pmd_pin(unsigned long ptr); /* x86_64 only */
-void xen_pmd_unpin(unsigned long ptr); /* x86_64 only */
-void xen_pte_pin(unsigned long ptr);
-void xen_pte_unpin(unsigned long ptr);
 
 void xen_set_ldt(unsigned long ptr, unsigned long bytes);
 void xen_machphys_update(unsigned long mfn, unsigned long pfn);
diff -r 9aefef31e040 -r 57f21f67b532 
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pgalloc.h
--- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pgalloc.h    Sun Mar 
12 18:37:00 2006
+++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pgalloc.h    Sun Mar 
12 18:37:38 2006
@@ -181,7 +181,6 @@
 static inline void pte_free_kernel(pte_t *pte)
 {
        BUG_ON((unsigned long)pte & (PAGE_SIZE-1));
-        xen_pte_unpin(__pa(pte));
         make_page_writable(pte, XENFEAT_writable_page_tables);
        free_page((unsigned long)pte); 
 }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] No need to pin/unpin intermediate pagetables in x86/64 xenlinux., Xen patchbot -unstable <=