[PULL 00/12] vfio queue

Cédric Le Goater posted 12 patches 3 weeks, 2 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20251022121846.874152-1-clg@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, John Levon <john.levon@nutanix.com>, Thanos Makatos <thanos.makatos@nutanix.com>, "Cédric Le Goater" <clg@redhat.com>, Eric Farman <farman@linux.ibm.com>, Matthew Rosato <mjrosato@linux.ibm.com>, Thomas Huth <thuth@redhat.com>, Alex Williamson <alex@shazbot.org>, Steve Sistare <steven.sistare@oracle.com>
There is a newer version of this series
MAINTAINERS                             |  4 ++--
docs/system/devices/vfio-user.rst       |  2 +-
include/hw/vfio/vfio-container-legacy.h |  1 +
include/hw/vfio/vfio-cpr.h              |  2 +-
include/hw/vfio/vfio-device.h           |  2 +-
accel/kvm/kvm-all.c                     |  3 ++-
hw/vfio-user/device.c                   |  2 +-
hw/vfio/ccw.c                           |  4 ++--
hw/vfio/container-legacy.c              | 38 ++++++++++++++++++--------------
hw/vfio/cpr-legacy.c                    | 22 +++++++++++++------
hw/vfio/device.c                        | 39 +++++++++++++++++++++------------
hw/vfio/iommufd.c                       | 26 ++++++----------------
hw/vfio/listener.c                      |  5 +++--
hw/vfio/pci.c                           |  4 ++--
.mailmap                                |  1 +
15 files changed, 86 insertions(+), 69 deletions(-)
[PULL 00/12] vfio queue
Posted by Cédric Le Goater 3 weeks, 2 days ago
The following changes since commit 3c0b42c68f98fb276fa248012642be8cbf2cab70:

  Merge tag 'pull-request-2025-10-21' of https://gitlab.com/thuth/qemu into staging (2025-10-21 08:59:35 -0500)

are available in the Git repository at:

  https://github.com/legoater/qemu/ tags/pull-vfio-20251022

for you to fetch changes up to ecbe424a63c9f860a901d6a4a75724b046abd796:

  vfio: only check region info cache for initial regions (2025-10-22 08:12:52 +0200)

----------------------------------------------------------------
vfio queue:

* Fix CPR transfer
* Add support for VFIO_DMA_UNMAP_FLAG_ALL
* Fix vfio-user documentation
* Update Alex Williamson's email address
* Fix for vfio-region cache for the vGPU use case

----------------------------------------------------------------
Alex Williamson (1):
      MAINTAINERS: Update Alex Williamson's email address

John Levon (3):
      docs/system/devices/vfio-user: fix formatting
      vfio: rename field to "num_initial_regions"
      vfio: only check region info cache for initial regions

Zhenzhong Duan (8):
      vfio/container: Remap only populated parts in a section
      vfio/cpr-legacy: drop an erroneous assert
      vfio/iommufd: Set cpr.ioas_id on source side for CPR transfer
      vfio/iommufd: Restore vbasedev's reference to hwpt after CPR transfer
      accel/kvm: Fix an erroneous check on coalesced_mmio_ring
      vfio/container: Support unmap all in one ioctl()
      vfio/iommufd: Support unmap all in one ioctl()
      vfio/listener: Add an assertion for unmap_all

 MAINTAINERS                             |  4 ++--
 docs/system/devices/vfio-user.rst       |  2 +-
 include/hw/vfio/vfio-container-legacy.h |  1 +
 include/hw/vfio/vfio-cpr.h              |  2 +-
 include/hw/vfio/vfio-device.h           |  2 +-
 accel/kvm/kvm-all.c                     |  3 ++-
 hw/vfio-user/device.c                   |  2 +-
 hw/vfio/ccw.c                           |  4 ++--
 hw/vfio/container-legacy.c              | 38 ++++++++++++++++++--------------
 hw/vfio/cpr-legacy.c                    | 22 +++++++++++++------
 hw/vfio/device.c                        | 39 +++++++++++++++++++++------------
 hw/vfio/iommufd.c                       | 26 ++++++----------------
 hw/vfio/listener.c                      |  5 +++--
 hw/vfio/pci.c                           |  4 ++--
 .mailmap                                |  1 +
 15 files changed, 86 insertions(+), 69 deletions(-)
Re: [PULL 00/12] vfio queue
Posted by Cédric Le Goater 3 weeks, 2 days ago
Michael,

On 10/22/25 14:18, Cédric Le Goater wrote:
> The following changes since commit 3c0b42c68f98fb276fa248012642be8cbf2cab70:
> 
>    Merge tag 'pull-request-2025-10-21' of https://gitlab.com/thuth/qemu into staging (2025-10-21 08:59:35 -0500)
> 
> are available in the Git repository at:
> 
>    https://github.com/legoater/qemu/ tags/pull-vfio-20251022
> 
> for you to fetch changes up to ecbe424a63c9f860a901d6a4a75724b046abd796:
> 
>    vfio: only check region info cache for initial regions (2025-10-22 08:12:52 +0200)
> 
> ----------------------------------------------------------------
> vfio queue:
> 
> * Fix CPR transfer
> * Add support for VFIO_DMA_UNMAP_FLAG_ALL
> * Fix vfio-user documentation
> * Update Alex Williamson's email address
> * Fix for vfio-region cache for the vGPU use case
> 
> ----------------------------------------------------------------
> Alex Williamson (1):
>        MAINTAINERS: Update Alex Williamson's email address
> 
> John Levon (3):
>        docs/system/devices/vfio-user: fix formatting
>        vfio: rename field to "num_initial_regions"
>        vfio: only check region info cache for initial regions
> 
> Zhenzhong Duan (8):
>        vfio/container: Remap only populated parts in a section
>        vfio/cpr-legacy: drop an erroneous assert
>        vfio/iommufd: Set cpr.ioas_id on source side for CPR transfer
>        vfio/iommufd: Restore vbasedev's reference to hwpt after CPR transfer
>        accel/kvm: Fix an erroneous check on coalesced_mmio_ring
>        vfio/container: Support unmap all in one ioctl()
>        vfio/iommufd: Support unmap all in one ioctl()
>        vfio/listener: Add an assertion for unmap_all
> 
>   MAINTAINERS                             |  4 ++--
>   docs/system/devices/vfio-user.rst       |  2 +-
>   include/hw/vfio/vfio-container-legacy.h |  1 +
>   include/hw/vfio/vfio-cpr.h              |  2 +-
>   include/hw/vfio/vfio-device.h           |  2 +-
>   accel/kvm/kvm-all.c                     |  3 ++-
>   hw/vfio-user/device.c                   |  2 +-
>   hw/vfio/ccw.c                           |  4 ++--
>   hw/vfio/container-legacy.c              | 38 ++++++++++++++++++--------------
>   hw/vfio/cpr-legacy.c                    | 22 +++++++++++++------
>   hw/vfio/device.c                        | 39 +++++++++++++++++++++------------
>   hw/vfio/iommufd.c                       | 26 ++++++----------------
>   hw/vfio/listener.c                      |  5 +++--
>   hw/vfio/pci.c                           |  4 ++--
>   .mailmap                                |  1 +
>   15 files changed, 86 insertions(+), 69 deletions(-)


Patch 11-12 are candidates for the stable-10.1 and patch "vfio: rename
field to "num_initial_regions" needs to be extended.

See https://github.com/legoater/qemu/commits/staging-10.1-vfio/

Thanks,

C.




Re: [PULL 00/12] vfio queue
Posted by Michael Tokarev 3 weeks, 1 day ago
On 10/22/25 15:55, Cédric Le Goater wrote:
> Michael,
> 
> On 10/22/25 14:18, Cédric Le Goater wrote:
>> The following changes since commit 
>> 3c0b42c68f98fb276fa248012642be8cbf2cab70:
>>
>>    Merge tag 'pull-request-2025-10-21' of https://gitlab.com/thuth/ 
>> qemu into staging (2025-10-21 08:59:35 -0500)
>>
>> are available in the Git repository at:
>>
>>    https://github.com/legoater/qemu/ tags/pull-vfio-20251022
>>
>> for you to fetch changes up to ecbe424a63c9f860a901d6a4a75724b046abd796:
>>
>>    vfio: only check region info cache for initial regions (2025-10-22 
>> 08:12:52 +0200)
>>
>> ----------------------------------------------------------------
>> vfio queue:
>>
>> * Fix CPR transfer
>> * Add support for VFIO_DMA_UNMAP_FLAG_ALL
>> * Fix vfio-user documentation
>> * Update Alex Williamson's email address
>> * Fix for vfio-region cache for the vGPU use case
>>
>> ----------------------------------------------------------------
>> Alex Williamson (1):
>>        MAINTAINERS: Update Alex Williamson's email address
>>
>> John Levon (3):
>>        docs/system/devices/vfio-user: fix formatting
>>        vfio: rename field to "num_initial_regions"
>>        vfio: only check region info cache for initial regions
>>
>> Zhenzhong Duan (8):
>>        vfio/container: Remap only populated parts in a section
>>        vfio/cpr-legacy: drop an erroneous assert
>>        vfio/iommufd: Set cpr.ioas_id on source side for CPR transfer
>>        vfio/iommufd: Restore vbasedev's reference to hwpt after CPR 
>> transfer
>>        accel/kvm: Fix an erroneous check on coalesced_mmio_ring
>>        vfio/container: Support unmap all in one ioctl()
>>        vfio/iommufd: Support unmap all in one ioctl()
>>        vfio/listener: Add an assertion for unmap_all
..

> Patch 11-12 are candidates for the stable-10.1 and patch "vfio: rename
> field to "num_initial_regions" needs to be extended.
> 
> See https://github.com/legoater/qemu/commits/staging-10.1-vfio/

Thank you very much Cédric for this work!
I picked the 2 patches prepared by you, to staging-10.1 branch.
It's a nice thing - vfio/platform &Co has been removed in current
master branch, but it is still exist in 10.1 and earlier.

BTW, this pull request contains a number of fixes by Zhenzhong Duan
which seems to be fixes too, - shouldn't these be picked up to
the stable series as well?

Thank you!

/mjt

Re: [PULL 00/12] vfio queue
Posted by Cédric Le Goater 3 weeks, 1 day ago
On 10/23/25 11:53, Michael Tokarev wrote:
> On 10/22/25 15:55, Cédric Le Goater wrote:
>> Michael,
>>
>> On 10/22/25 14:18, Cédric Le Goater wrote:
>>> The following changes since commit 3c0b42c68f98fb276fa248012642be8cbf2cab70:
>>>
>>>    Merge tag 'pull-request-2025-10-21' of https://gitlab.com/thuth/ qemu into staging (2025-10-21 08:59:35 -0500)
>>>
>>> are available in the Git repository at:
>>>
>>>    https://github.com/legoater/qemu/ tags/pull-vfio-20251022
>>>
>>> for you to fetch changes up to ecbe424a63c9f860a901d6a4a75724b046abd796:
>>>
>>>    vfio: only check region info cache for initial regions (2025-10-22 08:12:52 +0200)
>>>
>>> ----------------------------------------------------------------
>>> vfio queue:
>>>
>>> * Fix CPR transfer
>>> * Add support for VFIO_DMA_UNMAP_FLAG_ALL
>>> * Fix vfio-user documentation
>>> * Update Alex Williamson's email address
>>> * Fix for vfio-region cache for the vGPU use case
>>>
>>> ----------------------------------------------------------------
>>> Alex Williamson (1):
>>>        MAINTAINERS: Update Alex Williamson's email address
>>>
>>> John Levon (3):
>>>        docs/system/devices/vfio-user: fix formatting
>>>        vfio: rename field to "num_initial_regions"
>>>        vfio: only check region info cache for initial regions
>>>
>>> Zhenzhong Duan (8):
>>>        vfio/container: Remap only populated parts in a section
>>>        vfio/cpr-legacy: drop an erroneous assert
>>>        vfio/iommufd: Set cpr.ioas_id on source side for CPR transfer
>>>        vfio/iommufd: Restore vbasedev's reference to hwpt after CPR transfer
>>>        accel/kvm: Fix an erroneous check on coalesced_mmio_ring
>>>        vfio/container: Support unmap all in one ioctl()
>>>        vfio/iommufd: Support unmap all in one ioctl()
>>>        vfio/listener: Add an assertion for unmap_all
> ..
> 
>> Patch 11-12 are candidates for the stable-10.1 and patch "vfio: rename
>> field to "num_initial_regions" needs to be extended.
>>
>> See https://github.com/legoater/qemu/commits/staging-10.1-vfio/
> 
> Thank you very much Cédric for this work!
> I picked the 2 patches prepared by you, to staging-10.1 branch.
> It's a nice thing - vfio/platform &Co has been removed in current
> master branch, but it is still exist in 10.1 and earlier.
> 
> BTW, this pull request contains a number of fixes by Zhenzhong Duan
> which seems to be fixes too, - shouldn't these be picked up to
> the stable series as well?
The CPR related fixes are worth considering :

   vfio/iommufd: Restore vbasedev's reference to hwpt after CPR transfer
   vfio/iommufd: Set cpr.ioas_id on source side for CPR transfer
   vfio/cpr-legacy: drop an erroneous assert
   vfio/container: Remap only populated parts in a section

CPR is cutting-edge techno, so these fixes shouldn't have much impact
on our users at this time. Feel free to drop if the backport is too
complex. I haven't tried.

Thanks,

C.




Re: [PULL 00/12] vfio queue
Posted by Richard Henderson 3 weeks, 2 days ago
On 10/22/25 07:18, Cédric Le Goater wrote:
> The following changes since commit 3c0b42c68f98fb276fa248012642be8cbf2cab70:
> 
>    Merge tag 'pull-request-2025-10-21' ofhttps://gitlab.com/thuth/qemu into staging (2025-10-21 08:59:35 -0500)
> 
> are available in the Git repository at:
> 
>    https://github.com/legoater/qemu/ tags/pull-vfio-20251022
> 
> for you to fetch changes up to ecbe424a63c9f860a901d6a4a75724b046abd796:
> 
>    vfio: only check region info cache for initial regions (2025-10-22 08:12:52 +0200)
> 
> ----------------------------------------------------------------
> vfio queue:
> 
> * Fix CPR transfer
> * Add support for VFIO_DMA_UNMAP_FLAG_ALL
> * Fix vfio-user documentation
> * Update Alex Williamson's email address
> * Fix for vfio-region cache for the vGPU use case

Applied, thanks.  Please update https://wiki.qemu.org/ChangeLog/10.2 as appropriate.

r~