Re: [PATCH] vdpa: Consider device id larger than 31

2021-11-27 Thread Michael S. Tsirkin
On Sun, Nov 28, 2021 at 09:14:35AM +0200, Eli Cohen wrote: > On Fri, Nov 26, 2021 at 10:48:12AM +0800, Jason Wang wrote: > > On Fri, Nov 26, 2021 at 2:09 AM Parav Pandit wrote: > > > > > > virtio device id value can be more than 31. Hence, use BIT_ULL in > > > assignment. > > > > > > Fixes: 33b347

Re: [PATCH v2 4/5] iommu/virtio: Pass end address to viommu_add_mapping()

2021-11-27 Thread Michael S. Tsirkin
On Sat, Nov 27, 2021 at 06:09:40PM +0100, Eric Auger wrote: > > > On 11/23/21 4:53 PM, Jean-Philippe Brucker wrote: > > To support identity mappings, the virtio-iommu driver must be able to > > represent full 64-bit ranges internally. Pass (start, end) instead of > > (start, size) to viommu_add/d

Re: [PATCH v2 5/5] iommu/virtio: Support identity-mapped domains

2021-11-27 Thread Eric Auger
Hi Jean, On 11/23/21 4:53 PM, Jean-Philippe Brucker wrote: > Support identity domains for devices that do not offer the > VIRTIO_IOMMU_F_BYPASS_CONFIG feature, by creating 1:1 mappings between > the virtual and physical address space. Identity domains created this > way still perform noticeably be

Re: [PATCH v2 3/5] iommu/virtio: Sort reserved regions

2021-11-27 Thread Eric Auger
Hi Jean, On 11/23/21 4:53 PM, Jean-Philippe Brucker wrote: > To ease identity mapping support, keep the list of reserved regions > sorted. > > Reviewed-by: Kevin Tian > Signed-off-by: Jean-Philippe Brucker Reviewed-by: Eric Auger Eric > --- > drivers/iommu/virtio-iommu.c | 9 +++-- > 1 fi

Re: [PATCH v2 4/5] iommu/virtio: Pass end address to viommu_add_mapping()

2021-11-27 Thread Eric Auger
On 11/23/21 4:53 PM, Jean-Philippe Brucker wrote: > To support identity mappings, the virtio-iommu driver must be able to > represent full 64-bit ranges internally. Pass (start, end) instead of > (start, size) to viommu_add/del_mapping(). > > Clean comments. The one about the returned size was n

Re: [PATCH v2 2/5] iommu/virtio: Support bypass domains

2021-11-27 Thread Eric Auger
Hi Jean, On 11/23/21 4:52 PM, Jean-Philippe Brucker wrote: > The VIRTIO_IOMMU_F_BYPASS_CONFIG feature adds a new flag to the ATTACH > request, that creates a bypass domain. Use it to enable identity > domains. > > When VIRTIO_IOMMU_F_BYPASS_CONFIG is not supported by the device, we > currently fai