Skip to contentSkip to conversation

RFC: VFIO CCW cleanup

PATCH Pierre Morel 1 participant 1 message Oct 17, 2018 1 message not in the archive s390

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 11 lines · Cornelia Huck
Quoted 6 lines · On Wed, 17 Oct 2018 11:18:38 +0200 Pierre Morel <[email protected]> wrote:

Hi Connie, and all,

I come back on the consolidation of the VFIO CCW driver, this time by making smaller steps.
Here a first proposal, as RFC, therefore I only CC to the linux-s390 list.

I'll not get around to looking at it in detail until after KVM Forum,

of course. :)

Quoted 10 lines

but...

Quoted 5 lines

The first patch of this serie is essentially cosmetic to clarify the code.

The second patch is a bug correction.

...this looks small enough to queue right now. It makes sense standalone AFAICS.

Yes, I think it does.
So I make a v1 with only these two patches.

Thanks for the comments

Pierre

Quoted 32 lines
Quoted 31 lines

The last three patches clarify the linux device state changes.

Currently the VFIO CCW driver may be used while it is not completely initialized or not dedicated to a guest.
- Let's consolidate this by moving state change and initialization inside the mediated device open callback.
- quiesce the device when the mediated device is released.
- refuse to remove a mediated device when it is in use.
- do not change the linux state on subchannel events.

Regards,

Pierre

Pierre Morel (5):
vfio: ccw: Merge BUSY and BOXED states
vfio: ccw: Register mediated device once all structures are
initialized
vfio: ccw: Set subchannel state STANDBY on open
vfio: ccw: Refactoring state changes
vfio: ccw: Do not change the mediated device state on sch events

  drivers/s390/cio/vfio_ccw_drv.c     | 38 ++++++++++++++++-------------------
  drivers/s390/cio/vfio_ccw_fsm.c     |  7 +------
  drivers/s390/cio/vfio_ccw_ops.c     | 40 +++++++++++++++++++++++++++----------
  drivers/s390/cio/vfio_ccw_private.h |  1 -
  4 files changed, 47 insertions(+), 39 deletions(-)
Signature · 2 lines
Pierre Morel
Linux/KVM/QEMU in B�blingen - Germany