Re: [RFC PATCH v2 2/5] iommu/virtio-iommu: Add probe request

2018-01-19 Thread Auger Eric
Hi Jean-Philippe, On 19/01/18 17:21, Jean-Philippe Brucker wrote: > On 16/01/18 23:26, Auger Eric wrote: > [...] >>> + switch (mem->subtype) { >>> + case VIRTIO_IOMMU_RESV_MEM_T_MSI: >>> + region = iommu_alloc_resv_region(addr, size, prot, >>> +

Re: [RFC PATCH v2 2/5] iommu/virtio-iommu: Add probe request

2018-01-19 Thread Jean-Philippe Brucker
On 16/01/18 23:26, Auger Eric wrote: [...] >> +switch (mem->subtype) { >> +case VIRTIO_IOMMU_RESV_MEM_T_MSI: >> +region = iommu_alloc_resv_region(addr, size, prot, >> + IOMMU_RESV_MSI); > if (!region) > return -ENOMEM; >> +

Re: [RFC PATCH v2 2/5] iommu/virtio-iommu: Add probe request

2018-01-16 Thread Auger Eric
Hi Jean-Philippe, On 17/11/17 19:52, Jean-Philippe Brucker wrote: > When the device offers the probe feature, send a probe request for each > device managed by the IOMMU. Extract RESV_MEM information. When we > encounter a MSI doorbell region, set it up as a IOMMU_RESV_MSI region. > This will

Re: [RFC PATCH v2 2/5] iommu/virtio-iommu: Add probe request

2018-01-16 Thread Jean-Philippe Brucker
On 16/01/18 09:25, Auger Eric wrote: [...] >> +static int viommu_add_resv_mem(struct viommu_endpoint *vdev, >> + struct virtio_iommu_probe_resv_mem *mem, >> + size_t len) >> +{ >> +struct iommu_resv_region *region = NULL; >> +unsigned

Re: [RFC PATCH v2 2/5] iommu/virtio-iommu: Add probe request

2018-01-16 Thread Auger Eric
Hi Jean-Philippe, On 17/11/17 19:52, Jean-Philippe Brucker wrote: > When the device offers the probe feature, send a probe request for each > device managed by the IOMMU. Extract RESV_MEM information. When we > encounter a MSI doorbell region, set it up as a IOMMU_RESV_MSI region. > This will

[RFC PATCH v2 2/5] iommu/virtio-iommu: Add probe request

2017-11-17 Thread Jean-Philippe Brucker
When the device offers the probe feature, send a probe request for each device managed by the IOMMU. Extract RESV_MEM information. When we encounter a MSI doorbell region, set it up as a IOMMU_RESV_MSI region. This will tell other subsystems that there is no need to map the MSI doorbell in the