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] Remove shadow-translate Linux patches for now. We'll mer

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Remove shadow-translate Linux patches for now. We'll merge this stuff
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 30 Jan 2006 15:00:19 +0000
Delivery-date: Mon, 30 Jan 2006 15:24:21 +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 491a8798945e634976f05a69d6291b30674a172d
# Parent  3e7bcf1b6f706bb1fc2d51391fe656471542ff0d
Remove shadow-translate Linux patches for now. We'll merge this stuff
in piecemeal.

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

diff -r 3e7bcf1b6f70 -r 491a8798945e 
linux-2.6-xen-sparse/arch/xen/i386/kernel/ldt.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/ldt.c   Sat Jan 28 10:09:18 2006
+++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/ldt.c   Sat Jan 28 11:09:45 2006
@@ -59,8 +59,8 @@
                cpumask_t mask;
                preempt_disable();
 #endif
-               make_pages_readonly(pc->ldt, (pc->size * LDT_ENTRY_SIZE) /
-                                   PAGE_SIZE);
+               make_mmu_pages_readonly(pc->ldt, (pc->size * LDT_ENTRY_SIZE) /
+                                       PAGE_SIZE);
                load_LDT(pc);
 #ifdef CONFIG_SMP
                mask = cpumask_of_cpu(smp_processor_id());
@@ -70,7 +70,7 @@
 #endif
        }
        if (oldsize) {
-               make_pages_writable(oldldt, (oldsize * LDT_ENTRY_SIZE) /
+               make_mmu_pages_writable(oldldt, (oldsize * LDT_ENTRY_SIZE) /
                        PAGE_SIZE);
                if (oldsize*LDT_ENTRY_SIZE > PAGE_SIZE)
                        vfree(oldldt);
@@ -86,8 +86,8 @@
        if (err < 0)
                return err;
        memcpy(new->ldt, old->ldt, old->size*LDT_ENTRY_SIZE);
-       make_pages_readonly(new->ldt, (new->size * LDT_ENTRY_SIZE) /
-                           PAGE_SIZE);
+       make_mmu_pages_readonly(new->ldt, (new->size * LDT_ENTRY_SIZE) /
+                               PAGE_SIZE);
        return 0;
 }
 
@@ -119,9 +119,9 @@
        if (mm->context.size) {
                if (mm == current->active_mm)
                        clear_LDT();
-               make_pages_writable(mm->context.ldt,
-                                   (mm->context.size * LDT_ENTRY_SIZE) /
-                                   PAGE_SIZE);
+               make_mmu_pages_writable(mm->context.ldt,
+                                       (mm->context.size * LDT_ENTRY_SIZE) /
+                                       PAGE_SIZE);
                if (mm->context.size*LDT_ENTRY_SIZE > PAGE_SIZE)
                        vfree(mm->context.ldt);
                else
diff -r 3e7bcf1b6f70 -r 491a8798945e 
linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c        Sat Jan 28 
10:09:18 2006
+++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c        Sat Jan 28 
11:09:45 2006
@@ -113,20 +113,6 @@
        BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
 }
 
-unsigned long xen_pfn_hole_start(void)
-{
-       struct mmuext_op op;
-       op.cmd = MMUEXT_PFN_HOLE_BASE;
-       return HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF);
-}
-
-unsigned long xen_pfn_hole_size(void)
-{
-       struct mmuext_op op;
-       op.cmd = MMUEXT_PFN_HOLE_SIZE;
-       return HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF);
-}
-
 void xen_new_user_pt(unsigned long ptr)
 {
        struct mmuext_op op;
@@ -279,7 +265,6 @@
  */
 unsigned long *contiguous_bitmap;
 
-#ifndef CONFIG_XEN_SHADOW_MODE
 static void contiguous_bitmap_set(
        unsigned long first_page, unsigned long nr_pages)
 {
@@ -452,19 +437,6 @@
 
        balloon_unlock(flags);
 }
-#else
-int xen_create_contiguous_region(
-       unsigned long vstat, unsigned int order, unsigned int address_bits)
-{
-       if (order >= 1)
-               BUG();
-       return 0;
-}
-
-void xen_destroy_contiguous_region(unsigned long vstart, unsigned int order)
-{
-}
-#endif
 
 #ifdef __i386__
 int write_ldt_entry(void *ldt, int entry, __u32 entry_a, __u32 entry_b)
diff -r 3e7bcf1b6f70 -r 491a8798945e 
linux-2.6-xen-sparse/arch/xen/i386/mm/init.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/mm/init.c      Sat Jan 28 10:09:18 2006
+++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/init.c      Sat Jan 28 11:09:45 2006
@@ -597,7 +597,6 @@
        int tmp;
        int bad_ppro;
        unsigned long pfn;
-        unsigned long hole_start, hole_size;
 
        contiguous_bitmap = alloc_bootmem_low_pages(
                (max_low_pfn + 2*BITS_PER_LONG) >> 3);
@@ -644,12 +643,6 @@
                set_page_count(&mem_map[pfn], 1);
                totalram_pages++;
        }
-
-        /* Make the Xen hole reserved. */
-        hole_size = xen_pfn_hole_size();
-        hole_start = xen_pfn_hole_start();
-        for (pfn = hole_start; pfn < hole_start + hole_size; pfn++)
-                SetPageReserved(pfn_to_page(pfn));
 
        reservedpages = 0;
        for (tmp = 0; tmp < max_low_pfn; tmp++)
diff -r 3e7bcf1b6f70 -r 491a8798945e 
linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c   Sat Jan 28 10:09:18 2006
+++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c   Sat Jan 28 11:09:45 2006
@@ -389,11 +389,14 @@
        kmem_cache_free(pgd_cache, pgd);
 }
 
-
-void make_lowmem_page_readonly(void *va)
+#ifndef CONFIG_XEN_SHADOW_MODE
+void make_lowmem_mmu_page_readonly(void *va)
 {
        pte_t *pte;
        int rc;
+
+       if (xen_feature(writable_mmu_structures))
+               return;
 
        pte = virt_to_ptep(va);
        rc = HYPERVISOR_update_va_mapping(
@@ -401,10 +404,13 @@
        BUG_ON(rc);
 }
 
-void make_lowmem_page_writable(void *va)
+void make_lowmem_mmu_page_writable(void *va)
 {
        pte_t *pte;
        int rc;
+
+       if (xen_feature(writable_mmu_structures))
+               return;
 
        pte = virt_to_ptep(va);
        rc = HYPERVISOR_update_va_mapping(
@@ -412,11 +418,13 @@
        BUG_ON(rc);
 }
 
-
-void make_page_readonly(void *va)
+void make_mmu_page_readonly(void *va)
 {
        pte_t *pte;
        int rc;
+
+       if (xen_feature(writable_mmu_structures))
+               return;
 
        pte = virt_to_ptep(va);
        rc = HYPERVISOR_update_va_mapping(
@@ -430,15 +438,18 @@
                        kmap_flush_unused(); /* flush stale writable kmaps */
                else
 #endif
-                       make_lowmem_page_readonly(
+                       make_lowmem_mmu_page_readonly(
                                phys_to_virt(pfn << PAGE_SHIFT)); 
        }
 }
 
-void make_page_writable(void *va)
+void make_mmu_page_writable(void *va)
 {
        pte_t *pte;
        int rc;
+
+       if (xen_feature(writable_mmu_structures))
+               return;
 
        pte = virt_to_ptep(va);
        rc = HYPERVISOR_update_va_mapping(
@@ -450,70 +461,32 @@
 #ifdef CONFIG_HIGHMEM
                if (pfn < highstart_pfn)
 #endif
-                       make_lowmem_page_writable(
+                       make_lowmem_mmu_page_writable(
                                phys_to_virt(pfn << PAGE_SHIFT)); 
        }
 }
 
-void make_pages_readonly(void *va, unsigned nr)
-{
+void make_mmu_pages_readonly(void *va, unsigned int nr)
+{
+       if (xen_feature(writable_mmu_structures))
+               return;
+
        while (nr-- != 0) {
-               make_page_readonly(va);
+               make_mmu_page_readonly(va);
                va = (void *)((unsigned long)va + PAGE_SIZE);
        }
 }
 
-void make_pages_writable(void *va, unsigned nr)
-{
+void make_mmu_pages_writable(void *va, unsigned int nr)
+{
+       if (xen_feature(writable_mmu_structures))
+               return;
        while (nr-- != 0) {
-               make_page_writable(va);
+               make_mmu_page_writable(va);
                va = (void *)((unsigned long)va + PAGE_SIZE);
        }
 }
-
-#ifndef CONFIG_XEN_SHADOW_MODE
-void make_lowmem_mmu_page_readonly(void *va)
-{
-       if (xen_feature(writable_mmu_structures))
-               return;
-       make_lowmem_page_readonly(va);
-}
-
-void make_lowmem_mmu_page_writable(void *va)
-{
-       if (xen_feature(writable_mmu_structures))
-               return;
-       make_lowmem_page_writable(va);
-}
-
-void make_mmu_page_readonly(void *va)
-{
-       if (xen_feature(writable_mmu_structures))
-               return;
-       make_page_readonly(va);
-}
-
-void make_mmu_page_writable(void *va)
-{
-       if (xen_feature(writable_mmu_structures))
-               return;
-       make_page_writable(va);
-}
-
-void make_mmu_pages_readonly(void *va, unsigned int nr)
-{
-       if (xen_feature(writable_mmu_structures))
-               return;
-       make_pages_readonly(va, nr);
-}
-
-void make_mmu_pages_writable(void *va, unsigned int nr)
-{
-       if (xen_feature(writable_mmu_structures))
-               return;
-       make_pages_writable(va, nr);
-}
-#endif
+#endif /* CONFIG_XEN_SHADOW_MODE */
 
 static inline void pgd_walk_set_prot(void *pt, pgprot_t flags)
 {
@@ -564,8 +537,7 @@
 
 static void __pgd_pin(pgd_t *pgd)
 {
-       if (!xen_feature(writable_mmu_structures))
-               pgd_walk(pgd, PAGE_KERNEL_RO);
+       pgd_walk(pgd, PAGE_KERNEL_RO);
        xen_pgd_pin(__pa(pgd));
        set_bit(PG_pinned, &virt_to_page(pgd)->flags);
 }
@@ -573,8 +545,7 @@
 static void __pgd_unpin(pgd_t *pgd)
 {
        xen_pgd_unpin(__pa(pgd));
-       if (!xen_feature(writable_mmu_structures))
-               pgd_walk(pgd, PAGE_KERNEL);
+       pgd_walk(pgd, PAGE_KERNEL);
        clear_bit(PG_pinned, &virt_to_page(pgd)->flags);
 }
 
diff -r 3e7bcf1b6f70 -r 491a8798945e 
linux-2.6-xen-sparse/arch/xen/kernel/gnttab.c
--- a/linux-2.6-xen-sparse/arch/xen/kernel/gnttab.c     Sat Jan 28 10:09:18 2006
+++ b/linux-2.6-xen-sparse/arch/xen/kernel/gnttab.c     Sat Jan 28 11:09:45 2006
@@ -201,22 +201,25 @@
 }
 
 int
-gnttab_grant_foreign_transfer(domid_t domid, unsigned long pfn)
+gnttab_grant_foreign_transfer(domid_t domid)
 {
        int ref;
 
        if (unlikely((ref = get_free_entry()) == -1))
                return -ENOSPC;
-       gnttab_grant_foreign_transfer_ref(ref, domid, pfn);
+
+       shared[ref].frame = 0;
+       shared[ref].domid = domid;
+       wmb();
+       shared[ref].flags = GTF_accept_transfer;
 
        return ref;
 }
 
 void
-gnttab_grant_foreign_transfer_ref(grant_ref_t ref, domid_t domid,
-                                 unsigned long pfn)
-{
-       shared[ref].frame = pfn;
+gnttab_grant_foreign_transfer_ref(grant_ref_t ref, domid_t domid)
+{
+       shared[ref].frame = 0;
        shared[ref].domid = domid;
        wmb();
        shared[ref].flags = GTF_accept_transfer;
diff -r 3e7bcf1b6f70 -r 491a8798945e 
linux-2.6-xen-sparse/arch/xen/kernel/reboot.c
--- a/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c     Sat Jan 28 10:09:18 2006
+++ b/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c     Sat Jan 28 11:09:45 2006
@@ -74,7 +74,6 @@
 #endif
 
 
-#ifndef CONFIG_XEN_SHADOW_MODE
 static int __do_suspend(void *ignore)
 {
        int i, j, k, fpp;
@@ -217,13 +216,6 @@
 
        return err;
 }
-#else
-static int __do_suspend(void *ignore)
-{
-       printk(KERN_WARNING "Don't do suspend in shadow mode\n");
-       return -EOPNOTSUPP;
-}
-#endif
 
 static int shutdown_process(void *__unused)
 {
diff -r 3e7bcf1b6f70 -r 491a8798945e 
linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c
--- a/linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c    Sat Jan 28 10:09:18 2006
+++ b/linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c    Sat Jan 28 11:09:45 2006
@@ -239,7 +239,7 @@
                memcpy((void *)cpu_gdt_descr[cpu].address,
                       (void *)cpu_gdt_descr[0].address,
                       cpu_gdt_descr[0].size);
-               make_page_readonly((void *)cpu_gdt_descr[cpu].address);
+               make_mmu_page_readonly((void *)cpu_gdt_descr[cpu].address);
 
                cpu_set(cpu, cpu_possible_map);
 #ifdef CONFIG_HOTPLUG_CPU
diff -r 3e7bcf1b6f70 -r 491a8798945e 
linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c    Sat Jan 28 10:09:18 2006
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c    Sat Jan 28 11:09:45 2006
@@ -93,10 +93,13 @@
                BUG();
 }
 
-void make_page_readonly(void *va)
+void make_mmu_page_readonly(void *va)
 {
        pgd_t *pgd; pud_t *pud; pmd_t *pmd; pte_t pte, *ptep;
        unsigned long addr = (unsigned long) va;
+
+       if (xen_feature(writable_mmu_structures))
+               return;
 
        pgd = pgd_offset_k(addr);
        pud = pud_offset(pgd, addr);
@@ -108,20 +111,16 @@
                xen_l1_entry_update(ptep, pte); /* fallback */
 
        if ((addr >= VMALLOC_START) && (addr < VMALLOC_END))
-               make_page_readonly(__va(pte_pfn(pte) << PAGE_SHIFT));
-}
-
-void make_mmu_page_readonly(void *va)
-{
+               make_mmu_page_readonly(__va(pte_pfn(pte) << PAGE_SHIFT));
+}
+
+void make_mmu_page_writable(void *va)
+{
+       pgd_t *pgd; pud_t *pud; pmd_t *pmd; pte_t pte, *ptep;
+       unsigned long addr = (unsigned long) va;
+
        if (xen_feature(writable_mmu_structures))
                return;
-       make_page_readonly(va);
-}
-
-void make_page_writable(void *va)
-{
-       pgd_t *pgd; pud_t *pud; pmd_t *pmd; pte_t pte, *ptep;
-       unsigned long addr = (unsigned long) va;
 
        pgd = pgd_offset_k(addr);
        pud = pud_offset(pgd, addr);
@@ -133,44 +132,28 @@
                xen_l1_entry_update(ptep, pte); /* fallback */
 
        if ((addr >= VMALLOC_START) && (addr < VMALLOC_END))
-               make_page_writable(__va(pte_pfn(pte) << PAGE_SHIFT));
-}
-
-void make_mmu_page_writable(void *va)
+               make_mmu_page_writable(__va(pte_pfn(pte) << PAGE_SHIFT));
+}
+
+void make_mmu_pages_readonly(void *va, unsigned nr)
 {
        if (xen_feature(writable_mmu_structures))
                return;
-       make_page_writable(va);
-}
-
-void make_pages_readonly(void *va, unsigned nr)
-{
+
        while (nr-- != 0) {
-               make_page_readonly(va);
+               make_mmu_page_readonly(va);
                va = (void*)((unsigned long)va + PAGE_SIZE);
        }
 }
 
-void make_mmu_pages_readonly(void *va, unsigned nr)
+void make_mmu_pages_writable(void *va, unsigned nr)
 {
        if (xen_feature(writable_mmu_structures))
                return;
-       make_pages_readonly(va, nr);
-}
-
-void make_pages_writable(void *va, unsigned nr)
-{
        while (nr-- != 0) {
-               make_page_writable(va);
+               make_mmu_page_writable(va);
                va = (void*)((unsigned long)va + PAGE_SIZE);
        }
-}
-
-void make_mmu_pages_writable(void *va, unsigned nr)
-{
-       if (xen_feature(writable_mmu_structures))
-               return;
-       make_pages_writable(va, nr);
 }
 
 /*
diff -r 3e7bcf1b6f70 -r 491a8798945e 
linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c
--- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c        Sat Jan 28 
10:09:18 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c        Sat Jan 28 
11:09:45 2006
@@ -107,22 +107,9 @@
 #define WPRINTK(fmt, args...) \
        printk(KERN_WARNING "xen_mem: " fmt, ##args)
 
-static int page_is_xen_hole(unsigned long pfn)
-{
-       static unsigned long hole_start, hole_len = -1;
-       if (hole_len == -1) {
-               hole_start = xen_pfn_hole_start();
-               hole_len = xen_pfn_hole_size();
-       }
-       return pfn >= hole_start && pfn < hole_start + hole_len;
-}
-
 /* balloon_append: add the given page to the balloon. */
 static void balloon_append(struct page *page)
 {
-       if (page_is_xen_hole(page_to_pfn(page)))
-               panic("Attempt to add Xen-reserved pfn %lx to balloon.\n",
-                      page_to_pfn(page));
        /* Lowmem is re-populated first, so highmem pages go at list tail. */
        if (PageHighMem(page)) {
                list_add_tail(PAGE_TO_LIST(page), &ballooned_pages);
@@ -204,7 +191,6 @@
        for (i = 0; i < nr_pages; i++) {
                BUG_ON(page == NULL);
                frame_list[i] = page_to_pfn(page);;
-               BUG_ON(page_is_xen_hole(frame_list[i]));
                page = balloon_next_page(page);
        }
 
@@ -229,15 +215,12 @@
                BUG_ON(page == NULL);
 
                pfn = page_to_pfn(page);
-#ifndef CONFIG_XEN_SHADOW_MODE
-               /* In shadow mode, Xen handles this part for us. */
                BUG_ON(phys_to_machine_mapping_valid(pfn));
 
                /* Update P->M and M->P tables. */
                set_phys_to_machine(pfn, frame_list[i]);
                xen_machphys_update(frame_list[i], pfn);
-#endif
-
+            
                /* Link back into the page tables if not highmem. */
                if (pfn < max_low_pfn) {
                        int ret;
diff -r 3e7bcf1b6f70 -r 491a8798945e 
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Sat Jan 28 
10:09:18 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Sat Jan 28 
11:09:45 2006
@@ -586,8 +586,7 @@
                BUG_ON((signed short)ref < 0);
                np->grant_rx_ref[id] = ref;
                gnttab_grant_foreign_transfer_ref(ref,
-                                                 np->xbdev->otherend_id,
-                                                 __pa(skb->head) >> 
PAGE_SHIFT);
+                                                 np->xbdev->otherend_id);
                RING_GET_REQUEST(&np->rx, req_prod + i)->gref = ref;
                rx_pfn_array[i] = virt_to_mfn(skb->head);
 
@@ -803,11 +802,9 @@
                np->stats.rx_bytes += rx->status;
 
                /* Remap the page. */
-#ifndef CONFIG_XEN_SHADOW_MODE
                mmu->ptr = ((maddr_t)mfn << PAGE_SHIFT) | MMU_MACHPHYS_UPDATE;
                mmu->val  = __pa(skb->head) >> PAGE_SHIFT;
                mmu++;
-#endif
                MULTI_update_va_mapping(mcl, (unsigned long)skb->head,
                                        pfn_pte_ma(mfn, PAGE_KERNEL), 0);
                mcl++;
@@ -1002,8 +999,7 @@
                if ((unsigned long)np->rx_skbs[i] < __PAGE_OFFSET)
                        continue;
                gnttab_grant_foreign_transfer_ref(
-                       np->grant_rx_ref[i], np->xbdev->otherend_id,
-                       __pa(np->rx_skbs[i]->data) >> PAGE_SHIFT);
+                       np->grant_rx_ref[i], np->xbdev->otherend_id);
                RING_GET_REQUEST(&np->rx, requeue_idx)->gref =
                        np->grant_rx_ref[i];
                RING_GET_REQUEST(&np->rx, requeue_idx)->id = i;
diff -r 3e7bcf1b6f70 -r 491a8798945e 
linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypervisor.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypervisor.h        Sat Jan 
28 10:09:18 2006
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypervisor.h        Sat Jan 
28 11:09:45 2006
@@ -101,9 +101,6 @@
 void xen_set_ldt(unsigned long ptr, unsigned long bytes);
 void xen_machphys_update(unsigned long mfn, unsigned long pfn);
 
-unsigned long xen_pfn_hole_start(void);
-unsigned long xen_pfn_hole_size(void);
-
 #ifdef CONFIG_SMP
 #include <linux/cpumask.h>
 void xen_tlb_flush_all(void);
diff -r 3e7bcf1b6f70 -r 491a8798945e 
linux-2.6-xen-sparse/include/asm-xen/asm-i386/page.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/page.h      Sat Jan 28 
10:09:18 2006
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/page.h      Sat Jan 28 
11:09:45 2006
@@ -59,18 +59,8 @@
 #define clear_user_page(page, vaddr, pg)       clear_page(page)
 #define copy_user_page(to, from, vaddr, pg)    copy_page(to, from)
 
-/* Definitions for machine and pseudophysical addresses. */
-#ifdef CONFIG_X86_PAE
-typedef unsigned long long paddr_t;
-typedef unsigned long long maddr_t;
-#else
-typedef unsigned long paddr_t;
-typedef unsigned long maddr_t;
-#endif
-
 /**** MACHINE <-> PHYSICAL CONVERSION MACROS ****/
 #define INVALID_P2M_ENTRY      (~0UL)
-#ifndef CONFIG_XEN_SHADOW_MODE
 #define FOREIGN_FRAME(m)       ((m) | (1UL<<31))
 extern unsigned long *phys_to_machine_mapping;
 #define pfn_to_mfn(pfn)        \
@@ -103,6 +93,15 @@
        phys_to_machine_mapping[pfn] = mfn;
 }
 
+/* Definitions for machine and pseudophysical addresses. */
+#ifdef CONFIG_X86_PAE
+typedef unsigned long long paddr_t;
+typedef unsigned long long maddr_t;
+#else
+typedef unsigned long paddr_t;
+typedef unsigned long maddr_t;
+#endif
+
 static inline maddr_t phys_to_machine(paddr_t phys)
 {
        maddr_t machine = pfn_to_mfn(phys >> PAGE_SHIFT);
@@ -115,16 +114,7 @@
        phys = (phys << PAGE_SHIFT) | (machine & ~PAGE_MASK);
        return phys;
 }
-#else
-#define pfn_to_mfn(p) (p)
-#define mfn_to_pfn(m) (m)
-#define phys_to_machine(p) (p)
-#define machine_to_phys(m) (m)
-static inline void set_phys_to_machine(unsigned long pfn, unsigned long mfn)
-{
-       BUG_ON(pfn != mfn && mfn != INVALID_P2M_ENTRY);
-}
-#endif
+
 /*
  * These are used to make use of C type-checking..
  */
diff -r 3e7bcf1b6f70 -r 491a8798945e 
linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h    Sat Jan 
28 10:09:18 2006
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h    Sat Jan 
28 11:09:45 2006
@@ -64,7 +64,7 @@
 ({                                                                     \
        unsigned long mfn = pte_mfn(_pte);                              \
        unsigned long pfn = mfn_to_pfn(mfn);                            \
-       if ((pfn >= max_mapnr) || (pfn_to_mfn(pfn) != mfn))             \
+       if ((pfn >= max_mapnr) || (phys_to_machine_mapping[pfn] != mfn))\
                pfn = max_mapnr; /* special: force !pfn_valid() */      \
        pfn;                                                            \
 })
diff -r 3e7bcf1b6f70 -r 491a8798945e 
linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-3level.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-3level.h    Sat Jan 
28 10:09:18 2006
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-3level.h    Sat Jan 
28 11:09:45 2006
@@ -149,7 +149,7 @@
 ({                                                                     \
        unsigned long mfn = pte_mfn(_pte);                              \
        unsigned long pfn = mfn_to_pfn(mfn);                            \
-       if ((pfn >= max_mapnr) || (pfn_to_mfn(pfn) != mfn))             \
+       if ((pfn >= max_mapnr) || (phys_to_machine_mapping[pfn] != mfn))\
                pfn = max_mapnr; /* special: force !pfn_valid() */      \
        pfn;                                                            \
 })
diff -r 3e7bcf1b6f70 -r 491a8798945e 
linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable.h   Sat Jan 28 
10:09:18 2006
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable.h   Sat Jan 28 
11:09:45 2006
@@ -412,12 +412,6 @@
        ptep_set_access_flags(__vma, __address, __ptep, __entry, 1);    \
 } while (0)
 
-void make_lowmem_page_readonly(void *va);
-void make_lowmem_page_writable(void *va);
-void make_page_readonly(void *va);
-void make_page_writable(void *va);
-void make_pages_readonly(void *va, unsigned int nr);
-void make_pages_writable(void *va, unsigned int nr);
 #ifndef CONFIG_XEN_SHADOW_MODE
 void make_lowmem_mmu_page_readonly(void *va);
 void make_lowmem_mmu_page_writable(void *va);
diff -r 3e7bcf1b6f70 -r 491a8798945e 
linux-2.6-xen-sparse/include/asm-xen/gnttab.h
--- a/linux-2.6-xen-sparse/include/asm-xen/gnttab.h     Sat Jan 28 10:09:18 2006
+++ b/linux-2.6-xen-sparse/include/asm-xen/gnttab.h     Sat Jan 28 11:09:45 2006
@@ -50,7 +50,7 @@
 void gnttab_end_foreign_access(grant_ref_t ref, int readonly,
                               unsigned long page);
 
-int gnttab_grant_foreign_transfer(domid_t domid, unsigned long pfn);
+int gnttab_grant_foreign_transfer(domid_t domid);
 
 unsigned long gnttab_end_foreign_transfer_ref(grant_ref_t ref);
 unsigned long gnttab_end_foreign_transfer(grant_ref_t ref);
@@ -77,8 +77,7 @@
 void gnttab_grant_foreign_access_ref(grant_ref_t ref, domid_t domid,
                                     unsigned long frame, int readonly);
 
-void gnttab_grant_foreign_transfer_ref(grant_ref_t, domid_t domid,
-                                      unsigned long pfn);
+void gnttab_grant_foreign_transfer_ref(grant_ref_t, domid_t domid);
 
 #ifdef __ia64__
 #define gnttab_map_vaddr(map) __va(map.dev_bus_addr)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Remove shadow-translate Linux patches for now. We'll merge this stuff, Xen patchbot -unstable <=