lkml.org 
[lkml]   [2021]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 4/5] KVM: MMU: Add support for PKS emulation
From
Date
On 05/02/21 09:37, Chenyi Qiang wrote:
> |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. |

Slight changes to the commit message:

Up until now, pkr_mask had 0 bits for supervisor pages (the U/S bit in
page tables replaces the PFEC.RSVD in page fault error code).
For PKS support, fill in the bits using the same algorithm used for
user mode pages, but with CR4.PKE replaced by CR4.PKS. Because of
this change, CR4.PKS must also be included in the MMU role.

Paolo

\
 
 \ /
  Last update: 2021-02-05 10:29    [W:0.175 / U:0.660 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site