Skip to content

vfio-ccw parent rework

Eric Farman dri-devel intel-gfx kvm linux-s390 lkml 3 versions – Applied

Status from this message: Applied to vfio next branch for v6.2. Thanks,

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest7 patches 1 replyApplied
  2. v27 patches 13 repliesSuperseded
  3. v17 patches 16 repliesSuperseded

Changes in v3 from the cover letter

- [MR] Added r-b to remaining patches (Thank you!)
- Patch 1:
[gfx checkpatch] Whitespace
[EF] Remove put_device(&parent->dev)
[MR] Fix error exit when alloc of parent fails
[MR] Check for !private on sch_probe error path
- Patch 3:
[EF] Fix error exit when alloc of private fails
- Patch 6:
[AW] Added ack (Thank you!)
- Patch 7:
[CH, AK] Added r-b (Thank you!)
[AW] Added ack (Thank you!)
v2: https://lore.kernel.org/kvm/[email protected]/
v1: https://lore.kernel.org/kvm/[email protected]/

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/7vfio/ccw: create a parent structdrivers/s390/cio/vfio_ccw_drv.c drivers/s390/cio/vfio_ccw_ops.c drivers/s390/cio/vfio_ccw_private.h+101 -250 replies
2/7vfio/ccw: remove private->schdrivers/s390/cio/vfio_ccw_chp.c drivers/s390/cio/vfio_ccw_drv.c drivers/s390/cio/vfio_ccw_fsm.c +2 more+26 -280 replies
3/7vfio/ccw: move private initialization to callbackdrivers/s390/cio/vfio_ccw_drv.c drivers/s390/cio/vfio_ccw_ops.c drivers/s390/cio/vfio_ccw_private.h+58 -660 replies
4/7vfio/ccw: move private to mdev lifecycledrivers/s390/cio/vfio_ccw_drv.c drivers/s390/cio/vfio_ccw_ops.c drivers/s390/cio/vfio_ccw_private.h+16 -280 replies
5/7vfio/ccw: remove release completiondrivers/s390/cio/vfio_ccw_ops.c drivers/s390/cio/vfio_ccw_private.h+1 -160 replies
6/7vfio/ccw: replace vfio_init_device with _alloc_drivers/s390/cio/vfio_ccw_drv.c drivers/s390/cio/vfio_ccw_ops.c drivers/s390/cio/vfio_ccw_private.h +2 more+23 -370 replies
7/7vfio: Remove vfio_free_devicedrivers/gpu/drm/i915/gvt/kvmgt.c drivers/s390/cio/vfio_ccw_ops.c drivers/s390/crypto/vfio_ap_ops.c +9 more+4 -350 replies

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchMatthew RosatoKevin TianAlex WilliamsonJason GunthorpeCornelia HuckTony Krowiak
1/7R-b
2/7R-b
3/7R-b
4/7R-b
5/7R-b R-b
6/7R-b R-b A-b
7/7R-b R-b A-b R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/7] vfio-ccw parent rework

Hi Alex,

Here's the (last?) update to the vfio-ccw lifecycle changes that I've sent recently, and were previously discussed at various points [1][2].

Patches 1-5 rework the behavior of the vfio-ccw driver's private struct. In summary, the mdev pieces are split out of vfio_ccw_private and into a new vfio_ccw_parent struct that will continue to follow today's lifecycle. The remainder (bulk) of the private struct moves to follow the mdev probe/remove pair. There's opportunity for further separation of the things in the private struct, which would simplify some of the vfio-ccw code, but it got too hairy as I started that. Once vfio-ccw is no longer considered unique, those cleanups can happen at our leisure.

Patch 6 removes the trickery where vfio-ccw uses vfio_init_device instead of vfio_alloc_device, and thus removes vfio_init_device from the outside world.

Patch 7 removes vfio_free_device from vfio-ccw and the other drivers (hello, CC list!), letting it be handled by vfio_device_release directly.

I believe this covers everything in this space; let me know if not!

Thanks,
Eric

[1] https://lore.kernel.org/kvm/[email protected]/
[2] https://lore.kernel.org/kvm/[email protected]/

v2->v3:
- [MR] Added r-b to remaining patches (Thank you!)
- Patch 1:
[gfx checkpatch] Whitespace
[EF] Remove put_device(&parent->dev)
[MR] Fix error exit when alloc of parent fails
[MR] Check for !private on sch_probe error path
- Patch 3:
[EF] Fix error exit when alloc of private fails
- Patch 6:
[AW] Added ack (Thank you!)
- Patch 7:
[CH, AK] Added r-b (Thank you!)
[AW] Added ack (Thank you!)
v2: https://lore.kernel.org/kvm/[email protected]/
v1: https://lore.kernel.org/kvm/[email protected]/

Eric Farman (7):
vfio/ccw: create a parent struct vfio/ccw: remove private->sch
vfio/ccw: move private initialization to callback vfio/ccw: move private to mdev lifecycle vfio/ccw: remove release completion vfio/ccw: replace vfio_init_device with _alloc_
vfio: Remove vfio_free_device

 drivers/gpu/drm/i915/gvt/kvmgt.c      |   1 -
 drivers/s390/cio/vfio_ccw_chp.c       |   5 +-
 drivers/s390/cio/vfio_ccw_drv.c       | 173 +++++++++++---------------
 drivers/s390/cio/vfio_ccw_fsm.c       |  27 ++--
 drivers/s390/cio/vfio_ccw_ops.c       | 107 +++++++++++-----
 drivers/s390/cio/vfio_ccw_private.h   |  37 ++++--
 drivers/s390/crypto/vfio_ap_ops.c     |   6 -
 drivers/vfio/fsl-mc/vfio_fsl_mc.c     |   1 -
 drivers/vfio/pci/vfio_pci_core.c      |   1 -
 drivers/vfio/platform/vfio_amba.c     |   1 -
 drivers/vfio/platform/vfio_platform.c |   1 -
 drivers/vfio/vfio_main.c              |  32 ++---
 include/linux/vfio.h                  |   3 -
 samples/vfio-mdev/mbochs.c            |   1 -
 samples/vfio-mdev/mdpy.c              |   1 -
 samples/vfio-mdev/mtty.c              |   1 -
 16 files changed, 196 insertions(+), 202 deletions(-)
Signature · 1 line
2.34.1