aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
diff options
context:
space:
mode:
authorPaolo Bonzini <[email protected]>2016-03-09 13:28:02 +0000
committerPaolo Bonzini <[email protected]>2016-03-10 10:26:10 +0000
commit5f0b819995e172f48fdcd91335a2126ba7d9deae (patch)
tree8e83ba4c380ce0e546fb8702e7d688f180cb4646 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
parentKVM: MMU: fix ept=0/pte.u=1/pte.w=0/CR0.WP=0/CR4.SMEP=1/EFER.NX=0 combo (diff)
downloadkernel-5f0b819995e172f48fdcd91335a2126ba7d9deae.tar.gz
kernel-5f0b819995e172f48fdcd91335a2126ba7d9deae.zip
KVM: MMU: fix reserved bit check for ept=0/CR0.WP=0/CR4.SMEP=1/EFER.NX=0
KVM has special logic to handle pages with pte.u=1 and pte.w=0 when CR0.WP=1. These pages' SPTEs flip continuously between two states: U=1/W=0 (user and supervisor reads allowed, supervisor writes not allowed) and U=0/W=1 (supervisor reads and writes allowed, user writes not allowed). When SMEP is in effect, however, U=0 will enable kernel execution of this page. To avoid this, KVM also sets NX=1 in the shadow PTE together with U=0, making the two states U=1/W=0/NX=gpte.NX and U=0/W=1/NX=1. When guest EFER has the NX bit cleared, the reserved bit check thinks that the latter state is invalid; teach it that the smep_andnot_wp case will also use the NX bit of SPTEs. Cc: [email protected] Reviewed-by: Xiao Guangrong <[email protected]> Fixes: c258b62b264fdc469b6d3610a907708068145e3b Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
0 files changed, 0 insertions, 0 deletions