]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] KVM: MMU: Perform access checks in walk_addr()
authorAvi Kivity <avi@qumranet.com>
Fri, 26 Jan 2007 08:56:41 +0000 (00:56 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 26 Jan 2007 21:50:57 +0000 (13:50 -0800)
commit1135fca99ff3c861a696ad52c08a9157877f0e20
tree444617c9b709ef38b3eadcc6a61ed03bf25d6de7
parente60f41dc0d2e29d8a27df65ed9c4516cb5455624
[PATCH] KVM: MMU: Perform access checks in walk_addr()

Check pte permission bits in walk_addr(), instead of scattering the checks all
over the code.  This has the following benefits:

1. We no longer set the accessed bit for accessed which fail permission checks.
2. Setting the accessed bit is simplified.
3. Under some circumstances, we used to pretend a page fault was fixed when
   it would actually fail the access checks.  This caused an unnecessary
   vmexit.
4. The error code for guest page faults is now correct.

The fix helps netbsd further along booting, and allows kvm to pass the new mmu
testsuite.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/kvm/mmu.c
drivers/kvm/paging_tmpl.h