RE: [RFC PATCH v6 3/5] block: add a helper function to merge the segments by an IOMMU

2019-06-17 Thread Yoshihiro Shimoda
Hi Robin, > From: Robin Murphy, Sent: Friday, June 14, 2019 6:55 PM > > On 13/06/2019 11:20, Yoshihiro Shimoda wrote: > > +bool blk_queue_can_use_iommu_merging(struct request_queue *q, > > +struct device *dev) > > +{ > > + struct iommu_domain *domain; > > + > >

Re: [RFC PATCH v6 3/5] block: add a helper function to merge the segments by an IOMMU

2019-06-14 Thread Robin Murphy
On 13/06/2019 11:20, Yoshihiro Shimoda wrote: This patch adds a helper function whether a queue can merge the segments by an IOMMU. Signed-off-by: Yoshihiro Shimoda --- block/blk-settings.c | 28 include/linux/blkdev.h | 2 ++ 2 files changed, 30

Re: [RFC PATCH v6 3/5] block: add a helper function to merge the segments by an IOMMU

2019-06-14 Thread Christoph Hellwig
I'm a little worried about this directly calling into the iommu API instead of going through the DMA mapping code. We still have plenty of iommus not using the iommu layer for DMA mapping. But at least this code is in the block layer and not the driver, so maybe we can live with it.

[RFC PATCH v6 3/5] block: add a helper function to merge the segments by an IOMMU

2019-06-13 Thread Yoshihiro Shimoda
This patch adds a helper function whether a queue can merge the segments by an IOMMU. Signed-off-by: Yoshihiro Shimoda --- block/blk-settings.c | 28 include/linux/blkdev.h | 2 ++ 2 files changed, 30 insertions(+) diff --git a/block/blk-settings.c