Re: [Qemu-devel] [PATCH qemu v18 1/5] memory: Add reporting of supported page sizes

2016-06-21 Thread David Gibson
On Tue, Jun 21, 2016 at 12:23:02PM +0200, Paolo Bonzini wrote: > > > On 21/06/2016 08:16, David Gibson wrote: > >> for (addr = 0; addr < memory_region_size(mr); addr += granularity) { > >> iotlb = mr->iommu_ops->translate(mr, addr, is_write); > >> if (iotlb.perm != IOMMU_NO

Re: [Qemu-devel] [PATCH qemu v18 1/5] memory: Add reporting of supported page sizes

2016-06-21 Thread Paolo Bonzini
On 21/06/2016 08:16, David Gibson wrote: >> for (addr = 0; addr < memory_region_size(mr); addr += granularity) { >> iotlb = mr->iommu_ops->translate(mr, addr, is_write); >> if (iotlb.perm != IOMMU_NONE) { > > Paolo, are you ok for me to make that small change and take this

Re: [Qemu-devel] [PATCH qemu v18 1/5] memory: Add reporting of supported page sizes

2016-06-20 Thread David Gibson
On Tue, Jun 21, 2016 at 11:14:01AM +1000, Alexey Kardashevskiy wrote: > Every IOMMU has some granularity which MemoryRegionIOMMUOps::translate > uses when translating, however this information is not available outside > the translate context for various checks. > > This adds a get_min_page_size ca

[Qemu-devel] [PATCH qemu v18 1/5] memory: Add reporting of supported page sizes

2016-06-20 Thread Alexey Kardashevskiy
Every IOMMU has some granularity which MemoryRegionIOMMUOps::translate uses when translating, however this information is not available outside the translate context for various checks. This adds a get_min_page_size callback to MemoryRegionIOMMUOps and a wrapper for it so IOMMU users (such as VFIO