ia64/xen-unstable

changeset 9170:0f905da1451d

[IA64] Fixed PGT and PGC flags

This patch fixed PGT and PGC flags in include/asm-ia64/mm.h.
It's same as x86_64.

Please see the below.
http://lists.xensource.com/archives/html/xen-ia64-devel/2006-03/msg00229.html
http://lists.xensource.com/archives/html/xen-ia64-devel/2006-03/msg00235.html

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author awilliam@xenbuild.aw
date Tue Mar 14 12:38:49 2006 -0700 (2006-03-14)
parents 8a551ec13d93
children dc50cdd66c5c
files xen/include/asm-ia64/mm.h
line diff
     1.1 --- a/xen/include/asm-ia64/mm.h	Tue Mar 14 12:27:57 2006 -0700
     1.2 +++ b/xen/include/asm-ia64/mm.h	Tue Mar 14 12:38:49 2006 -0700
     1.3 @@ -78,41 +78,46 @@ struct page
     1.4  
     1.5  #define set_page_count(p,v) 	atomic_set(&(p)->_count, v - 1)
     1.6  
     1.7 -/* Still small set of flags defined by far on IA-64 */
     1.8 +/*
     1.9 + * Still small set of flags defined by far on IA-64.
    1.10 + * IA-64 should make it a definition same as x86_64.
    1.11 + */
    1.12  /* The following page types are MUTUALLY EXCLUSIVE. */
    1.13  #define PGT_none            (0<<29) /* no special uses of this page */
    1.14  #define PGT_l1_page_table   (1<<29) /* using this page as an L1 page table? */
    1.15  #define PGT_l2_page_table   (2<<29) /* using this page as an L2 page table? */
    1.16  #define PGT_l3_page_table   (3<<29) /* using this page as an L3 page table? */
    1.17  #define PGT_l4_page_table   (4<<29) /* using this page as an L4 page table? */
    1.18 -#define PGT_writable_page   (5<<29) /* has writable mappings of this page? */
    1.19 -#define PGT_type_mask       (5<<29) /* Bits 29-31. */
    1.20 + /* Value 5 reserved. See asm-x86/mm.h */
    1.21 + /* Value 6 reserved. See asm-x86/mm.h */
    1.22 +#define PGT_writable_page   (7<<29) /* has writable mappings of this page? */
    1.23 +#define PGT_type_mask       (7<<29) /* Bits 29-31. */
    1.24  
    1.25   /* Has this page been validated for use as its current type? */
    1.26  #define _PGT_validated      28
    1.27  #define PGT_validated       (1<<_PGT_validated)
    1.28 -/* Owning guest has pinned this page to its current type? */
    1.29 + /* Owning guest has pinned this page to its current type? */
    1.30  #define _PGT_pinned         27
    1.31  #define PGT_pinned          (1U<<_PGT_pinned)
    1.32  
    1.33 -/* The 11 most significant bits of virt address if this is a page table. */
    1.34 -#define PGT_va_shift        16
    1.35 -#define PGT_va_mask         (((1U<<11)-1)<<PGT_va_shift)
    1.36 -/* Is the back pointer still mutable (i.e. not fixed yet)? */
    1.37 -#define PGT_va_mutable      (((1U<<11)-1)<<PGT_va_shift)
    1.38 -/* Is the back pointer unknown (e.g., p.t. is mapped at multiple VAs)? */
    1.39 -#define PGT_va_unknown      (((1U<<11)-2)<<PGT_va_shift)
    1.40 -/* 16-bit count of uses of this frame as its current type. */
    1.41 + /* The 27 most significant bits of virt address if this is a page table. */
    1.42 +#define PGT_va_shift        32
    1.43 +#define PGT_va_mask         ((unsigned long)((1U<<28)-1)<<PGT_va_shift)
    1.44 + /* Is the back pointer still mutable (i.e. not fixed yet)? */
    1.45 +#define PGT_va_mutable      ((unsigned long)((1U<<28)-1)<<PGT_va_shift)
    1.46 + /* Is the back pointer unknown (e.g., p.t. is mapped at multiple VAs)? */
    1.47 +#define PGT_va_unknown      ((unsigned long)((1U<<28)-2)<<PGT_va_shift)
    1.48 +
    1.49 + /* 16-bit count of uses of this frame as its current type. */
    1.50  #define PGT_count_mask      ((1U<<16)-1)
    1.51  
    1.52 -/* Cleared when the owning guest 'frees' this page. */
    1.53 + /* Cleared when the owning guest 'frees' this page. */
    1.54  #define _PGC_allocated      31
    1.55  #define PGC_allocated       (1U<<_PGC_allocated)
    1.56 -/* Set when the page is used as a page table */
    1.57 -#define _PGC_page_table     30
    1.58 -#define PGC_page_table      (1U<<_PGC_page_table)
    1.59 -/* 30-bit count of references to this frame. */
    1.60 -#define PGC_count_mask      ((1U<<30)-1)
    1.61 + /* Bit 30 reserved. See asm-x86/mm.h */
    1.62 + /* Bit 29 reserved. See asm-x86/mm.h */
    1.63 + /* 29-bit count of references to this frame. */
    1.64 +#define PGC_count_mask      ((1U<<29)-1)
    1.65  
    1.66  #define IS_XEN_HEAP_FRAME(_pfn) ((page_to_maddr(_pfn) < xenheap_phys_end) \
    1.67  				 && (page_to_maddr(_pfn) >= xen_pstart))