Re: [Qemu-devel] [PATCH 1/3] exec: add page_mask for address_space_do_translate

2017-06-04 Thread Peter Xu
On Fri, Jun 02, 2017 at 07:45:05PM +0300, Michael S. Tsirkin wrote: > On Fri, Jun 02, 2017 at 07:50:52PM +0800, Peter Xu wrote: > > The function is originally used for address_space_translate() and what > > we care about most is (xlat, plen) range. However for iotlb requests, we > > don't really ca

Re: [Qemu-devel] [PATCH 1/3] exec: add page_mask for address_space_do_translate

2017-06-02 Thread Michael S. Tsirkin
On Fri, Jun 02, 2017 at 07:50:52PM +0800, Peter Xu wrote: > The function is originally used for address_space_translate() and what > we care about most is (xlat, plen) range. However for iotlb requests, we > don't really care about "plen", but the size of the page that "xlat" is > located on. While

[Qemu-devel] [PATCH 1/3] exec: add page_mask for address_space_do_translate

2017-06-02 Thread Peter Xu
The function is originally used for address_space_translate() and what we care about most is (xlat, plen) range. However for iotlb requests, we don't really care about "plen", but the size of the page that "xlat" is located on. While, plen cannot really contain this information. A simple example t