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

2021-11-29 Thread Jean-Philippe Brucker
On Sat, Nov 27, 2021 at 06:09:56PM -0500, Michael S. Tsirkin wrote: > > > -static int viommu_add_mapping(struct viommu_domain *vdomain, unsigned > > > long iova, > > > - phys_addr_t paddr, size_t size, u32 flags) > > > +static int viommu_add_mapping(struct viommu_domain

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

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

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

2021-11-23 Thread Jean-Philippe Brucker
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 never true: when sweeping the whole address space the returned