[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] merge
# HG changeset patch # User iap10@xxxxxxxxxxxxxxxxxxxxx # Node ID 323a46d272ff6b31c327bc3ff614ee675ef2c1f6 # Parent 1de047fc56f571097d8ccd401ce651a4a1ac1acf # Parent 050bf85fb870a7c6c8ad052229a3bd35bebaf802 merge diff -r 1de047fc56f5 -r 323a46d272ff linux-2.6-xen-sparse/arch/xen/i386/mm/highmem.c --- a/linux-2.6-xen-sparse/arch/xen/i386/mm/highmem.c Sat Aug 13 21:03:39 2005 +++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/highmem.c Sat Aug 13 21:55:11 2005 @@ -41,8 +41,7 @@ if (!pte_none(*(kmap_pte-idx))) BUG(); #endif - set_pte(kmap_pte-idx, mk_pte(page, prot)); - __flush_tlb_one(vaddr); + set_pte_at_sync(&init_mm, vaddr, kmap_pte-idx, mk_pte(page, prot)); return (void*) vaddr; } diff -r 1de047fc56f5 -r 323a46d272ff 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 Aug 13 21:03:39 2005 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h Sat Aug 13 21:55:11 2005 @@ -14,7 +14,28 @@ * hook is made available. */ #define set_pte(pteptr, pteval) (*(pteptr) = pteval) -#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) + +inline static void set_pte_at(struct mm_struct *mm, unsigned long addr, + pte_t *ptep, pte_t val ) +{ + if ( ((mm != current->mm) && (mm != &init_mm)) || + HYPERVISOR_update_va_mapping( (addr), (val), 0 ) ) + { + set_pte(ptep, val); + } +} + +inline static void set_pte_at_sync(struct mm_struct *mm, unsigned long addr, + pte_t *ptep, pte_t val ) +{ + if ( ((mm != current->mm) && (mm != &init_mm)) || + HYPERVISOR_update_va_mapping( (addr), (val), UVMF_INVLPG ) ) + { + set_pte(ptep, val); + xen_invlpg(addr); + } +} + #define set_pte_atomic(pteptr, pteval) set_pte(pteptr,pteval) #ifndef CONFIG_XEN_SHADOW_MODE diff -r 1de047fc56f5 -r 323a46d272ff 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 Aug 13 21:03:39 2005 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-3level.h Sat Aug 13 21:55:11 2005 @@ -68,7 +68,27 @@ xen_l1_entry_update((pteptr), (pteval)) # define set_pte_atomic(pteptr,pteval) set_pte(pteptr,pteval) #endif -#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) + +inline static void set_pte_at(struct mm_struct *mm, unsigned long addr, + pte_t *ptep, pte_t val ) +{ + if ( ((mm != current->mm) && (mm != &init_mm)) || + HYPERVISOR_update_va_mapping( (addr), (val), 0 ) ) + { + set_pte(ptep, val); + } +} + +inline static void set_pte_at_sync(struct mm_struct *mm, unsigned long addr, + pte_t *ptep, pte_t val ) +{ + if ( ((mm != current->mm) && (mm != &init_mm)) || + HYPERVISOR_update_va_mapping( (addr), (val), UVMF_INVLPG ) ) + { + set_pte(ptep, val); + xen_invlpg(addr); + } +} #ifdef CONFIG_XEN_SHADOW_MODE # define set_pmd(pmdptr,pmdval) \ diff -r 1de047fc56f5 -r 323a46d272ff linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h --- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h Sat Aug 13 21:03:39 2005 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h Sat Aug 13 21:55:11 2005 @@ -265,7 +265,16 @@ val &= ~(_PAGE_USER | _PAGE_DIRTY); return val & ~(_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED); } -#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) + +inline static void set_pte_at(struct mm_struct *mm, unsigned long addr, + pte_t *ptep, pte_t val ) +{ + if ( ((mm != current->mm) && (mm != &init_mm)) || + HYPERVISOR_update_va_mapping( (addr), (val), 0 ) ) + { + set_pte(ptep, val); + } +} #define pte_none(x) (!(x).pte) #define pte_present(x) ((x).pte & (_PAGE_PRESENT | _PAGE_PROTNONE)) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |