• Avi Kivity's avatar
    KVM: MMU: Fix oops on guest userspace access to guest pagetable · 6bf6a953
    Avi Kivity authored
    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: default avatarAvi Kivity <avi@qumranet.com>
    6bf6a953
mmu.c 54.8 KB