[PATCH v3 0/2] block: Generalize physical entry definition

Leon Romanovsky posted 2 patches 1 month, 3 weeks ago
block/blk-mq-dma.c      | 11 +++++------
drivers/nvme/host/pci.c |  4 ++--
include/linux/types.h   |  5 +++++
3 files changed, 12 insertions(+), 8 deletions(-)
[PATCH v3 0/2] block: Generalize physical entry definition
Posted by Leon Romanovsky 1 month, 3 weeks ago
Jens,

I would like to ask you to put these patches on some shared branch based
on v6.19-rcX tag, so I will be able to reuse this general type in VFIO
and DMABUF code.

--------------------------------------------------------------------------------
Changelog:
v3:
 * Rebased on top v6.19-rc1
 * Added note that memory size is not changed despite change in the
   variable type.
v2: https://lore.kernel.org/linux-nvme/20251117-nvme-phys-types-v2-0-c75a60a2c468@nvidia.com/
 * Added Chaitanya's Reviewed-by tags.
 * Removed explicit casting from size_t to unsigned int.
v1: https://patch.msgid.link/20251115-nvme-phys-types-v1-0-c0f2e5e9163d@kernel.org

--------------------------------------------------------------------------------
The block layer code is declared "struct phys_vec" entry which describes
contiguous chunk of physical memory. That definition is useful for all
possible users of DMA physical address-based API.

This series changes NVMe code to support larger chunks of memory by changing
length field from u32 to be size_t, which will be u64 on 64-bits platforms,
and promotes "struct phys_vec" to general place.

This change doesn't change memory footprint because on 32-bits systems,
size_t will be u32 as before and on 64bits system previous uint32_t
variable was padded to be uint64_t anyway.

Thanks

---
Leon Romanovsky (2):
      nvme-pci: Use size_t for length fields to handle larger sizes
      types: move phys_vec definition to common header

 block/blk-mq-dma.c      | 11 +++++------
 drivers/nvme/host/pci.c |  4 ++--
 include/linux/types.h   |  5 +++++
 3 files changed, 12 insertions(+), 8 deletions(-)
---
base-commit: 5674abb82e2b74205a6a5cd1ffd79a3ba48a469d
change-id: 20251030-nvme-phys-types-988893249454

Best regards,
--
Leon Romanovsky <leonro@nvidia.com>

---
Leon Romanovsky (2):
      nvme-pci: Use size_t for length fields to handle larger sizes
      types: move phys_vec definition to common header

 block/blk-mq-dma.c      | 11 +++++------
 drivers/nvme/host/pci.c |  4 ++--
 include/linux/types.h   |  5 +++++
 3 files changed, 12 insertions(+), 8 deletions(-)
---
base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
change-id: 20251217-nvme-phys-types-5bf34e42b2df

Best regards,
--  
Leon Romanovsky <leonro@nvidia.com>
Re: [PATCH v3 0/2] block: Generalize physical entry definition
Posted by Jens Axboe 1 month ago
On Wed, 17 Dec 2025 11:41:22 +0200, Leon Romanovsky wrote:
> Jens,
> 
> I would like to ask you to put these patches on some shared branch based
> on v6.19-rcX tag, so I will be able to reuse this general type in VFIO
> and DMABUF code.
> 
> --------------------------------------------------------------------------------
> Changelog:
> v3:
>  * Rebased on top v6.19-rc1
>  * Added note that memory size is not changed despite change in the
>    variable type.
> v2: https://lore.kernel.org/linux-nvme/20251117-nvme-phys-types-v2-0-c75a60a2c468@nvidia.com/
>  * Added Chaitanya's Reviewed-by tags.
>  * Removed explicit casting from size_t to unsigned int.
> v1: https://patch.msgid.link/20251115-nvme-phys-types-v1-0-c0f2e5e9163d@kernel.org
> 
> [...]

Applied, thanks!

[1/2] nvme-pci: Use size_t for length fields to handle larger sizes
      commit: 073b9bf9af463d32555c5ebaf7e28c3a44c715d0
[2/2] types: move phys_vec definition to common header
      commit: fcf463b92a08686d1aeb1e66674a72eb7a8bfb9b

Best regards,
-- 
Jens Axboe
Re: [PATCH v3 0/2] block: Generalize physical entry definition
Posted by Alex Williamson 3 weeks, 3 days ago
On Tue, 06 Jan 2026 19:10:46 -0700
Jens Axboe <axboe@kernel.dk> wrote:

> On Wed, 17 Dec 2025 11:41:22 +0200, Leon Romanovsky wrote:
> > Jens,
> > 
> > I would like to ask you to put these patches on some shared branch based
> > on v6.19-rcX tag, so I will be able to reuse this general type in VFIO
> > and DMABUF code.
> > 
> > --------------------------------------------------------------------------------
> > Changelog:
> > v3:
> >  * Rebased on top v6.19-rc1
> >  * Added note that memory size is not changed despite change in the
> >    variable type.
> > v2: https://lore.kernel.org/linux-nvme/20251117-nvme-phys-types-v2-0-c75a60a2c468@nvidia.com/
> >  * Added Chaitanya's Reviewed-by tags.
> >  * Removed explicit casting from size_t to unsigned int.
> > v1: https://patch.msgid.link/20251115-nvme-phys-types-v1-0-c0f2e5e9163d@kernel.org
> > 
> > [...]  
> 
> Applied, thanks!
> 
> [1/2] nvme-pci: Use size_t for length fields to handle larger sizes
>       commit: 073b9bf9af463d32555c5ebaf7e28c3a44c715d0
> [2/2] types: move phys_vec definition to common header
>       commit: fcf463b92a08686d1aeb1e66674a72eb7a8bfb9b

Hi Jens,

I see this is currently on your for-7.0/blk-pvec branch, thanks for
splitting it out.  I haven't seen this merged into your for-next branch
though, which gives me some pause merging it for a dependent series
from Leon.  Is there anything blocking that merge?  Thanks,

Alex
Re: [PATCH v3 0/2] block: Generalize physical entry definition
Posted by Jens Axboe 2 weeks, 6 days ago
On 1/14/26 1:32 PM, Alex Williamson wrote:
> On Tue, 06 Jan 2026 19:10:46 -0700
> Jens Axboe <axboe@kernel.dk> wrote:
> 
>> On Wed, 17 Dec 2025 11:41:22 +0200, Leon Romanovsky wrote:
>>> Jens,
>>>
>>> I would like to ask you to put these patches on some shared branch based
>>> on v6.19-rcX tag, so I will be able to reuse this general type in VFIO
>>> and DMABUF code.
>>>
>>> --------------------------------------------------------------------------------
>>> Changelog:
>>> v3:
>>>  * Rebased on top v6.19-rc1
>>>  * Added note that memory size is not changed despite change in the
>>>    variable type.
>>> v2: https://lore.kernel.org/linux-nvme/20251117-nvme-phys-types-v2-0-c75a60a2c468@nvidia.com/
>>>  * Added Chaitanya's Reviewed-by tags.
>>>  * Removed explicit casting from size_t to unsigned int.
>>> v1: https://patch.msgid.link/20251115-nvme-phys-types-v1-0-c0f2e5e9163d@kernel.org
>>>
>>> [...]  
>>
>> Applied, thanks!
>>
>> [1/2] nvme-pci: Use size_t for length fields to handle larger sizes
>>       commit: 073b9bf9af463d32555c5ebaf7e28c3a44c715d0
>> [2/2] types: move phys_vec definition to common header
>>       commit: fcf463b92a08686d1aeb1e66674a72eb7a8bfb9b
> 
> Hi Jens,
> 
> I see this is currently on your for-7.0/blk-pvec branch, thanks for
> splitting it out.  I haven't seen this merged into your for-next branch
> though, which gives me some pause merging it for a dependent series
> from Leon.  Is there anything blocking that merge?  Thanks,

Nope, I can certainly merge it in. Did so now.

-- 
Jens Axboe
Re: [PATCH v3 0/2] block: Generalize physical entry definition
Posted by Leon Romanovsky 3 weeks ago
On Wed, Jan 14, 2026 at 01:32:41PM -0700, Alex Williamson wrote:
> On Tue, 06 Jan 2026 19:10:46 -0700
> Jens Axboe <axboe@kernel.dk> wrote:
> 
> > On Wed, 17 Dec 2025 11:41:22 +0200, Leon Romanovsky wrote:
> > > Jens,
> > > 
> > > I would like to ask you to put these patches on some shared branch based
> > > on v6.19-rcX tag, so I will be able to reuse this general type in VFIO
> > > and DMABUF code.
> > > 
> > > --------------------------------------------------------------------------------
> > > Changelog:
> > > v3:
> > >  * Rebased on top v6.19-rc1
> > >  * Added note that memory size is not changed despite change in the
> > >    variable type.
> > > v2: https://lore.kernel.org/linux-nvme/20251117-nvme-phys-types-v2-0-c75a60a2c468@nvidia.com/
> > >  * Added Chaitanya's Reviewed-by tags.
> > >  * Removed explicit casting from size_t to unsigned int.
> > > v1: https://patch.msgid.link/20251115-nvme-phys-types-v1-0-c0f2e5e9163d@kernel.org
> > > 
> > > [...]  
> > 
> > Applied, thanks!
> > 
> > [1/2] nvme-pci: Use size_t for length fields to handle larger sizes
> >       commit: 073b9bf9af463d32555c5ebaf7e28c3a44c715d0
> > [2/2] types: move phys_vec definition to common header
> >       commit: fcf463b92a08686d1aeb1e66674a72eb7a8bfb9b
> 
> Hi Jens,
> 
> I see this is currently on your for-7.0/blk-pvec branch, thanks for
> splitting it out.  I haven't seen this merged into your for-next branch
> though, which gives me some pause merging it for a dependent series
> from Leon.  Is there anything blocking that merge?  Thanks,

Jens,

Could you please merge the for-7.0/blk-pvec branch into your block/for-next
tree? The VFIO changes depend on the blk-pvec branch, and the RDMA changes
are based on the VFIO updates.

Thanks

> 
> Alex
Re: [PATCH v3 0/2] block: Generalize physical entry definition
Posted by Leon Romanovsky 1 month ago
On Wed, Dec 17, 2025 at 11:41:22AM +0200, Leon Romanovsky wrote:
> Jens,
> 
> I would like to ask you to put these patches on some shared branch based
> on v6.19-rcX tag, so I will be able to reuse this general type in VFIO
> and DMABUF code.

Jens,

Can we please progress with this simple series?

Thanks
Re: [PATCH v3 0/2] block: Generalize physical entry definition
Posted by Jens Axboe 1 month ago
On 1/4/26 8:15 AM, Leon Romanovsky wrote:
> On Wed, Dec 17, 2025 at 11:41:22AM +0200, Leon Romanovsky wrote:
>> Jens,
>>
>> I would like to ask you to put these patches on some shared branch based
>> on v6.19-rcX tag, so I will be able to reuse this general type in VFIO
>> and DMABUF code.
> 
> Jens,
> 
> Can we please progress with this simple series?

If Keith/Christoph are happy with it?

-- 
Jens Axboe
Re: [PATCH v3 0/2] block: Generalize physical entry definition
Posted by Christoph Hellwig 1 month ago
On Tue, Jan 06, 2026 at 05:46:21AM -0700, Jens Axboe wrote:
> > Can we please progress with this simple series?
> 
> If Keith/Christoph are happy with it?

Fine with me.
Re: [PATCH v3 0/2] block: Generalize physical entry definition
Posted by Keith Busch 1 month ago
On Tue, Jan 06, 2026 at 05:46:21AM -0700, Jens Axboe wrote:
> On 1/4/26 8:15 AM, Leon Romanovsky wrote:
> > On Wed, Dec 17, 2025 at 11:41:22AM +0200, Leon Romanovsky wrote:
> >> Jens,
> >>
> >> I would like to ask you to put these patches on some shared branch based
> >> on v6.19-rcX tag, so I will be able to reuse this general type in VFIO
> >> and DMABUF code.
> > 
> > Jens,
> > 
> > Can we please progress with this simple series?
> 
> If Keith/Christoph are happy with it?

Yes, I'm happy with this. Sorry for the delay, I'm still abroad and
encountered some issues when I should have been holidaying (nothing
serious, just bad luck), so it's a slow start to the year for me so far.

Acked-by: Keith Busch <kbusch@kernel.org>
Re: [PATCH v3 0/2] block: Generalize physical entry definition
Posted by Jens Axboe 1 month ago
On 1/7/26 1:29 AM, Keith Busch wrote:
> On Tue, Jan 06, 2026 at 05:46:21AM -0700, Jens Axboe wrote:
>> On 1/4/26 8:15 AM, Leon Romanovsky wrote:
>>> On Wed, Dec 17, 2025 at 11:41:22AM +0200, Leon Romanovsky wrote:
>>>> Jens,
>>>>
>>>> I would like to ask you to put these patches on some shared branch based
>>>> on v6.19-rcX tag, so I will be able to reuse this general type in VFIO
>>>> and DMABUF code.
>>>
>>> Jens,
>>>
>>> Can we please progress with this simple series?
>>
>> If Keith/Christoph are happy with it?
> 
> Yes, I'm happy with this. Sorry for the delay, I'm still abroad and
> encountered some issues when I should have been holidaying (nothing
> serious, just bad luck), so it's a slow start to the year for me so far.
> 
> Acked-by: Keith Busch <kbusch@kernel.org>

OK good, thanks for taking a look. It's all queued up since yesterday.

-- 
Jens Axboe
Re: [PATCH v3 0/2] block: Generalize physical entry definition
Posted by Jens Axboe 1 month ago
On 1/6/26 5:46 AM, Jens Axboe wrote:
> On 1/4/26 8:15 AM, Leon Romanovsky wrote:
>> On Wed, Dec 17, 2025 at 11:41:22AM +0200, Leon Romanovsky wrote:
>>> Jens,
>>>
>>> I would like to ask you to put these patches on some shared branch based
>>> on v6.19-rcX tag, so I will be able to reuse this general type in VFIO
>>> and DMABUF code.
>>
>> Jens,
>>
>> Can we please progress with this simple series?
> 
> If Keith/Christoph are happy with it?

It's here:

for-7.0/blk-pvec

now.

-- 
Jens Axboe
Re: [PATCH v3 0/2] block: Generalize physical entry definition
Posted by Leon Romanovsky 1 month ago
On Tue, Jan 06, 2026 at 07:13:41PM -0700, Jens Axboe wrote:
> On 1/6/26 5:46 AM, Jens Axboe wrote:
> > On 1/4/26 8:15 AM, Leon Romanovsky wrote:
> >> On Wed, Dec 17, 2025 at 11:41:22AM +0200, Leon Romanovsky wrote:
> >>> Jens,
> >>>
> >>> I would like to ask you to put these patches on some shared branch based
> >>> on v6.19-rcX tag, so I will be able to reuse this general type in VFIO
> >>> and DMABUF code.
> >>
> >> Jens,
> >>
> >> Can we please progress with this simple series?
> > 
> > If Keith/Christoph are happy with it?
> 
> It's here:
> 
> for-7.0/blk-pvec

Thanks a lot.

> 
> now.
> 
> -- 
> Jens Axboe
>