Avi Kivity wrote: > Han, Weidong wrote: >> Avi Kivity wrote: >> >>> Han, Weidong wrote: >>> >>>> Don't need to map mmio pages for iommu. When find mmio pages in >>>> kvm_iommu_map_pages(), don't map them, and shouldn't return error >>>> due to it's not an error. If return error (such as -EINVAL), >>>> device assigment will fail. >>>> >>>> >>>> >>> I don't understand. Why don't we need to map mmio pages? We >>> certainly don't want them emulated. >>> >> >> mmio pages need not to be mapped in VT-d page table, which only >> translate DMA addresses. > > Right, I forgot the iommu is only for dma, not cpu accesses. > > I suppose one could DMA into an mmio page. Is there a reason not to > map?
Is it possible DMA into an mmio page? If yes, we also need to map mmio pages, and is_mmio_pfn() check is not neccessary here. Randy (Weidong) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html