aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/kvm
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-05-27 07:46:04 -0400
committerAvi Kivity <avi@redhat.com>2010-08-01 03:39:23 -0400
commitec87fe2afcbcc4f430554980ec3e408bae34229d (patch)
tree17f5574d13dbd24b75d515d77bd0bf26373e0dab /Documentation/kvm
parent8184dd38e22fcaec664c2b98c382b85c26780e26 (diff)
KVM: MMU: Document cr0.wp emulation
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'Documentation/kvm')
-rw-r--r--Documentation/kvm/mmu.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/Documentation/kvm/mmu.txt b/Documentation/kvm/mmu.txt
index 2201dcba92a1..1e7ecdd15bba 100644
--- a/Documentation/kvm/mmu.txt
+++ b/Documentation/kvm/mmu.txt
@@ -298,6 +298,25 @@ Host translation updates:
298 - look up affected sptes through reverse map 298 - look up affected sptes through reverse map
299 - drop (or update) translations 299 - drop (or update) translations
300 300
301Emulating cr0.wp
302================
303
304If tdp is not enabled, the host must keep cr0.wp=1 so page write protection
305works for the guest kernel, not guest guest userspace. When the guest
306cr0.wp=1, this does not present a problem. However when the guest cr0.wp=0,
307we cannot map the permissions for gpte.u=1, gpte.w=0 to any spte (the
308semantics require allowing any guest kernel access plus user read access).
309
310We handle this by mapping the permissions to two possible sptes, depending
311on fault type:
312
313- kernel write fault: spte.u=0, spte.w=1 (allows full kernel access,
314 disallows user access)
315- read fault: spte.u=1, spte.w=0 (allows full read access, disallows kernel
316 write access)
317
318(user write faults generate a #PF)
319
301Further reading 320Further reading
302=============== 321===============
303 322