• Avi Kivity's avatar
    KVM: Reduce misfirings of the fork detector · a25f7e1f
    Avi Kivity authored
    The kvm mmu tries to detects forks by looking for repeated writes to a
    page table.  If it sees a fork, it unshadows the page table so the page
    table copying can proceed at native speed instead of being emulated.
    
    However, the detector also triggered on simple demand paging access patterns:
    a linear walk of memory would of course cause repeated writes to the same
    pagetable page, causing it to unshadow prematurely.
    
    Fix by resetting the fork detector if we detect a demand fault.
    Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
    a25f7e1f
paging_tmpl.h 12.8 KB