* types: reuse common phys_vec type instead of DMABUF open‑coded variant
@ 2026-01-07 9:14 Leon Romanovsky
2026-01-07 16:00 ` Jason Gunthorpe
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Leon Romanovsky @ 2026-01-07 9:14 UTC (permalink / raw)
To: Alex Williamson, linux-media, dri-devel, linaro-mm-sig,
linux-kernel, iommu, kvm, Sumit Semwal, Christian König,
Jason Gunthorpe, Kevin Tian, Joerg Roedel, Will Deacon,
Robin Murphy, Yishai Hadas, Shameer Kolothum, Ankit Agrawal,
Matthew Wilcox, Jens Axboe
From: Leon Romanovsky <leonro@nvidia.com>
After commit fcf463b92a08 ("types: move phys_vec definition to common header"),
we can use the shared phys_vec type instead of the DMABUF‑specific
dma_buf_phys_vec, which duplicated the same structure and semantics.
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
Alex,
According to diffstat, VFIO is the subsystem with the largest set of changes,
so it would be great if you could take it through your tree.
The series is based on the for-7.0/blk-pvec shared branch from Jens:
https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git/log/?h=for-7.0/blk-pvec
Thanks
---
Cc: linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
Cc: linux-kernel@vger.kernel.org
Cc: iommu@lists.linux.dev
Cc: kvm@vger.kernel.org
To: Sumit Semwal <sumit.semwal@linaro.org>
To: Christian König <christian.koenig@amd.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
To: Kevin Tian <kevin.tian@intel.com>
To: Joerg Roedel <joro@8bytes.org>
To: Will Deacon <will@kernel.org>
To: Robin Murphy <robin.murphy@arm.com>
To: Yishai Hadas <yishaih@nvidia.com>
To: Shameer Kolothum <skolothumtho@nvidia.com>
To: Ankit Agrawal <ankita@nvidia.com>
To: Alex Williamson <alex@shazbot.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Jens Axboe <axboe@kernel.dk>
---
drivers/dma-buf/dma-buf-mapping.c | 6 +++---
drivers/iommu/iommufd/io_pagetable.h | 2 +-
drivers/iommu/iommufd/iommufd_private.h | 5 ++---
drivers/iommu/iommufd/pages.c | 4 ++--
drivers/iommu/iommufd/selftest.c | 2 +-
drivers/vfio/pci/nvgrace-gpu/main.c | 2 +-
drivers/vfio/pci/vfio_pci_dmabuf.c | 8 ++++----
include/linux/dma-buf-mapping.h | 2 +-
include/linux/dma-buf.h | 10 ----------
include/linux/vfio_pci_core.h | 13 ++++++-------
10 files changed, 21 insertions(+), 33 deletions(-)
diff --git a/drivers/dma-buf/dma-buf-mapping.c b/drivers/dma-buf/dma-buf-mapping.c
index b7352e609fbd..174677faa577 100644
--- a/drivers/dma-buf/dma-buf-mapping.c
+++ b/drivers/dma-buf/dma-buf-mapping.c
@@ -33,8 +33,8 @@ static struct scatterlist *fill_sg_entry(struct scatterlist *sgl, size_t length,
}
static unsigned int calc_sg_nents(struct dma_iova_state *state,
- struct dma_buf_phys_vec *phys_vec,
- size_t nr_ranges, size_t size)
+ struct phys_vec *phys_vec, size_t nr_ranges,
+ size_t size)
{
unsigned int nents = 0;
size_t i;
@@ -91,7 +91,7 @@ struct dma_buf_dma {
*/
struct sg_table *dma_buf_phys_vec_to_sgt(struct dma_buf_attachment *attach,
struct p2pdma_provider *provider,
- struct dma_buf_phys_vec *phys_vec,
+ struct phys_vec *phys_vec,
size_t nr_ranges, size_t size,
enum dma_data_direction dir)
{
diff --git a/drivers/iommu/iommufd/io_pagetable.h b/drivers/iommu/iommufd/io_pagetable.h
index 14cd052fd320..27e3e311d395 100644
--- a/drivers/iommu/iommufd/io_pagetable.h
+++ b/drivers/iommu/iommufd/io_pagetable.h
@@ -202,7 +202,7 @@ struct iopt_pages_dmabuf_track {
struct iopt_pages_dmabuf {
struct dma_buf_attachment *attach;
- struct dma_buf_phys_vec phys;
+ struct phys_vec phys;
/* Always PAGE_SIZE aligned */
unsigned long start;
struct list_head tracker;
diff --git a/drivers/iommu/iommufd/iommufd_private.h b/drivers/iommu/iommufd/iommufd_private.h
index eb6d1a70f673..6ac1965199e9 100644
--- a/drivers/iommu/iommufd/iommufd_private.h
+++ b/drivers/iommu/iommufd/iommufd_private.h
@@ -20,7 +20,6 @@ struct iommu_group;
struct iommu_option;
struct iommufd_device;
struct dma_buf_attachment;
-struct dma_buf_phys_vec;
struct iommufd_sw_msi_map {
struct list_head sw_msi_item;
@@ -718,7 +717,7 @@ int __init iommufd_test_init(void);
void iommufd_test_exit(void);
bool iommufd_selftest_is_mock_dev(struct device *dev);
int iommufd_test_dma_buf_iommufd_map(struct dma_buf_attachment *attachment,
- struct dma_buf_phys_vec *phys);
+ struct phys_vec *phys);
#else
static inline void iommufd_test_syz_conv_iova_id(struct iommufd_ucmd *ucmd,
unsigned int ioas_id,
@@ -742,7 +741,7 @@ static inline bool iommufd_selftest_is_mock_dev(struct device *dev)
}
static inline int
iommufd_test_dma_buf_iommufd_map(struct dma_buf_attachment *attachment,
- struct dma_buf_phys_vec *phys)
+ struct phys_vec *phys)
{
return -EOPNOTSUPP;
}
diff --git a/drivers/iommu/iommufd/pages.c b/drivers/iommu/iommufd/pages.c
index dbe51ecb9a20..bababd564cf9 100644
--- a/drivers/iommu/iommufd/pages.c
+++ b/drivers/iommu/iommufd/pages.c
@@ -1077,7 +1077,7 @@ static int pfn_reader_user_update_pinned(struct pfn_reader_user *user,
}
struct pfn_reader_dmabuf {
- struct dma_buf_phys_vec phys;
+ struct phys_vec phys;
unsigned long start_offset;
};
@@ -1460,7 +1460,7 @@ static struct dma_buf_attach_ops iopt_dmabuf_attach_revoke_ops = {
*/
static int
sym_vfio_pci_dma_buf_iommufd_map(struct dma_buf_attachment *attachment,
- struct dma_buf_phys_vec *phys)
+ struct phys_vec *phys)
{
typeof(&vfio_pci_dma_buf_iommufd_map) fn;
int rc;
diff --git a/drivers/iommu/iommufd/selftest.c b/drivers/iommu/iommufd/selftest.c
index 550ff36dec3a..989d8c4c60a7 100644
--- a/drivers/iommu/iommufd/selftest.c
+++ b/drivers/iommu/iommufd/selftest.c
@@ -2002,7 +2002,7 @@ static const struct dma_buf_ops iommufd_test_dmabuf_ops = {
};
int iommufd_test_dma_buf_iommufd_map(struct dma_buf_attachment *attachment,
- struct dma_buf_phys_vec *phys)
+ struct phys_vec *phys)
{
struct iommufd_test_dma_buf *priv = attachment->dmabuf->priv;
diff --git a/drivers/vfio/pci/nvgrace-gpu/main.c b/drivers/vfio/pci/nvgrace-gpu/main.c
index 84d142a47ec6..a0f4edd6a30b 100644
--- a/drivers/vfio/pci/nvgrace-gpu/main.c
+++ b/drivers/vfio/pci/nvgrace-gpu/main.c
@@ -784,7 +784,7 @@ nvgrace_gpu_write(struct vfio_device *core_vdev,
static int nvgrace_get_dmabuf_phys(struct vfio_pci_core_device *core_vdev,
struct p2pdma_provider **provider,
unsigned int region_index,
- struct dma_buf_phys_vec *phys_vec,
+ struct phys_vec *phys_vec,
struct vfio_region_dma_range *dma_ranges,
size_t nr_ranges)
{
diff --git a/drivers/vfio/pci/vfio_pci_dmabuf.c b/drivers/vfio/pci/vfio_pci_dmabuf.c
index d4d0f7d08c53..9a84c238c013 100644
--- a/drivers/vfio/pci/vfio_pci_dmabuf.c
+++ b/drivers/vfio/pci/vfio_pci_dmabuf.c
@@ -14,7 +14,7 @@ struct vfio_pci_dma_buf {
struct vfio_pci_core_device *vdev;
struct list_head dmabufs_elm;
size_t size;
- struct dma_buf_phys_vec *phys_vec;
+ struct phys_vec *phys_vec;
struct p2pdma_provider *provider;
u32 nr_ranges;
u8 revoked : 1;
@@ -94,7 +94,7 @@ static const struct dma_buf_ops vfio_pci_dmabuf_ops = {
* will fail if it is currently revoked
*/
int vfio_pci_dma_buf_iommufd_map(struct dma_buf_attachment *attachment,
- struct dma_buf_phys_vec *phys)
+ struct phys_vec *phys)
{
struct vfio_pci_dma_buf *priv;
@@ -116,7 +116,7 @@ int vfio_pci_dma_buf_iommufd_map(struct dma_buf_attachment *attachment,
}
EXPORT_SYMBOL_FOR_MODULES(vfio_pci_dma_buf_iommufd_map, "iommufd");
-int vfio_pci_core_fill_phys_vec(struct dma_buf_phys_vec *phys_vec,
+int vfio_pci_core_fill_phys_vec(struct phys_vec *phys_vec,
struct vfio_region_dma_range *dma_ranges,
size_t nr_ranges, phys_addr_t start,
phys_addr_t len)
@@ -148,7 +148,7 @@ EXPORT_SYMBOL_GPL(vfio_pci_core_fill_phys_vec);
int vfio_pci_core_get_dmabuf_phys(struct vfio_pci_core_device *vdev,
struct p2pdma_provider **provider,
unsigned int region_index,
- struct dma_buf_phys_vec *phys_vec,
+ struct phys_vec *phys_vec,
struct vfio_region_dma_range *dma_ranges,
size_t nr_ranges)
{
diff --git a/include/linux/dma-buf-mapping.h b/include/linux/dma-buf-mapping.h
index a3c0ce2d3a42..09bde3f748e4 100644
--- a/include/linux/dma-buf-mapping.h
+++ b/include/linux/dma-buf-mapping.h
@@ -9,7 +9,7 @@
struct sg_table *dma_buf_phys_vec_to_sgt(struct dma_buf_attachment *attach,
struct p2pdma_provider *provider,
- struct dma_buf_phys_vec *phys_vec,
+ struct phys_vec *phys_vec,
size_t nr_ranges, size_t size,
enum dma_data_direction dir);
void dma_buf_free_sgt(struct dma_buf_attachment *attach, struct sg_table *sgt,
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
index 0bc492090237..400a5311368e 100644
--- a/include/linux/dma-buf.h
+++ b/include/linux/dma-buf.h
@@ -531,16 +531,6 @@ struct dma_buf_export_info {
void *priv;
};
-/**
- * struct dma_buf_phys_vec - describe continuous chunk of memory
- * @paddr: physical address of that chunk
- * @len: Length of this chunk
- */
-struct dma_buf_phys_vec {
- phys_addr_t paddr;
- size_t len;
-};
-
/**
* DEFINE_DMA_BUF_EXPORT_INFO - helper macro for exporters
* @name: export-info name
diff --git a/include/linux/vfio_pci_core.h b/include/linux/vfio_pci_core.h
index 706877f998ff..2ac288bb2c60 100644
--- a/include/linux/vfio_pci_core.h
+++ b/include/linux/vfio_pci_core.h
@@ -28,7 +28,6 @@
struct vfio_pci_core_device;
struct vfio_pci_region;
struct p2pdma_provider;
-struct dma_buf_phys_vec;
struct dma_buf_attachment;
struct vfio_pci_eventfd {
@@ -62,25 +61,25 @@ struct vfio_pci_device_ops {
int (*get_dmabuf_phys)(struct vfio_pci_core_device *vdev,
struct p2pdma_provider **provider,
unsigned int region_index,
- struct dma_buf_phys_vec *phys_vec,
+ struct phys_vec *phys_vec,
struct vfio_region_dma_range *dma_ranges,
size_t nr_ranges);
};
#if IS_ENABLED(CONFIG_VFIO_PCI_DMABUF)
-int vfio_pci_core_fill_phys_vec(struct dma_buf_phys_vec *phys_vec,
+int vfio_pci_core_fill_phys_vec(struct phys_vec *phys_vec,
struct vfio_region_dma_range *dma_ranges,
size_t nr_ranges, phys_addr_t start,
phys_addr_t len);
int vfio_pci_core_get_dmabuf_phys(struct vfio_pci_core_device *vdev,
struct p2pdma_provider **provider,
unsigned int region_index,
- struct dma_buf_phys_vec *phys_vec,
+ struct phys_vec *phys_vec,
struct vfio_region_dma_range *dma_ranges,
size_t nr_ranges);
#else
static inline int
-vfio_pci_core_fill_phys_vec(struct dma_buf_phys_vec *phys_vec,
+vfio_pci_core_fill_phys_vec(struct phys_vec *phys_vec,
struct vfio_region_dma_range *dma_ranges,
size_t nr_ranges, phys_addr_t start,
phys_addr_t len)
@@ -89,7 +88,7 @@ vfio_pci_core_fill_phys_vec(struct dma_buf_phys_vec *phys_vec,
}
static inline int vfio_pci_core_get_dmabuf_phys(
struct vfio_pci_core_device *vdev, struct p2pdma_provider **provider,
- unsigned int region_index, struct dma_buf_phys_vec *phys_vec,
+ unsigned int region_index, struct phys_vec *phys_vec,
struct vfio_region_dma_range *dma_ranges, size_t nr_ranges)
{
return -EOPNOTSUPP;
@@ -228,6 +227,6 @@ static inline bool is_aligned_for_order(struct vm_area_struct *vma,
}
int vfio_pci_dma_buf_iommufd_map(struct dma_buf_attachment *attachment,
- struct dma_buf_phys_vec *phys);
+ struct phys_vec *phys);
#endif /* VFIO_PCI_CORE_H */
---
base-commit: fcf463b92a08686d1aeb1e66674a72eb7a8bfb9b
change-id: 20260107-convert-to-pvec-bf04dfcf3d12
Best regards,
--
Leon Romanovsky <leonro@nvidia.com>
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: types: reuse common phys_vec type instead of DMABUF open‑coded variant
2026-01-07 9:14 types: reuse common phys_vec type instead of DMABUF open‑coded variant Leon Romanovsky
@ 2026-01-07 16:00 ` Jason Gunthorpe
2026-01-14 12:18 ` Leon Romanovsky
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Jason Gunthorpe @ 2026-01-07 16:00 UTC (permalink / raw)
To: Leon Romanovsky
Cc: Alex Williamson, linux-media, dri-devel, linaro-mm-sig,
linux-kernel, iommu, kvm, Sumit Semwal, Christian König,
Kevin Tian, Joerg Roedel, Will Deacon, Robin Murphy, Yishai Hadas,
Shameer Kolothum, Ankit Agrawal, Matthew Wilcox, Jens Axboe
On Wed, Jan 07, 2026 at 11:14:14AM +0200, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
>
> After commit fcf463b92a08 ("types: move phys_vec definition to common header"),
> we can use the shared phys_vec type instead of the DMABUF‑specific
> dma_buf_phys_vec, which duplicated the same structure and semantics.
>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> ---
> Alex,
>
> According to diffstat, VFIO is the subsystem with the largest set of changes,
> so it would be great if you could take it through your tree.
>
> The series is based on the for-7.0/blk-pvec shared branch from Jens:
> https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git/log/?h=for-7.0/blk-pvec
Great!
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Jason
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: types: reuse common phys_vec type instead of DMABUF open‑coded variant
2026-01-07 9:14 types: reuse common phys_vec type instead of DMABUF open‑coded variant Leon Romanovsky
2026-01-07 16:00 ` Jason Gunthorpe
@ 2026-01-14 12:18 ` Leon Romanovsky
2026-01-16 17:14 ` Alex Williamson
2026-01-15 6:01 ` Tian, Kevin
2026-01-19 20:38 ` Alex Williamson
3 siblings, 1 reply; 9+ messages in thread
From: Leon Romanovsky @ 2026-01-14 12:18 UTC (permalink / raw)
To: Alex Williamson, linux-media, dri-devel, linaro-mm-sig,
linux-kernel, iommu, kvm, Sumit Semwal, Christian König,
Jason Gunthorpe, Kevin Tian, Joerg Roedel, Will Deacon,
Robin Murphy, Yishai Hadas, Shameer Kolothum, Ankit Agrawal,
Matthew Wilcox, Jens Axboe
On Wed, Jan 07, 2026 at 11:14:14AM +0200, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
>
> After commit fcf463b92a08 ("types: move phys_vec definition to common header"),
> we can use the shared phys_vec type instead of the DMABUF‑specific
> dma_buf_phys_vec, which duplicated the same structure and semantics.
>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> ---
> Alex,
>
> According to diffstat, VFIO is the subsystem with the largest set of changes,
> so it would be great if you could take it through your tree.
>
> The series is based on the for-7.0/blk-pvec shared branch from Jens:
> https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git/log/?h=for-7.0/blk-pvec
>
> Thanks
> ---
Alex,
Could you please move this patch forward? We have the RDMA series [1] that
depends on this rename, and I would like to base it on the shared branch.
[1] https://lore.kernel.org/all/20260108-dmabuf-export-v1-0-6d47d46580d3@nvidia.com/
Thanks
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: types: reuse common phys_vec type instead of DMABUF open‑coded variant
2026-01-07 9:14 types: reuse common phys_vec type instead of DMABUF open‑coded variant Leon Romanovsky
2026-01-07 16:00 ` Jason Gunthorpe
2026-01-14 12:18 ` Leon Romanovsky
@ 2026-01-15 6:01 ` Tian, Kevin
2026-01-19 20:38 ` Alex Williamson
3 siblings, 0 replies; 9+ messages in thread
From: Tian, Kevin @ 2026-01-15 6:01 UTC (permalink / raw)
To: Leon Romanovsky, Alex Williamson, linux-media@vger.kernel.org,
dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org,
linux-kernel@vger.kernel.org, iommu@lists.linux.dev,
kvm@vger.kernel.org, Sumit Semwal, Christian König,
Jason Gunthorpe, Joerg Roedel, Will Deacon, Robin Murphy,
Yishai Hadas, Shameer Kolothum, Ankit Agrawal, Matthew Wilcox,
Jens Axboe
> From: Leon Romanovsky <leon@kernel.org>
> Sent: Wednesday, January 7, 2026 5:14 PM
>
> From: Leon Romanovsky <leonro@nvidia.com>
>
>
>
> After commit fcf463b92a08 ("types: move phys_vec definition to common
> header"),
>
> we can use the shared phys_vec type instead of the DMABUF‑specific
>
> dma_buf_phys_vec, which duplicated the same structure and semantics.
>
>
>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: types: reuse common phys_vec type instead of DMABUF open‑coded variant
2026-01-14 12:18 ` Leon Romanovsky
@ 2026-01-16 17:14 ` Alex Williamson
2026-01-18 16:54 ` Leon Romanovsky
2026-01-18 16:58 ` Jens Axboe
0 siblings, 2 replies; 9+ messages in thread
From: Alex Williamson @ 2026-01-16 17:14 UTC (permalink / raw)
To: Leon Romanovsky
Cc: linux-media, dri-devel, linaro-mm-sig, linux-kernel, iommu, kvm,
Sumit Semwal, Christian König, Jason Gunthorpe, Kevin Tian,
Joerg Roedel, Will Deacon, Robin Murphy, Yishai Hadas,
Shameer Kolothum, Ankit Agrawal, Matthew Wilcox, Jens Axboe
On Wed, 14 Jan 2026 14:18:19 +0200
Leon Romanovsky <leon@kernel.org> wrote:
> On Wed, Jan 07, 2026 at 11:14:14AM +0200, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro@nvidia.com>
> >
> > After commit fcf463b92a08 ("types: move phys_vec definition to common header"),
> > we can use the shared phys_vec type instead of the DMABUF‑specific
> > dma_buf_phys_vec, which duplicated the same structure and semantics.
> >
> > Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> > ---
> > Alex,
> >
> > According to diffstat, VFIO is the subsystem with the largest set of changes,
> > so it would be great if you could take it through your tree.
> >
> > The series is based on the for-7.0/blk-pvec shared branch from Jens:
> > https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git/log/?h=for-7.0/blk-pvec
> >
> > Thanks
> > ---
>
> Alex,
>
> Could you please move this patch forward? We have the RDMA series [1] that
> depends on this rename, and I would like to base it on the shared branch.
>
> [1] https://lore.kernel.org/all/20260108-dmabuf-export-v1-0-6d47d46580d3@nvidia.com/
I tried to ping Jens regarding why the branch with this code hasn't
been merged into their for-next branch, maybe you have more traction.
Thanks,
Alex
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: types: reuse common phys_vec type instead of DMABUF open‑coded variant
2026-01-16 17:14 ` Alex Williamson
@ 2026-01-18 16:54 ` Leon Romanovsky
2026-01-18 16:58 ` Jens Axboe
1 sibling, 0 replies; 9+ messages in thread
From: Leon Romanovsky @ 2026-01-18 16:54 UTC (permalink / raw)
To: Alex Williamson
Cc: linux-media, dri-devel, linaro-mm-sig, linux-kernel, iommu, kvm,
Sumit Semwal, Christian König, Jason Gunthorpe, Kevin Tian,
Joerg Roedel, Will Deacon, Robin Murphy, Yishai Hadas,
Shameer Kolothum, Ankit Agrawal, Matthew Wilcox, Jens Axboe
On Fri, Jan 16, 2026 at 10:14:55AM -0700, Alex Williamson wrote:
> On Wed, 14 Jan 2026 14:18:19 +0200
> Leon Romanovsky <leon@kernel.org> wrote:
>
> > On Wed, Jan 07, 2026 at 11:14:14AM +0200, Leon Romanovsky wrote:
> > > From: Leon Romanovsky <leonro@nvidia.com>
> > >
> > > After commit fcf463b92a08 ("types: move phys_vec definition to common header"),
> > > we can use the shared phys_vec type instead of the DMABUF‑specific
> > > dma_buf_phys_vec, which duplicated the same structure and semantics.
> > >
> > > Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> > > ---
> > > Alex,
> > >
> > > According to diffstat, VFIO is the subsystem with the largest set of changes,
> > > so it would be great if you could take it through your tree.
> > >
> > > The series is based on the for-7.0/blk-pvec shared branch from Jens:
> > > https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git/log/?h=for-7.0/blk-pvec
> > >
> > > Thanks
> > > ---
> >
> > Alex,
> >
> > Could you please move this patch forward? We have the RDMA series [1] that
> > depends on this rename, and I would like to base it on the shared branch.
> >
> > [1] https://lore.kernel.org/all/20260108-dmabuf-export-v1-0-6d47d46580d3@nvidia.com/
>
> I tried to ping Jens regarding why the branch with this code hasn't
> been merged into their for-next branch, maybe you have more traction.
It is in block/for-next now, commit df73d3c618b4 ("Merge branch
'for-7.0/blk-pvec' into for-7.0/block".
Thanks
> Thanks,
>
> Alex
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: types: reuse common phys_vec type instead of DMABUF open‑coded variant
2026-01-16 17:14 ` Alex Williamson
2026-01-18 16:54 ` Leon Romanovsky
@ 2026-01-18 16:58 ` Jens Axboe
1 sibling, 0 replies; 9+ messages in thread
From: Jens Axboe @ 2026-01-18 16:58 UTC (permalink / raw)
To: Alex Williamson, Leon Romanovsky
Cc: linux-media, dri-devel, linaro-mm-sig, linux-kernel, iommu, kvm,
Sumit Semwal, Christian König, Jason Gunthorpe, Kevin Tian,
Joerg Roedel, Will Deacon, Robin Murphy, Yishai Hadas,
Shameer Kolothum, Ankit Agrawal, Matthew Wilcox
On 1/16/26 10:14 AM, Alex Williamson wrote:
> On Wed, 14 Jan 2026 14:18:19 +0200
> Leon Romanovsky <leon@kernel.org> wrote:
>
>> On Wed, Jan 07, 2026 at 11:14:14AM +0200, Leon Romanovsky wrote:
>>> From: Leon Romanovsky <leonro@nvidia.com>
>>>
>>> After commit fcf463b92a08 ("types: move phys_vec definition to common header"),
>>> we can use the shared phys_vec type instead of the DMABUF?specific
>>> dma_buf_phys_vec, which duplicated the same structure and semantics.
>>>
>>> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
>>> ---
>>> Alex,
>>>
>>> According to diffstat, VFIO is the subsystem with the largest set of changes,
>>> so it would be great if you could take it through your tree.
>>>
>>> The series is based on the for-7.0/blk-pvec shared branch from Jens:
>>> https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git/log/?h=for-7.0/blk-pvec
>>>
>>> Thanks
>>> ---
>>
>> Alex,
>>
>> Could you please move this patch forward? We have the RDMA series [1] that
>> depends on this rename, and I would like to base it on the shared branch.
>>
>> [1] https://lore.kernel.org/all/20260108-dmabuf-export-v1-0-6d47d46580d3@nvidia.com/
>
> I tried to ping Jens regarding why the branch with this code hasn't
> been merged into their for-next branch, maybe you have more traction.
> Thanks,
I get a lot of emails, and pings inside existing series don't always get
seen... Usually better to do a forward for a ping, then it's a lot more
likely to get seen sooner.
--
Jens Axboe
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: types: reuse common phys_vec type instead of DMABUF open‑coded variant
2026-01-07 9:14 types: reuse common phys_vec type instead of DMABUF open‑coded variant Leon Romanovsky
` (2 preceding siblings ...)
2026-01-15 6:01 ` Tian, Kevin
@ 2026-01-19 20:38 ` Alex Williamson
2026-01-21 14:34 ` Leon Romanovsky
3 siblings, 1 reply; 9+ messages in thread
From: Alex Williamson @ 2026-01-19 20:38 UTC (permalink / raw)
To: Leon Romanovsky
Cc: linux-media, dri-devel, linaro-mm-sig, linux-kernel, iommu, kvm,
Sumit Semwal, Christian König, Jason Gunthorpe, Kevin Tian,
Joerg Roedel, Will Deacon, Robin Murphy, Yishai Hadas,
Shameer Kolothum, Ankit Agrawal, Matthew Wilcox, Jens Axboe
On Wed, 7 Jan 2026 11:14:14 +0200
Leon Romanovsky <leon@kernel.org> wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
>
> After commit fcf463b92a08 ("types: move phys_vec definition to common header"),
> we can use the shared phys_vec type instead of the DMABUF‑specific
> dma_buf_phys_vec, which duplicated the same structure and semantics.
>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> ---
> Alex,
>
> According to diffstat, VFIO is the subsystem with the largest set of changes,
> so it would be great if you could take it through your tree.
>
> The series is based on the for-7.0/blk-pvec shared branch from Jens:
> https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git/log/?h=for-7.0/blk-pvec
Applied to vfio next branch for v6.20/7.0 and pushed tag
common_phys_vec_via_vfio including this commit and dependency.
Thanks,
Alex
> ---
> Cc: linux-media@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linaro-mm-sig@lists.linaro.org
> Cc: linux-kernel@vger.kernel.org
> Cc: iommu@lists.linux.dev
> Cc: kvm@vger.kernel.org
> To: Sumit Semwal <sumit.semwal@linaro.org>
> To: Christian König <christian.koenig@amd.com>
> To: Jason Gunthorpe <jgg@ziepe.ca>
> To: Kevin Tian <kevin.tian@intel.com>
> To: Joerg Roedel <joro@8bytes.org>
> To: Will Deacon <will@kernel.org>
> To: Robin Murphy <robin.murphy@arm.com>
> To: Yishai Hadas <yishaih@nvidia.com>
> To: Shameer Kolothum <skolothumtho@nvidia.com>
> To: Ankit Agrawal <ankita@nvidia.com>
> To: Alex Williamson <alex@shazbot.org>
> Cc: Matthew Wilcox <willy@infradead.org>
> Cc: Jens Axboe <axboe@kernel.dk>
> ---
> drivers/dma-buf/dma-buf-mapping.c | 6 +++---
> drivers/iommu/iommufd/io_pagetable.h | 2 +-
> drivers/iommu/iommufd/iommufd_private.h | 5 ++---
> drivers/iommu/iommufd/pages.c | 4 ++--
> drivers/iommu/iommufd/selftest.c | 2 +-
> drivers/vfio/pci/nvgrace-gpu/main.c | 2 +-
> drivers/vfio/pci/vfio_pci_dmabuf.c | 8 ++++----
> include/linux/dma-buf-mapping.h | 2 +-
> include/linux/dma-buf.h | 10 ----------
> include/linux/vfio_pci_core.h | 13 ++++++-------
> 10 files changed, 21 insertions(+), 33 deletions(-)
>
> diff --git a/drivers/dma-buf/dma-buf-mapping.c b/drivers/dma-buf/dma-buf-mapping.c
> index b7352e609fbd..174677faa577 100644
> --- a/drivers/dma-buf/dma-buf-mapping.c
> +++ b/drivers/dma-buf/dma-buf-mapping.c
> @@ -33,8 +33,8 @@ static struct scatterlist *fill_sg_entry(struct scatterlist *sgl, size_t length,
> }
>
> static unsigned int calc_sg_nents(struct dma_iova_state *state,
> - struct dma_buf_phys_vec *phys_vec,
> - size_t nr_ranges, size_t size)
> + struct phys_vec *phys_vec, size_t nr_ranges,
> + size_t size)
> {
> unsigned int nents = 0;
> size_t i;
> @@ -91,7 +91,7 @@ struct dma_buf_dma {
> */
> struct sg_table *dma_buf_phys_vec_to_sgt(struct dma_buf_attachment *attach,
> struct p2pdma_provider *provider,
> - struct dma_buf_phys_vec *phys_vec,
> + struct phys_vec *phys_vec,
> size_t nr_ranges, size_t size,
> enum dma_data_direction dir)
> {
> diff --git a/drivers/iommu/iommufd/io_pagetable.h b/drivers/iommu/iommufd/io_pagetable.h
> index 14cd052fd320..27e3e311d395 100644
> --- a/drivers/iommu/iommufd/io_pagetable.h
> +++ b/drivers/iommu/iommufd/io_pagetable.h
> @@ -202,7 +202,7 @@ struct iopt_pages_dmabuf_track {
>
> struct iopt_pages_dmabuf {
> struct dma_buf_attachment *attach;
> - struct dma_buf_phys_vec phys;
> + struct phys_vec phys;
> /* Always PAGE_SIZE aligned */
> unsigned long start;
> struct list_head tracker;
> diff --git a/drivers/iommu/iommufd/iommufd_private.h b/drivers/iommu/iommufd/iommufd_private.h
> index eb6d1a70f673..6ac1965199e9 100644
> --- a/drivers/iommu/iommufd/iommufd_private.h
> +++ b/drivers/iommu/iommufd/iommufd_private.h
> @@ -20,7 +20,6 @@ struct iommu_group;
> struct iommu_option;
> struct iommufd_device;
> struct dma_buf_attachment;
> -struct dma_buf_phys_vec;
>
> struct iommufd_sw_msi_map {
> struct list_head sw_msi_item;
> @@ -718,7 +717,7 @@ int __init iommufd_test_init(void);
> void iommufd_test_exit(void);
> bool iommufd_selftest_is_mock_dev(struct device *dev);
> int iommufd_test_dma_buf_iommufd_map(struct dma_buf_attachment *attachment,
> - struct dma_buf_phys_vec *phys);
> + struct phys_vec *phys);
> #else
> static inline void iommufd_test_syz_conv_iova_id(struct iommufd_ucmd *ucmd,
> unsigned int ioas_id,
> @@ -742,7 +741,7 @@ static inline bool iommufd_selftest_is_mock_dev(struct device *dev)
> }
> static inline int
> iommufd_test_dma_buf_iommufd_map(struct dma_buf_attachment *attachment,
> - struct dma_buf_phys_vec *phys)
> + struct phys_vec *phys)
> {
> return -EOPNOTSUPP;
> }
> diff --git a/drivers/iommu/iommufd/pages.c b/drivers/iommu/iommufd/pages.c
> index dbe51ecb9a20..bababd564cf9 100644
> --- a/drivers/iommu/iommufd/pages.c
> +++ b/drivers/iommu/iommufd/pages.c
> @@ -1077,7 +1077,7 @@ static int pfn_reader_user_update_pinned(struct pfn_reader_user *user,
> }
>
> struct pfn_reader_dmabuf {
> - struct dma_buf_phys_vec phys;
> + struct phys_vec phys;
> unsigned long start_offset;
> };
>
> @@ -1460,7 +1460,7 @@ static struct dma_buf_attach_ops iopt_dmabuf_attach_revoke_ops = {
> */
> static int
> sym_vfio_pci_dma_buf_iommufd_map(struct dma_buf_attachment *attachment,
> - struct dma_buf_phys_vec *phys)
> + struct phys_vec *phys)
> {
> typeof(&vfio_pci_dma_buf_iommufd_map) fn;
> int rc;
> diff --git a/drivers/iommu/iommufd/selftest.c b/drivers/iommu/iommufd/selftest.c
> index 550ff36dec3a..989d8c4c60a7 100644
> --- a/drivers/iommu/iommufd/selftest.c
> +++ b/drivers/iommu/iommufd/selftest.c
> @@ -2002,7 +2002,7 @@ static const struct dma_buf_ops iommufd_test_dmabuf_ops = {
> };
>
> int iommufd_test_dma_buf_iommufd_map(struct dma_buf_attachment *attachment,
> - struct dma_buf_phys_vec *phys)
> + struct phys_vec *phys)
> {
> struct iommufd_test_dma_buf *priv = attachment->dmabuf->priv;
>
> diff --git a/drivers/vfio/pci/nvgrace-gpu/main.c b/drivers/vfio/pci/nvgrace-gpu/main.c
> index 84d142a47ec6..a0f4edd6a30b 100644
> --- a/drivers/vfio/pci/nvgrace-gpu/main.c
> +++ b/drivers/vfio/pci/nvgrace-gpu/main.c
> @@ -784,7 +784,7 @@ nvgrace_gpu_write(struct vfio_device *core_vdev,
> static int nvgrace_get_dmabuf_phys(struct vfio_pci_core_device *core_vdev,
> struct p2pdma_provider **provider,
> unsigned int region_index,
> - struct dma_buf_phys_vec *phys_vec,
> + struct phys_vec *phys_vec,
> struct vfio_region_dma_range *dma_ranges,
> size_t nr_ranges)
> {
> diff --git a/drivers/vfio/pci/vfio_pci_dmabuf.c b/drivers/vfio/pci/vfio_pci_dmabuf.c
> index d4d0f7d08c53..9a84c238c013 100644
> --- a/drivers/vfio/pci/vfio_pci_dmabuf.c
> +++ b/drivers/vfio/pci/vfio_pci_dmabuf.c
> @@ -14,7 +14,7 @@ struct vfio_pci_dma_buf {
> struct vfio_pci_core_device *vdev;
> struct list_head dmabufs_elm;
> size_t size;
> - struct dma_buf_phys_vec *phys_vec;
> + struct phys_vec *phys_vec;
> struct p2pdma_provider *provider;
> u32 nr_ranges;
> u8 revoked : 1;
> @@ -94,7 +94,7 @@ static const struct dma_buf_ops vfio_pci_dmabuf_ops = {
> * will fail if it is currently revoked
> */
> int vfio_pci_dma_buf_iommufd_map(struct dma_buf_attachment *attachment,
> - struct dma_buf_phys_vec *phys)
> + struct phys_vec *phys)
> {
> struct vfio_pci_dma_buf *priv;
>
> @@ -116,7 +116,7 @@ int vfio_pci_dma_buf_iommufd_map(struct dma_buf_attachment *attachment,
> }
> EXPORT_SYMBOL_FOR_MODULES(vfio_pci_dma_buf_iommufd_map, "iommufd");
>
> -int vfio_pci_core_fill_phys_vec(struct dma_buf_phys_vec *phys_vec,
> +int vfio_pci_core_fill_phys_vec(struct phys_vec *phys_vec,
> struct vfio_region_dma_range *dma_ranges,
> size_t nr_ranges, phys_addr_t start,
> phys_addr_t len)
> @@ -148,7 +148,7 @@ EXPORT_SYMBOL_GPL(vfio_pci_core_fill_phys_vec);
> int vfio_pci_core_get_dmabuf_phys(struct vfio_pci_core_device *vdev,
> struct p2pdma_provider **provider,
> unsigned int region_index,
> - struct dma_buf_phys_vec *phys_vec,
> + struct phys_vec *phys_vec,
> struct vfio_region_dma_range *dma_ranges,
> size_t nr_ranges)
> {
> diff --git a/include/linux/dma-buf-mapping.h b/include/linux/dma-buf-mapping.h
> index a3c0ce2d3a42..09bde3f748e4 100644
> --- a/include/linux/dma-buf-mapping.h
> +++ b/include/linux/dma-buf-mapping.h
> @@ -9,7 +9,7 @@
>
> struct sg_table *dma_buf_phys_vec_to_sgt(struct dma_buf_attachment *attach,
> struct p2pdma_provider *provider,
> - struct dma_buf_phys_vec *phys_vec,
> + struct phys_vec *phys_vec,
> size_t nr_ranges, size_t size,
> enum dma_data_direction dir);
> void dma_buf_free_sgt(struct dma_buf_attachment *attach, struct sg_table *sgt,
> diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
> index 0bc492090237..400a5311368e 100644
> --- a/include/linux/dma-buf.h
> +++ b/include/linux/dma-buf.h
> @@ -531,16 +531,6 @@ struct dma_buf_export_info {
> void *priv;
> };
>
> -/**
> - * struct dma_buf_phys_vec - describe continuous chunk of memory
> - * @paddr: physical address of that chunk
> - * @len: Length of this chunk
> - */
> -struct dma_buf_phys_vec {
> - phys_addr_t paddr;
> - size_t len;
> -};
> -
> /**
> * DEFINE_DMA_BUF_EXPORT_INFO - helper macro for exporters
> * @name: export-info name
> diff --git a/include/linux/vfio_pci_core.h b/include/linux/vfio_pci_core.h
> index 706877f998ff..2ac288bb2c60 100644
> --- a/include/linux/vfio_pci_core.h
> +++ b/include/linux/vfio_pci_core.h
> @@ -28,7 +28,6 @@
> struct vfio_pci_core_device;
> struct vfio_pci_region;
> struct p2pdma_provider;
> -struct dma_buf_phys_vec;
> struct dma_buf_attachment;
>
> struct vfio_pci_eventfd {
> @@ -62,25 +61,25 @@ struct vfio_pci_device_ops {
> int (*get_dmabuf_phys)(struct vfio_pci_core_device *vdev,
> struct p2pdma_provider **provider,
> unsigned int region_index,
> - struct dma_buf_phys_vec *phys_vec,
> + struct phys_vec *phys_vec,
> struct vfio_region_dma_range *dma_ranges,
> size_t nr_ranges);
> };
>
> #if IS_ENABLED(CONFIG_VFIO_PCI_DMABUF)
> -int vfio_pci_core_fill_phys_vec(struct dma_buf_phys_vec *phys_vec,
> +int vfio_pci_core_fill_phys_vec(struct phys_vec *phys_vec,
> struct vfio_region_dma_range *dma_ranges,
> size_t nr_ranges, phys_addr_t start,
> phys_addr_t len);
> int vfio_pci_core_get_dmabuf_phys(struct vfio_pci_core_device *vdev,
> struct p2pdma_provider **provider,
> unsigned int region_index,
> - struct dma_buf_phys_vec *phys_vec,
> + struct phys_vec *phys_vec,
> struct vfio_region_dma_range *dma_ranges,
> size_t nr_ranges);
> #else
> static inline int
> -vfio_pci_core_fill_phys_vec(struct dma_buf_phys_vec *phys_vec,
> +vfio_pci_core_fill_phys_vec(struct phys_vec *phys_vec,
> struct vfio_region_dma_range *dma_ranges,
> size_t nr_ranges, phys_addr_t start,
> phys_addr_t len)
> @@ -89,7 +88,7 @@ vfio_pci_core_fill_phys_vec(struct dma_buf_phys_vec *phys_vec,
> }
> static inline int vfio_pci_core_get_dmabuf_phys(
> struct vfio_pci_core_device *vdev, struct p2pdma_provider **provider,
> - unsigned int region_index, struct dma_buf_phys_vec *phys_vec,
> + unsigned int region_index, struct phys_vec *phys_vec,
> struct vfio_region_dma_range *dma_ranges, size_t nr_ranges)
> {
> return -EOPNOTSUPP;
> @@ -228,6 +227,6 @@ static inline bool is_aligned_for_order(struct vm_area_struct *vma,
> }
>
> int vfio_pci_dma_buf_iommufd_map(struct dma_buf_attachment *attachment,
> - struct dma_buf_phys_vec *phys);
> + struct phys_vec *phys);
>
> #endif /* VFIO_PCI_CORE_H */
>
> ---
> base-commit: fcf463b92a08686d1aeb1e66674a72eb7a8bfb9b
> change-id: 20260107-convert-to-pvec-bf04dfcf3d12
>
> Best regards,
> --
> Leon Romanovsky <leonro@nvidia.com>
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: types: reuse common phys_vec type instead of DMABUF open‑coded variant
2026-01-19 20:38 ` Alex Williamson
@ 2026-01-21 14:34 ` Leon Romanovsky
0 siblings, 0 replies; 9+ messages in thread
From: Leon Romanovsky @ 2026-01-21 14:34 UTC (permalink / raw)
To: Alex Williamson
Cc: linux-media, dri-devel, linaro-mm-sig, linux-kernel, iommu, kvm,
Sumit Semwal, Christian König, Jason Gunthorpe, Kevin Tian,
Joerg Roedel, Will Deacon, Robin Murphy, Yishai Hadas,
Shameer Kolothum, Ankit Agrawal, Matthew Wilcox, Jens Axboe
On Mon, Jan 19, 2026 at 01:38:38PM -0700, Alex Williamson wrote:
> On Wed, 7 Jan 2026 11:14:14 +0200
> Leon Romanovsky <leon@kernel.org> wrote:
>
> > From: Leon Romanovsky <leonro@nvidia.com>
> >
> > After commit fcf463b92a08 ("types: move phys_vec definition to common header"),
> > we can use the shared phys_vec type instead of the DMABUF‑specific
> > dma_buf_phys_vec, which duplicated the same structure and semantics.
> >
> > Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> > ---
> > Alex,
> >
> > According to diffstat, VFIO is the subsystem with the largest set of changes,
> > so it would be great if you could take it through your tree.
> >
> > The series is based on the for-7.0/blk-pvec shared branch from Jens:
> > https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git/log/?h=for-7.0/blk-pvec
>
> Applied to vfio next branch for v6.20/7.0 and pushed tag
> common_phys_vec_via_vfio including this commit and dependency.
Thanks. I will pull it right before the RDMA dma-buf exporter patches are
ready to be merged.
Thanks again.
> Thanks,
>
> Alex
>
>
> > ---
> > Cc: linux-media@vger.kernel.org
> > Cc: dri-devel@lists.freedesktop.org
> > Cc: linaro-mm-sig@lists.linaro.org
> > Cc: linux-kernel@vger.kernel.org
> > Cc: iommu@lists.linux.dev
> > Cc: kvm@vger.kernel.org
> > To: Sumit Semwal <sumit.semwal@linaro.org>
> > To: Christian König <christian.koenig@amd.com>
> > To: Jason Gunthorpe <jgg@ziepe.ca>
> > To: Kevin Tian <kevin.tian@intel.com>
> > To: Joerg Roedel <joro@8bytes.org>
> > To: Will Deacon <will@kernel.org>
> > To: Robin Murphy <robin.murphy@arm.com>
> > To: Yishai Hadas <yishaih@nvidia.com>
> > To: Shameer Kolothum <skolothumtho@nvidia.com>
> > To: Ankit Agrawal <ankita@nvidia.com>
> > To: Alex Williamson <alex@shazbot.org>
> > Cc: Matthew Wilcox <willy@infradead.org>
> > Cc: Jens Axboe <axboe@kernel.dk>
> > ---
> > drivers/dma-buf/dma-buf-mapping.c | 6 +++---
> > drivers/iommu/iommufd/io_pagetable.h | 2 +-
> > drivers/iommu/iommufd/iommufd_private.h | 5 ++---
> > drivers/iommu/iommufd/pages.c | 4 ++--
> > drivers/iommu/iommufd/selftest.c | 2 +-
> > drivers/vfio/pci/nvgrace-gpu/main.c | 2 +-
> > drivers/vfio/pci/vfio_pci_dmabuf.c | 8 ++++----
> > include/linux/dma-buf-mapping.h | 2 +-
> > include/linux/dma-buf.h | 10 ----------
> > include/linux/vfio_pci_core.h | 13 ++++++-------
> > 10 files changed, 21 insertions(+), 33 deletions(-)
> >
> > diff --git a/drivers/dma-buf/dma-buf-mapping.c b/drivers/dma-buf/dma-buf-mapping.c
> > index b7352e609fbd..174677faa577 100644
> > --- a/drivers/dma-buf/dma-buf-mapping.c
> > +++ b/drivers/dma-buf/dma-buf-mapping.c
> > @@ -33,8 +33,8 @@ static struct scatterlist *fill_sg_entry(struct scatterlist *sgl, size_t length,
> > }
> >
> > static unsigned int calc_sg_nents(struct dma_iova_state *state,
> > - struct dma_buf_phys_vec *phys_vec,
> > - size_t nr_ranges, size_t size)
> > + struct phys_vec *phys_vec, size_t nr_ranges,
> > + size_t size)
> > {
> > unsigned int nents = 0;
> > size_t i;
> > @@ -91,7 +91,7 @@ struct dma_buf_dma {
> > */
> > struct sg_table *dma_buf_phys_vec_to_sgt(struct dma_buf_attachment *attach,
> > struct p2pdma_provider *provider,
> > - struct dma_buf_phys_vec *phys_vec,
> > + struct phys_vec *phys_vec,
> > size_t nr_ranges, size_t size,
> > enum dma_data_direction dir)
> > {
> > diff --git a/drivers/iommu/iommufd/io_pagetable.h b/drivers/iommu/iommufd/io_pagetable.h
> > index 14cd052fd320..27e3e311d395 100644
> > --- a/drivers/iommu/iommufd/io_pagetable.h
> > +++ b/drivers/iommu/iommufd/io_pagetable.h
> > @@ -202,7 +202,7 @@ struct iopt_pages_dmabuf_track {
> >
> > struct iopt_pages_dmabuf {
> > struct dma_buf_attachment *attach;
> > - struct dma_buf_phys_vec phys;
> > + struct phys_vec phys;
> > /* Always PAGE_SIZE aligned */
> > unsigned long start;
> > struct list_head tracker;
> > diff --git a/drivers/iommu/iommufd/iommufd_private.h b/drivers/iommu/iommufd/iommufd_private.h
> > index eb6d1a70f673..6ac1965199e9 100644
> > --- a/drivers/iommu/iommufd/iommufd_private.h
> > +++ b/drivers/iommu/iommufd/iommufd_private.h
> > @@ -20,7 +20,6 @@ struct iommu_group;
> > struct iommu_option;
> > struct iommufd_device;
> > struct dma_buf_attachment;
> > -struct dma_buf_phys_vec;
> >
> > struct iommufd_sw_msi_map {
> > struct list_head sw_msi_item;
> > @@ -718,7 +717,7 @@ int __init iommufd_test_init(void);
> > void iommufd_test_exit(void);
> > bool iommufd_selftest_is_mock_dev(struct device *dev);
> > int iommufd_test_dma_buf_iommufd_map(struct dma_buf_attachment *attachment,
> > - struct dma_buf_phys_vec *phys);
> > + struct phys_vec *phys);
> > #else
> > static inline void iommufd_test_syz_conv_iova_id(struct iommufd_ucmd *ucmd,
> > unsigned int ioas_id,
> > @@ -742,7 +741,7 @@ static inline bool iommufd_selftest_is_mock_dev(struct device *dev)
> > }
> > static inline int
> > iommufd_test_dma_buf_iommufd_map(struct dma_buf_attachment *attachment,
> > - struct dma_buf_phys_vec *phys)
> > + struct phys_vec *phys)
> > {
> > return -EOPNOTSUPP;
> > }
> > diff --git a/drivers/iommu/iommufd/pages.c b/drivers/iommu/iommufd/pages.c
> > index dbe51ecb9a20..bababd564cf9 100644
> > --- a/drivers/iommu/iommufd/pages.c
> > +++ b/drivers/iommu/iommufd/pages.c
> > @@ -1077,7 +1077,7 @@ static int pfn_reader_user_update_pinned(struct pfn_reader_user *user,
> > }
> >
> > struct pfn_reader_dmabuf {
> > - struct dma_buf_phys_vec phys;
> > + struct phys_vec phys;
> > unsigned long start_offset;
> > };
> >
> > @@ -1460,7 +1460,7 @@ static struct dma_buf_attach_ops iopt_dmabuf_attach_revoke_ops = {
> > */
> > static int
> > sym_vfio_pci_dma_buf_iommufd_map(struct dma_buf_attachment *attachment,
> > - struct dma_buf_phys_vec *phys)
> > + struct phys_vec *phys)
> > {
> > typeof(&vfio_pci_dma_buf_iommufd_map) fn;
> > int rc;
> > diff --git a/drivers/iommu/iommufd/selftest.c b/drivers/iommu/iommufd/selftest.c
> > index 550ff36dec3a..989d8c4c60a7 100644
> > --- a/drivers/iommu/iommufd/selftest.c
> > +++ b/drivers/iommu/iommufd/selftest.c
> > @@ -2002,7 +2002,7 @@ static const struct dma_buf_ops iommufd_test_dmabuf_ops = {
> > };
> >
> > int iommufd_test_dma_buf_iommufd_map(struct dma_buf_attachment *attachment,
> > - struct dma_buf_phys_vec *phys)
> > + struct phys_vec *phys)
> > {
> > struct iommufd_test_dma_buf *priv = attachment->dmabuf->priv;
> >
> > diff --git a/drivers/vfio/pci/nvgrace-gpu/main.c b/drivers/vfio/pci/nvgrace-gpu/main.c
> > index 84d142a47ec6..a0f4edd6a30b 100644
> > --- a/drivers/vfio/pci/nvgrace-gpu/main.c
> > +++ b/drivers/vfio/pci/nvgrace-gpu/main.c
> > @@ -784,7 +784,7 @@ nvgrace_gpu_write(struct vfio_device *core_vdev,
> > static int nvgrace_get_dmabuf_phys(struct vfio_pci_core_device *core_vdev,
> > struct p2pdma_provider **provider,
> > unsigned int region_index,
> > - struct dma_buf_phys_vec *phys_vec,
> > + struct phys_vec *phys_vec,
> > struct vfio_region_dma_range *dma_ranges,
> > size_t nr_ranges)
> > {
> > diff --git a/drivers/vfio/pci/vfio_pci_dmabuf.c b/drivers/vfio/pci/vfio_pci_dmabuf.c
> > index d4d0f7d08c53..9a84c238c013 100644
> > --- a/drivers/vfio/pci/vfio_pci_dmabuf.c
> > +++ b/drivers/vfio/pci/vfio_pci_dmabuf.c
> > @@ -14,7 +14,7 @@ struct vfio_pci_dma_buf {
> > struct vfio_pci_core_device *vdev;
> > struct list_head dmabufs_elm;
> > size_t size;
> > - struct dma_buf_phys_vec *phys_vec;
> > + struct phys_vec *phys_vec;
> > struct p2pdma_provider *provider;
> > u32 nr_ranges;
> > u8 revoked : 1;
> > @@ -94,7 +94,7 @@ static const struct dma_buf_ops vfio_pci_dmabuf_ops = {
> > * will fail if it is currently revoked
> > */
> > int vfio_pci_dma_buf_iommufd_map(struct dma_buf_attachment *attachment,
> > - struct dma_buf_phys_vec *phys)
> > + struct phys_vec *phys)
> > {
> > struct vfio_pci_dma_buf *priv;
> >
> > @@ -116,7 +116,7 @@ int vfio_pci_dma_buf_iommufd_map(struct dma_buf_attachment *attachment,
> > }
> > EXPORT_SYMBOL_FOR_MODULES(vfio_pci_dma_buf_iommufd_map, "iommufd");
> >
> > -int vfio_pci_core_fill_phys_vec(struct dma_buf_phys_vec *phys_vec,
> > +int vfio_pci_core_fill_phys_vec(struct phys_vec *phys_vec,
> > struct vfio_region_dma_range *dma_ranges,
> > size_t nr_ranges, phys_addr_t start,
> > phys_addr_t len)
> > @@ -148,7 +148,7 @@ EXPORT_SYMBOL_GPL(vfio_pci_core_fill_phys_vec);
> > int vfio_pci_core_get_dmabuf_phys(struct vfio_pci_core_device *vdev,
> > struct p2pdma_provider **provider,
> > unsigned int region_index,
> > - struct dma_buf_phys_vec *phys_vec,
> > + struct phys_vec *phys_vec,
> > struct vfio_region_dma_range *dma_ranges,
> > size_t nr_ranges)
> > {
> > diff --git a/include/linux/dma-buf-mapping.h b/include/linux/dma-buf-mapping.h
> > index a3c0ce2d3a42..09bde3f748e4 100644
> > --- a/include/linux/dma-buf-mapping.h
> > +++ b/include/linux/dma-buf-mapping.h
> > @@ -9,7 +9,7 @@
> >
> > struct sg_table *dma_buf_phys_vec_to_sgt(struct dma_buf_attachment *attach,
> > struct p2pdma_provider *provider,
> > - struct dma_buf_phys_vec *phys_vec,
> > + struct phys_vec *phys_vec,
> > size_t nr_ranges, size_t size,
> > enum dma_data_direction dir);
> > void dma_buf_free_sgt(struct dma_buf_attachment *attach, struct sg_table *sgt,
> > diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
> > index 0bc492090237..400a5311368e 100644
> > --- a/include/linux/dma-buf.h
> > +++ b/include/linux/dma-buf.h
> > @@ -531,16 +531,6 @@ struct dma_buf_export_info {
> > void *priv;
> > };
> >
> > -/**
> > - * struct dma_buf_phys_vec - describe continuous chunk of memory
> > - * @paddr: physical address of that chunk
> > - * @len: Length of this chunk
> > - */
> > -struct dma_buf_phys_vec {
> > - phys_addr_t paddr;
> > - size_t len;
> > -};
> > -
> > /**
> > * DEFINE_DMA_BUF_EXPORT_INFO - helper macro for exporters
> > * @name: export-info name
> > diff --git a/include/linux/vfio_pci_core.h b/include/linux/vfio_pci_core.h
> > index 706877f998ff..2ac288bb2c60 100644
> > --- a/include/linux/vfio_pci_core.h
> > +++ b/include/linux/vfio_pci_core.h
> > @@ -28,7 +28,6 @@
> > struct vfio_pci_core_device;
> > struct vfio_pci_region;
> > struct p2pdma_provider;
> > -struct dma_buf_phys_vec;
> > struct dma_buf_attachment;
> >
> > struct vfio_pci_eventfd {
> > @@ -62,25 +61,25 @@ struct vfio_pci_device_ops {
> > int (*get_dmabuf_phys)(struct vfio_pci_core_device *vdev,
> > struct p2pdma_provider **provider,
> > unsigned int region_index,
> > - struct dma_buf_phys_vec *phys_vec,
> > + struct phys_vec *phys_vec,
> > struct vfio_region_dma_range *dma_ranges,
> > size_t nr_ranges);
> > };
> >
> > #if IS_ENABLED(CONFIG_VFIO_PCI_DMABUF)
> > -int vfio_pci_core_fill_phys_vec(struct dma_buf_phys_vec *phys_vec,
> > +int vfio_pci_core_fill_phys_vec(struct phys_vec *phys_vec,
> > struct vfio_region_dma_range *dma_ranges,
> > size_t nr_ranges, phys_addr_t start,
> > phys_addr_t len);
> > int vfio_pci_core_get_dmabuf_phys(struct vfio_pci_core_device *vdev,
> > struct p2pdma_provider **provider,
> > unsigned int region_index,
> > - struct dma_buf_phys_vec *phys_vec,
> > + struct phys_vec *phys_vec,
> > struct vfio_region_dma_range *dma_ranges,
> > size_t nr_ranges);
> > #else
> > static inline int
> > -vfio_pci_core_fill_phys_vec(struct dma_buf_phys_vec *phys_vec,
> > +vfio_pci_core_fill_phys_vec(struct phys_vec *phys_vec,
> > struct vfio_region_dma_range *dma_ranges,
> > size_t nr_ranges, phys_addr_t start,
> > phys_addr_t len)
> > @@ -89,7 +88,7 @@ vfio_pci_core_fill_phys_vec(struct dma_buf_phys_vec *phys_vec,
> > }
> > static inline int vfio_pci_core_get_dmabuf_phys(
> > struct vfio_pci_core_device *vdev, struct p2pdma_provider **provider,
> > - unsigned int region_index, struct dma_buf_phys_vec *phys_vec,
> > + unsigned int region_index, struct phys_vec *phys_vec,
> > struct vfio_region_dma_range *dma_ranges, size_t nr_ranges)
> > {
> > return -EOPNOTSUPP;
> > @@ -228,6 +227,6 @@ static inline bool is_aligned_for_order(struct vm_area_struct *vma,
> > }
> >
> > int vfio_pci_dma_buf_iommufd_map(struct dma_buf_attachment *attachment,
> > - struct dma_buf_phys_vec *phys);
> > + struct phys_vec *phys);
> >
> > #endif /* VFIO_PCI_CORE_H */
> >
> > ---
> > base-commit: fcf463b92a08686d1aeb1e66674a72eb7a8bfb9b
> > change-id: 20260107-convert-to-pvec-bf04dfcf3d12
> >
> > Best regards,
> > --
> > Leon Romanovsky <leonro@nvidia.com>
> >
> >
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-01-21 14:34 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-07 9:14 types: reuse common phys_vec type instead of DMABUF open‑coded variant Leon Romanovsky
2026-01-07 16:00 ` Jason Gunthorpe
2026-01-14 12:18 ` Leon Romanovsky
2026-01-16 17:14 ` Alex Williamson
2026-01-18 16:54 ` Leon Romanovsky
2026-01-18 16:58 ` Jens Axboe
2026-01-15 6:01 ` Tian, Kevin
2026-01-19 20:38 ` Alex Williamson
2026-01-21 14:34 ` Leon Romanovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox