Re: [PATCH v3 5/7] iommu: Add virtio-iommu driver

2018-11-08 Thread Jean-Philippe Brucker
On 08/11/2018 14:51, Auger Eric wrote: >>> +/* >>> + * viommu_replay_mappings - re-send MAP requests >>> + * >>> + * When reattaching a domain that was previously detached from all >>> endpoints, >>> + * mappings were deleted from the device. Re-create the mappings available >>> in >>> + * the in

Re: [PATCH v3 5/7] iommu: Add virtio-iommu driver

2018-11-08 Thread Auger Eric
Hi Jean-Philippe, On 10/12/18 6:35 PM, Michael S. Tsirkin wrote: > On Fri, Oct 12, 2018 at 03:59:15PM +0100, Jean-Philippe Brucker wrote: >> The virtio IOMMU is a para-virtualized device, allowing to send IOMMU >> requests such as map/unmap over virtio transport without emulating page >> tables. T

Re: [PATCH v3 5/7] iommu: Add virtio-iommu driver

2018-10-12 Thread Jean-Philippe Brucker
On 12/10/2018 17:35, Michael S. Tsirkin wrote: >> +list_del(&req->list); >> +kfree(req); > > So with DEBUG set, this will actually free memory that device still > DMA's into. Hardly pretty. I think you want to mark device broken, > queue the request and then wait for device

Re: [PATCH v3 5/7] iommu: Add virtio-iommu driver

2018-10-12 Thread Michael S. Tsirkin
On Fri, Oct 12, 2018 at 03:59:15PM +0100, Jean-Philippe Brucker wrote: > The virtio IOMMU is a para-virtualized device, allowing to send IOMMU > requests such as map/unmap over virtio transport without emulating page > tables. This implementation handles ATTACH, DETACH, MAP and UNMAP > requests. >

[PATCH v3 5/7] iommu: Add virtio-iommu driver

2018-10-12 Thread Jean-Philippe Brucker
The virtio IOMMU is a para-virtualized device, allowing to send IOMMU requests such as map/unmap over virtio transport without emulating page tables. This implementation handles ATTACH, DETACH, MAP and UNMAP requests. The bulk of the code transforms calls coming from the IOMMU API into correspondi