~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/x86/include/asm/mmu.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _ASM_X86_MMU_H
  3 #define _ASM_X86_MMU_H
  4 
  5 #include <linux/spinlock.h>
  6 #include <linux/rwsem.h>
  7 #include <linux/mutex.h>
  8 #include <linux/atomic.h>
  9 #include <linux/bits.h>
 10 
 11 /* Uprobes on this MM assume 32-bit code */
 12 #define MM_CONTEXT_UPROBE_IA32          0
 13 /* vsyscall page is accessible on this MM */
 14 #define MM_CONTEXT_HAS_VSYSCALL         1
 15 /* Do not allow changing LAM mode */
 16 #define MM_CONTEXT_LOCK_LAM             2
 17 /* Allow LAM and SVA coexisting */
 18 #define MM_CONTEXT_FORCE_TAGGED_SVA     3
 19 
 20 /*
 21  * x86 has arch-specific MMU state beyond what lives in mm_struct.
 22  */
 23 typedef struct {
 24         /*
 25          * ctx_id uniquely identifies this mm_struct.  A ctx_id will never
 26          * be reused, and zero is not a valid ctx_id.
 27          */
 28         u64 ctx_id;
 29 
 30         /*
 31          * Any code that needs to do any sort of TLB flushing for this
 32          * mm will first make its changes to the page tables, then
 33          * increment tlb_gen, then flush.  This lets the low-level
 34          * flushing code keep track of what needs flushing.
 35          *
 36          * This is not used on Xen PV.
 37          */
 38         atomic64_t tlb_gen;
 39 
 40 #ifdef CONFIG_MODIFY_LDT_SYSCALL
 41         struct rw_semaphore     ldt_usr_sem;
 42         struct ldt_struct       *ldt;
 43 #endif
 44 
 45 #ifdef CONFIG_X86_64
 46         unsigned long flags;
 47 #endif
 48 
 49 #ifdef CONFIG_ADDRESS_MASKING
 50         /* Active LAM mode:  X86_CR3_LAM_U48 or X86_CR3_LAM_U57 or 0 (disabled) */
 51         unsigned long lam_cr3_mask;
 52 
 53         /* Significant bits of the virtual address. Excludes tag bits. */
 54         u64 untag_mask;
 55 #endif
 56 
 57         struct mutex lock;
 58         void __user *vdso;                      /* vdso base address */
 59         const struct vdso_image *vdso_image;    /* vdso image in use */
 60 
 61         atomic_t perf_rdpmc_allowed;    /* nonzero if rdpmc is allowed */
 62 #ifdef CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS
 63         /*
 64          * One bit per protection key says whether userspace can
 65          * use it or not.  protected by mmap_lock.
 66          */
 67         u16 pkey_allocation_map;
 68         s16 execute_only_pkey;
 69 #endif
 70 } mm_context_t;
 71 
 72 #define INIT_MM_CONTEXT(mm)                                             \
 73         .context = {                                                    \
 74                 .ctx_id = 1,                                            \
 75                 .lock = __MUTEX_INITIALIZER(mm.context.lock),           \
 76         }
 77 
 78 void leave_mm(void);
 79 #define leave_mm leave_mm
 80 
 81 #endif /* _ASM_X86_MMU_H */
 82 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php