• Paul Mackerras's avatar
    [POWERPC] Provide a way to protect 4k subpages when using 64k pages · fa28237c
    Paul Mackerras authored
    Using 64k pages on 64-bit PowerPC systems makes life difficult for
    emulators that are trying to emulate an ISA, such as x86, which use a
    smaller page size, since the emulator can no longer use the MMU and
    the normal system calls for controlling page protections.  Of course,
    the emulator can emulate the MMU by checking and possibly remapping
    the address for each memory access in software, but that is pretty
    slow.
    
    This provides a facility for such programs to control the access
    permissions on individual 4k sub-pages of 64k pages.  The idea is
    that the emulator supplies an array of protection masks to apply to a
    specified range of virtual addresses.  These masks are applied at the
    level where hardware PTEs are inserted into the hardware page table
    based on the Linux PTEs, so the Linux PTEs are not affected.  Note
    that this new mechanism does not allow any access that would otherwise
    be prohibited; it can only prohibit accesses that would ot...
    fa28237c
subpage-prot.c 5.22 KB