Re: [Xen-devel] [RFC PATCH 2/9] iommu: Add ability to map/unmap the number of pages

2017-04-28 Thread Oleksandr Tyshchenko
On Fri, Apr 28, 2017 at 1:29 PM, Jan Beulich wrote: On 28.04.17 at 12:16, wrote: >> On Fri, Apr 28, 2017 at 9:23 AM, Jan Beulich wrote: >>> >>> On 27.04.17 at 18:56, wrote: >>> > 2. xen/drivers/passthrough/vtd/x86/vtd.c:143: >>> > ... >>> > tmp = 1 << (PAGE_SHIFT - PAGE_SHIFT_4K); >>> > fo

Re: [Xen-devel] [RFC PATCH 2/9] iommu: Add ability to map/unmap the number of pages

2017-04-28 Thread Jan Beulich
>>> On 28.04.17 at 12:16, wrote: > On Fri, Apr 28, 2017 at 9:23 AM, Jan Beulich wrote: >> >>> On 27.04.17 at 18:56, wrote: >> > 2. xen/drivers/passthrough/vtd/x86/vtd.c:143: >> > ... >> > tmp = 1 << (PAGE_SHIFT - PAGE_SHIFT_4K); >> > for ( j = 0; j < tmp; j++ ) >> > { >> > int ret = iommu_ma

Re: [Xen-devel] [RFC PATCH 2/9] iommu: Add ability to map/unmap the number of pages

2017-04-28 Thread Oleksandr Tyshchenko
Hi, Jan. Thank you for your reply. On Fri, Apr 28, 2017 at 9:23 AM, Jan Beulich wrote: > > >>> On 27.04.17 at 18:56, wrote: > > Now I am trying to replace single-page stuff with the multi-page one. > > Currently, with the single-page API, if map fails we always try to unmap > > already mapped p

Re: [Xen-devel] [RFC PATCH 2/9] iommu: Add ability to map/unmap the number of pages

2017-04-27 Thread Jan Beulich
>>> On 27.04.17 at 18:56, wrote: > Now I am trying to replace single-page stuff with the multi-page one. > Currently, with the single-page API, if map fails we always try to unmap > already mapped pages. > > This is an example of generic code I am speaking about: > ... > for ( i = 0; i < (1 << or

Re: [Xen-devel] [RFC PATCH 2/9] iommu: Add ability to map/unmap the number of pages

2017-04-27 Thread Oleksandr Tyshchenko
Hi, Jan. There are the questions I would like to clarify. On Thu, Mar 23, 2017 at 2:47 PM, Oleksandr Tyshchenko wrote: > On Thu, Mar 23, 2017 at 11:07 AM, Jan Beulich wrote: > On 22.03.17 at 19:01, wrote: >>> Hi Jan >>> >>> On Wed, Mar 22, 2017 at 5:44 PM, Jan Beulich wrote: >>> On 15

Re: [Xen-devel] [RFC PATCH 2/9] iommu: Add ability to map/unmap the number of pages

2017-04-21 Thread Oleksandr Tyshchenko
On Wed, Apr 19, 2017 at 8:31 PM, Julien Grall wrote: > Hi Oleksandr, Hi, Julien > > > On 15/03/17 20:05, Oleksandr Tyshchenko wrote: >> >> From: Oleksandr Tyshchenko >> >> Extend the IOMMU code with new APIs and platform callbacks. >> These new map_pages/unmap_pages API do almost the same thing

Re: [Xen-devel] [RFC PATCH 2/9] iommu: Add ability to map/unmap the number of pages

2017-04-19 Thread Julien Grall
Hi Oleksandr, On 15/03/17 20:05, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko Extend the IOMMU code with new APIs and platform callbacks. These new map_pages/unmap_pages API do almost the same thing as existing map_page/unmap_page ones except the formers can handle the number of page

Re: [Xen-devel] [RFC PATCH 2/9] iommu: Add ability to map/unmap the number of pages

2017-03-23 Thread Oleksandr Tyshchenko
On Thu, Mar 23, 2017 at 11:07 AM, Jan Beulich wrote: On 22.03.17 at 19:01, wrote: >> Hi Jan >> >> On Wed, Mar 22, 2017 at 5:44 PM, Jan Beulich wrote: >> On 15.03.17 at 21:05, wrote: From: Oleksandr Tyshchenko Extend the IOMMU code with new APIs and platform callbacks. >

Re: [Xen-devel] [RFC PATCH 2/9] iommu: Add ability to map/unmap the number of pages

2017-03-23 Thread Jan Beulich
>>> On 22.03.17 at 19:01, wrote: > Hi Jan > > On Wed, Mar 22, 2017 at 5:44 PM, Jan Beulich wrote: > On 15.03.17 at 21:05, wrote: >>> From: Oleksandr Tyshchenko >>> >>> Extend the IOMMU code with new APIs and platform callbacks. >>> These new map_pages/unmap_pages API do almost the same thi

Re: [Xen-devel] [RFC PATCH 2/9] iommu: Add ability to map/unmap the number of pages

2017-03-22 Thread Oleksandr Tyshchenko
Hi Jan On Wed, Mar 22, 2017 at 5:44 PM, Jan Beulich wrote: On 15.03.17 at 21:05, wrote: >> From: Oleksandr Tyshchenko >> >> Extend the IOMMU code with new APIs and platform callbacks. >> These new map_pages/unmap_pages API do almost the same thing >> as existing map_page/unmap_page ones ex

Re: [Xen-devel] [RFC PATCH 2/9] iommu: Add ability to map/unmap the number of pages

2017-03-22 Thread Jan Beulich
>>> On 15.03.17 at 21:05, wrote: > From: Oleksandr Tyshchenko > > Extend the IOMMU code with new APIs and platform callbacks. > These new map_pages/unmap_pages API do almost the same thing > as existing map_page/unmap_page ones except the formers can > handle the number of pages. So do new platf

[Xen-devel] [RFC PATCH 2/9] iommu: Add ability to map/unmap the number of pages

2017-03-15 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko Extend the IOMMU code with new APIs and platform callbacks. These new map_pages/unmap_pages API do almost the same thing as existing map_page/unmap_page ones except the formers can handle the number of pages. So do new platform callbacks. Currently, this patch requires