|In addition to the pkey check for user pages, advertise pkr_mask also to cache the conditions where protection key checks for supervisor pages are needed. Add CR4_PKS in mmu_role_bits to track the pkr_mask update on a per-mmu basis. In original cache conditions of pkr_mask, U/S bit in page tables is a judgement condition and replace the PFEC.RSVD in page fault error code to form the index of 16 domains. PKS support would extend the U/S bits (if U/S=0, PKS check required). It adds an additional check for cr4_pke/cr4_pks to ensure the necessity and distinguish PKU and PKS from each other. |