• Paolo Bonzini's avatar
    KVM: x86/mmu: check for invalid async page faults involving private memory · cd389f50
    Paolo Bonzini authored
    Right now the error code is not used when an async page fault is completed.
    This is not a problem in the current code, but it is untidy.  For protected
    VMs, we will also need to check that the page attributes match the current
    state of the page, because asynchronous page faults can only occur on
    shared pages (private pages go through kvm_faultin_pfn_private() instead of
    __gfn_to_pfn_memslot()).
    
    Start by piping the error code from kvm_arch_setup_async_pf() to
    kvm_arch_async_page_ready() via the architecture-specific async page
    fault data.  For now, it can be used to assert that there are no
    async page faults on private memory.
    
    Extracted from a patch by Isaku Yamahata.
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    cd389f50
kvm_host.h 71 KB