• P
    intel_iommu: provide its own replay() callback · f06a696d
    Peter Xu 提交于
    The default replay() don't work for VT-d since vt-d will have a huge
    default memory region which covers address range 0-(2^64-1). This will
    normally consumes a lot of time (which looks like a dead loop).
    
    The solution is simple - we don't walk over all the regions. Instead, we
    jump over the regions when we found that the page directories are empty.
    It'll greatly reduce the time to walk the whole region.
    
    To achieve this, we provided a page walk helper to do that, invoking
    corresponding hook function when we found an page we are interested in.
    vtd_page_walk_level() is the core logic for the page walking. It's
    interface is designed to suite further use case, e.g., to invalidate a
    range of addresses.
    Reviewed-by: NJason Wang <jasowang@redhat.com>
    Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
    Reviewed-by: N\"Michael S. Tsirkin\" <mst@redhat.com>
    Signed-off-by: NPeter Xu <peterx@redhat.com>
    Message-Id: <1491562755-23867-8-git-send-email-peterx@redhat.com>
    Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
    f06a696d
trace-events 6.8 KB