Re: [PATCH v2 3/3] xen/swiotlb: remember having called xen_create_contiguous_region()

2019-06-05 Thread Juergen Gross
On 31.05.19 13:38, Juergen Gross wrote: On 30/05/2019 14:46, Boris Ostrovsky wrote: On 5/30/19 5:04 AM, Christoph Hellwig wrote: Please don't add your private flag to page-flags.h. The whole point of the private flag is that you can use it in any way you want withou touching the common code.

Re: [PATCH v2 3/3] xen/swiotlb: remember having called xen_create_contiguous_region()

2019-05-31 Thread Juergen Gross
On 30/05/2019 14:46, Boris Ostrovsky wrote: > On 5/30/19 5:04 AM, Christoph Hellwig wrote: >> Please don't add your private flag to page-flags.h. The whole point of >> the private flag is that you can use it in any way you want withou >> touching the common code. > > > There is already a bunch o

Re: [PATCH v2 3/3] xen/swiotlb: remember having called xen_create_contiguous_region()

2019-05-30 Thread Boris Ostrovsky
On 5/30/19 5:04 AM, Christoph Hellwig wrote: > Please don't add your private flag to page-flags.h. The whole point of > the private flag is that you can use it in any way you want withou > touching the common code. There is already a bunch of aliases for various sub-components (including Xen) in

Re: [PATCH v2 3/3] xen/swiotlb: remember having called xen_create_contiguous_region()

2019-05-30 Thread Christoph Hellwig
Please don't add your private flag to page-flags.h. The whole point of the private flag is that you can use it in any way you want withou touching the common code.

Re: [Xen-devel] [PATCH v2 3/3] xen/swiotlb: remember having called xen_create_contiguous_region()

2019-05-29 Thread Juergen Gross
On 29/05/2019 11:57, Jan Beulich wrote: On 29.05.19 at 11:04, wrote: >> @@ -345,8 +346,11 @@ xen_swiotlb_free_coherent(struct device *hwdev, size_t >> size, void *vaddr, >> size = 1UL << (order + XEN_PAGE_SHIFT); >> >> if (!WARN_ON((dev_addr + size - 1 > dma_mask) || >> -

Re: [Xen-devel] [PATCH v2 3/3] xen/swiotlb: remember having called xen_create_contiguous_region()

2019-05-29 Thread Jan Beulich
>>> On 29.05.19 at 11:04, wrote: > @@ -345,8 +346,11 @@ xen_swiotlb_free_coherent(struct device *hwdev, size_t > size, void *vaddr, > size = 1UL << (order + XEN_PAGE_SHIFT); > > if (!WARN_ON((dev_addr + size - 1 > dma_mask) || > - range_straddles_page_boundary(phys,

[PATCH v2 3/3] xen/swiotlb: remember having called xen_create_contiguous_region()

2019-05-29 Thread Juergen Gross
Instead of always calling xen_destroy_contiguous_region() in case the memory is DMA-able for the used device, do so only in case it has been made DMA-able via xen_create_contiguous_region() before. This will avoid a lot of xen_destroy_contiguous_region() calls for 64-bit capable devices. As the m