Re: [Qemu-devel] [PATCH v3 04/12] memory: fix address_space_get_iotlb_entry()

2017-05-15 Thread Peter Xu
On Fri, May 12, 2017 at 03:25:08PM +1000, David Gibson wrote: > On Thu, May 11, 2017 at 05:36:03PM +0800, Peter Xu wrote: > > On Thu, May 11, 2017 at 11:56:38AM +1000, David Gibson wrote: > > > On Wed, May 10, 2017 at 04:01:47PM +0800, Peter Xu wrote: > > > > This function has an assumption that we

Re: [Qemu-devel] [PATCH v3 04/12] memory: fix address_space_get_iotlb_entry()

2017-05-11 Thread David Gibson
On Thu, May 11, 2017 at 05:36:03PM +0800, Peter Xu wrote: > On Thu, May 11, 2017 at 11:56:38AM +1000, David Gibson wrote: > > On Wed, May 10, 2017 at 04:01:47PM +0800, Peter Xu wrote: > > > This function has an assumption that we will definitely call translate() > > > once (or say, the addr will be

Re: [Qemu-devel] [PATCH v3 04/12] memory: fix address_space_get_iotlb_entry()

2017-05-11 Thread Peter Xu
On Thu, May 11, 2017 at 11:56:38AM +1000, David Gibson wrote: > On Wed, May 10, 2017 at 04:01:47PM +0800, Peter Xu wrote: > > This function has an assumption that we will definitely call translate() > > once (or say, the addr will be located inside one IOMMU memory region), > > otherwise an empty I

Re: [Qemu-devel] [PATCH v3 04/12] memory: fix address_space_get_iotlb_entry()

2017-05-10 Thread David Gibson
On Wed, May 10, 2017 at 04:01:47PM +0800, Peter Xu wrote: > This function has an assumption that we will definitely call translate() > once (or say, the addr will be located inside one IOMMU memory region), > otherwise an empty IOTLB will be returned. Nevertheless, this is not > what we want. When

[Qemu-devel] [PATCH v3 04/12] memory: fix address_space_get_iotlb_entry()

2017-05-10 Thread Peter Xu
This function has an assumption that we will definitely call translate() once (or say, the addr will be located inside one IOMMU memory region), otherwise an empty IOTLB will be returned. Nevertheless, this is not what we want. When there is no IOMMU memory region, we should build up a static mappi