• Avi Kivity's avatar
    KVM: Handle guest page faults when emulating mmio · c9047f53
    Avi Kivity authored
    Usually, guest page faults are detected by the kvm page fault handler,
    which detects if they are shadow faults, mmio faults, pagetable faults,
    or normal guest page faults.
    
    However, in ceratin circumstances, we can detect a page fault much later.
    One of these events is the following combination:
    
    - A two memory operand instruction (e.g. movsb) is executed.
    - The first operand is in mmio space (which is the fault reported to kvm)
    - The second operand is in an ummaped address (e.g. a guest page fault)
    
    The Windows 2000 installer does such an access, an promptly hangs.  Fix
    by adding the missing page fault injection on that path.
    Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
    c9047f53
kvm_main.c 67.9 KB