On Wed, Mar 30, 2016 at 01:08:45PM +0800, Jason Wang wrote: [...]
> >> + } else { > >> + sz = VTD_PAGE_SIZE; > >> + } > >> + > >> + entry.target_as = &vtd_dev_as->as; > >> + entry.addr_mask = sz - 1; > >> + entry.iova = addr; > >> + memory_region_notify_iommu(entry.target_as->root, entry); > > Here, we seems to be posting this invalidation to all registered > > notifiers. > > Yes, but only for a device specified address space. > > > Since this is a device-tlb invalidation, and we should > > know which device (BDF) that we should invalidate, is there any way > > that we can directly route this info to that specific device? > > Looks like the codes has already done this, the target_as was found by > bus num and devfn. Yes, seems you are right. :) -- peterx