• Ben Skeggs's avatar
    drm/nouveau/mmu: implement new vmm backend · eb813999
    Ben Skeggs authored
    This is the common code to support a rework of the VMM backends.
    
    It adds support for more than 2 levels of page table nesting, which
    is required to be able to support GP100's MMU layout.
    
    Sparse mappings (that don't cause MMU faults when accessed) are now
    supported, where the backend provides it.
    
    Dual-PT handling had to become more sophisticated to support sparse,
    but this also allows us to support an optimisation the MMU provides
    on GK104 and newer.
    
    Certain operations can now be combined into a single page tree walk
    to avoid some overhead, but also enables optimsations like skipping
    PTE unmap writes when the PT will be destroyed anyway.
    
    The old backend has been hacked up to forward requests onto the new
    backend, if present, so that it's possible to bisect between issues
    in the backend changes vs the upcoming frontend changes.
    
    Until the new frontend has been merged, new backends will leak BAR2
    page tables on module unload.  This is expected, and it's not worth
    the effort of hacking around this as it doesn't effect runtime.
    Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
    eb813999
base.c 19.5 KB