Re: [RFC 1/1] swiotlb: Reduce calls to swiotlb_find_pool()

2024-06-30 Thread h...@lst.de
On Sun, Jun 30, 2024 at 02:02:52PM +, Michael Kelley wrote: > 1) Rename is_swiotlb_buffer() to swiotlb_find_pool(), since it > now returns a pool. A NULL return value indicates that the > paddr is not an swiotlb buffer. > > 2) Similarly, rename is_xen_swiotlb_buffer() to > xen_swiotlb_find_po

Re: [RFC 1/1] swiotlb: Reduce calls to swiotlb_find_pool()

2024-06-29 Thread h...@lst.de
On Sat, Jun 29, 2024 at 03:55:58PM +, Michael Kelley wrote: > Unless there is further discussion on this point, I'll just keep the original > "is_swiotlb_buffer()" in v2. That is the wrong name for something that returns the pool as pointed out before.

Re: [RFC 1/1] swiotlb: Reduce calls to swiotlb_find_pool()

2024-06-27 Thread h...@lst.de
On Thu, Jun 27, 2024 at 04:02:59PM +, Michael Kelley wrote: > > > Conceptually, it's still being used as a boolean function based on > > > whether the return value is NULL. Renaming it to swiotlb_get_pool() > > > more accurately describes the return value, but obscures the > > > intent of dete

Re: [RFC 1/1] swiotlb: Reduce calls to swiotlb_find_pool()

2024-06-27 Thread h...@lst.de
On Thu, Jun 27, 2024 at 02:59:03PM +, Michael Kelley wrote: > Conceptually, it's still being used as a boolean function based on > whether the return value is NULL. Renaming it to swiotlb_get_pool() > more accurately describes the return value, but obscures the > intent of determining if it is

Re: [RFC 1/1] swiotlb: Reduce calls to swiotlb_find_pool()

2024-06-26 Thread h...@lst.de
On Wed, Jun 26, 2024 at 11:58:13PM +, Michael Kelley wrote: > > This patch trades off making many of the core swiotlb APIs take > > an additional argument in order to avoid duplicating calls to > > swiotlb_find_pool(). The current code seems rather wasteful in > > making 6 calls per round-trip,

min_align_mask Re: [PATCH V3 13/13] HV/Storvsc: Add Isolation VM support for storvsc driver

2021-08-24 Thread h...@lst.de
On Fri, Aug 20, 2021 at 03:40:08PM +, Michael Kelley wrote: > I see that the swiotlb code gets and uses the min_align_mask field. But > the NVME driver is the only driver that ever sets it, so the value is zero > in all other cases. Does swiotlb just use PAGE_SIZE in that that case? I > coul

Re: [PATCH V3 13/13] HV/Storvsc: Add Isolation VM support for storvsc driver

2021-08-24 Thread h...@lst.de
On Sat, Aug 21, 2021 at 02:04:11AM +0800, Tianyu Lan wrote: > After dma_map_sg(), we still need to go through scatter list again to > populate payload->rrange.pfn_array. We may just go through the scatter list > just once if dma_map_sg() accepts a callback and run it during go > through scatter l

Re: [PATCH V3 13/13] HV/Storvsc: Add Isolation VM support for storvsc driver

2021-08-19 Thread h...@lst.de
On Thu, Aug 19, 2021 at 06:17:40PM +, Michael Kelley wrote: > > +#define storvsc_dma_map(dev, page, offset, size, dir) \ > > + dma_map_page(dev, page, offset, size, dir) > > + > > +#define storvsc_dma_unmap(dev, dma_range, dir) \ > > + dma_unmap_page(dev, dma_range.dma,

Re: [PATCH V3 12/13] HV/Netvsc: Add Isolation VM support for netvsc driver

2021-08-19 Thread h...@lst.de
On Thu, Aug 19, 2021 at 06:14:51PM +, Michael Kelley wrote: > > + if (!pfns) > > + return NULL; > > + > > + for (i = 0; i < size / HV_HYP_PAGE_SIZE; i++) > > + pfns[i] = virt_to_hvpfn(buf + i * HV_HYP_PAGE_SIZE) > > + + (ms_hyperv.shared_gpa_boundary >>

Re: [PATCH V3 11/13] HV/IOMMU: Enable swiotlb bounce buffer for Isolation VM

2021-08-19 Thread h...@lst.de
On Thu, Aug 19, 2021 at 06:11:30PM +, Michael Kelley wrote: > This function is manipulating page tables in the guest VM. It is not involved > in communicating with Hyper-V, or passing PFNs to Hyper-V. The pfn array > contains guest PFNs, not Hyper-V PFNs. So it should use PAGE_SIZE > instead

Re: [Xen-devel] [PATCH] dma-mapping: remove unused attrs parameter to dma_common_get_sgtable

2019-01-03 Thread h...@lst.de
On Fri, Jan 04, 2019 at 01:45:26AM +, Huaisheng HS1 Ye wrote: > From: Stefano Stabellini > Sent: Friday, January 04, 2019 1:55 AM > > On Thu, 3 Jan 2019, Huaisheng Ye wrote: > > > From: Huaisheng Ye > > > > > > dma_common_get_sgtable has parameter attrs which is not used at all. > > > Remove