On Thu, 9 Mar 2017 10:32:44 +0800
Jason Wang<address@hidden> wrote:
On 2017年03月09日 00:40, Igor Mammedov wrote:
On Tue, 7 Mar 2017 14:47:30 +0200
Marcel Apfelbaum<address@hidden> wrote:
On 03/07/2017 11:09 AM, Jason Wang wrote:
After commit 96a8821d2141 ("virtio: unbreak virtio-pci with IOMMU
after caching ring translations"), IOMMU was required to be created in
advance. This is because we can only get the correct dma_as after pci
IOMMU (e.g intel_iommu) was initialized. This is suboptimal and
inconvenient for user. This patch releases this by:
- introduce a bus_master_ready method for PCIDeviceClass and trigger
this during pci_init_bus_master
- implement virtio-pci method and 1) reset the dma_as 2) re-register
the memory listener to the new dma_as
Instead of trying to fix up later it's possible to refuse
adding iommu device if other devices has been added before
it with -device/device_add.
That would match current CLI semantics where device that
others depend on should be listed on CLI before that others
are listed.