On 02/03/2017 08:47, Jason Wang wrote: >>> >>> Fixes: c611c76417f5 ("virtio: add MemoryListener to cache ring >>> translations") >>> Cc: Paolo Bonzini <pbonz...@redhat.com> >>> Signed-off-by: Jason Wang <jasow...@redhat.com> >> This is very ugly. I guess it's better than broken IOMMU ... >> Paolo? > > Maybe we can delay the registering of memory listener on bus master > enabling or status setting.
Can we add a callback to PCIDeviceClass, and invoke it from pci_init_bus_master? Paolo