]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MMU: Fix oops on guest userspace access to guest pagetable
authorAvi Kivity <avi@qumranet.com>
Thu, 12 Jun 2008 13:54:41 +0000 (16:54 +0300)
committerAvi Kivity <avi@qumranet.com>
Tue, 24 Jun 2008 09:20:12 +0000 (12:20 +0300)
commite5fc7aad223bcc0a176d6f14b21a60fbe1645816
tree4865d4cd48c98c5425218c5d8289367bd16c4105
parentb070105acff4951d957efe6c0299657a192c6dff
KVM: MMU: Fix oops on guest userspace access to guest pagetable

KVM has a heuristic to unshadow guest pagetables when userspace accesses
them, on the assumption that most guests do not allow userspace to access
pagetables directly. Unfortunately, in addition to unshadowing the pagetables,
it also oopses.

This never triggers on ordinary guests since sane OSes will clear the
pagetables before assigning them to userspace, which will trigger the flood
heuristic, unshadowing the pagetables before the first userspace access. One
particular guest, though (Xenner) will run the kernel in userspace, triggering
the oops.  Since the heuristic is incorrect in this case, we can simply
remove it.

Signed-off-by: Avi Kivity <avi@qumranet.com>
arch/x86/kvm/mmu.c