• Paolo Bonzini's avatar
    KVM: x86: fix use of L1 MMIO areas in nested guests · 9034e6e8
    Paolo Bonzini authored
    There is currently some confusion between nested and L1 GPAs.  The
    assignment to "direct" in kvm_mmu_page_fault tries to fix that, but
    it is not enough.  What this patch does is fence off the MMIO cache
    completely when using shadow nested page tables, since we have neither
    a GVA nor an L1 GPA to put in the cache.  This also allows some
    simplifications in kvm_mmu_page_fault and FNAME(page_fault).
    
    The EPT misconfig likewise does not have an L1 GPA to pass to
    kvm_io_bus_write, so that must be skipped for guest mode.
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
    [Changed comment to say "GPAs" instead of "L1's physical addresses", as
     per David's review. - Radim]
    Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
    9034e6e8
mmu.c 139 KB