#ifndef __ASM_X86_MM_H__ #define __ASM_X86_MM_H__ #include #include #include #include #include #include #include #include #include #include #include /* * Per-page-frame information. * * Every architecture must ensure the following: * 1. 'struct pfn_info' contains a 'struct list_head list'. * 2. Provide a PFN_ORDER() macro for accessing the order of a free page. */ #define PFN_ORDER(_pfn) ((_pfn)->u.free.order) struct pfn_info { /* Each frame can be threaded onto a doubly-linked list. */ struct list_head list; /* Reference count and various PGC_xxx flags and fields. */ u32 count_info; /* Context-dependent fields follow... */ union { /* Page is in use: ((count_info & PGC_count_mask) != 0). */ struct { /* Owner of this page (NULL if page is anonymous). */ struct domain *domain; /* Type reference count and various PGT_xxx flags and fields. */ u32 type_info; } inuse; /* Page is on a free list: ((count_info & PGC_count_mask) == 0). */ struct { /* Mask of possibly-tainted TLBs. */ unsigned long cpu_mask; /* Order-size of the free chunk this page is the head of. */ u8 order; } free; } u; /* Timestamp from 'TLB clock', used to reduce need for safety flushes. */ u32 tlbflush_timestamp; }; /* The following page types are MUTUALLY EXCLUSIVE. */ #define PGT_none (0<<29) /* no special uses of this page */ #define PGT_l1_page_table (1<<29) /* using this page as an L1 page table? */ #define PGT_l2_page_table (2<<29) /* using this page as an L2 page table? */ #define PGT_l3_page_table (3<<29) /* using this page as an L3 page table? */ #define PGT_l4_page_table (4<<29) /* using this page as an L4 page table? */ #define PGT_gdt_page (5<<29) /* using this page in a GDT? */ #define PGT_ldt_page (6<<29) /* using this page in an LDT? */ #define PGT_writable_page (7<<29) /* has writable mappings of this page? */ #define PGT_type_mask (7<<29) /* Bits 29-31. */ /* Has this page been validated for use as its current type? */ #define _PGT_validated 28 #define PGT_validated (1U<<_PGT_validated) /* Owning guest has pinned this page to its current type? */ #define _PGT_pinned 27 #define PGT_pinned (1U<<_PGT_pinned) /* The 10 most significant bits of virt address if this is a page table. */ #define PGT_va_shift 17 #define PGT_va_mask (((1U<<10)-1)<u.inuse.domain = (_dom); \ /* The incremented type count is intended to pin to 'writable'. */ \ (_pfn)->u.inuse.type_info = PGT_writable_page | PGT_validated | 1; \ wmb(); /* install valid domain ptr before updating refcnt. */ \ spin_lock(&(_dom)->page_alloc_lock); \ /* _dom holds an allocation reference */ \ ASSERT((_pfn)->count_info == 0); \ (_pfn)->coun
obj-m += gpio-button-hotplug.o
\ if (ptwr_info[cpu].ptinfo[PTWR_PT_INACTIVE].l1va) \ ptwr_flush(PTWR_PT_INACTIVE); \ } while ( 0 ) #define cleanup_writable_pagetable(_d, _w) \ do { \ if ( unlikely(VM_ASSIST((_d), VMASST_TYPE_writable_pagetables)) ) \ __cleanup_writable_pagetable(_w); \ } while ( 0 ) #ifndef NDEBUG void audit_domain(struct domain *d); void audit_domains(void); #else #define audit_domain(_d) ((void)0) #define audit_domains() ((void)0) #endif #endif /* __ASM_X86_MM_H__ */