Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202307
b: refs/heads/master
c: ec87fe2
h: refs/heads/master
i:
  202305: 32568f6
  202303: 8dc147c
v: v3
  • Loading branch information
Avi Kivity committed Aug 1, 2010
1 parent 0cdcb17 commit 9a66715
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8184dd38e22fcaec664c2b98c382b85c26780e26
refs/heads/master: ec87fe2afcbcc4f430554980ec3e408bae34229d
19 changes: 19 additions & 0 deletions trunk/Documentation/kvm/mmu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,25 @@ Host translation updates:
- look up affected sptes through reverse map
- drop (or update) translations

Emulating cr0.wp
================

If tdp is not enabled, the host must keep cr0.wp=1 so page write protection
works for the guest kernel, not guest guest userspace. When the guest
cr0.wp=1, this does not present a problem. However when the guest cr0.wp=0,
we cannot map the permissions for gpte.u=1, gpte.w=0 to any spte (the
semantics require allowing any guest kernel access plus user read access).

We handle this by mapping the permissions to two possible sptes, depending
on fault type:

- kernel write fault: spte.u=0, spte.w=1 (allows full kernel access,
disallows user access)
- read fault: spte.u=1, spte.w=0 (allows full read access, disallows kernel
write access)

(user write faults generate a #PF)

Further reading
===============

Expand Down

0 comments on commit 9a66715

Please sign in to comment.