qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v4 0/6] vfio-ccw: support hsch/csch (kernel part)
@ 2019-03-01  9:38 Cornelia Huck
  2019-03-01  9:38 ` [Qemu-devel] [PATCH v4 1/6] vfio-ccw: make it safe to access channel programs Cornelia Huck
                   ` (8 more replies)
  0 siblings, 9 replies; 46+ messages in thread
From: Cornelia Huck @ 2019-03-01  9:38 UTC (permalink / raw)
  To: Halil Pasic, Eric Farman, Farhan Ali, Pierre Morel
  Cc: linux-s390, kvm, qemu-devel, qemu-s390x, Alex Williamson,
	Cornelia Huck

[This is the Linux kernel part, git tree is available at
https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw.git vfio-ccw-eagain-caps-v3

The companion QEMU patches are available at
https://github.com/cohuck/qemu vfio-ccw-caps]

Currently, vfio-ccw only relays START SUBCHANNEL requests to the real
device. This tends to work well for the most common 'good path' scenarios;
however, as we emulate {HALT,CLEAR} SUBCHANNEL in QEMU, things like
clearing pending requests at the device is currently not supported.
This may be a problem for e.g. error recovery.

This patch series introduces capabilities (similar to what vfio-pci uses)
and exposes a new async region for handling hsch/csch.

Lightly tested (I can interact with a dasd as before, and reserve/release
seems to work well.) Not sure if there is a better way to test this, ideas
welcome.

Changes v3->v4:
- shrunk the capability offset, we don't need to accommodate as much as pci
- make checks in patch 1 more consistent and less buggy
- rebased on top of my current vfio-ccw branch

Changes v2->v3:
- Unb0rked patch 1, improved scope
- Split out the new mutex from patch 2 into new patch 3; added missing
  locking and hopefully improved description
- Patch 2 now reworks the state handling by splitting the BUSY state
  into CP_PROCESSING and CP_PENDING
- Patches 3 and 5 adapted on top of the reworked patches; hsch/csch
  are allowed in CP_PENDING, but not in CP_PROCESSING (did not add
  any R-b due to that)
- Added missing free in patch 5
- Probably some small changes I forgot to note down

Changes v1->v2:
- New patch 1: make it safe to use the cp accessors at any time; this
  should avoid problems with unsolicited interrupt handling
- New patch 2: handle concurrent accesses to the io region; the idea is
  to return -EAGAIN to userspace more often (so it can simply retry)
- also handle concurrent accesses to the async io region
- change VFIO_REGION_TYPE_CCW
- merge events for halt and clear to a single async event; this turned out
  to make the code quite a bit simpler
- probably some small changes I forgot to note down

Cornelia Huck (6):
  vfio-ccw: make it safe to access channel programs
  vfio-ccw: rework ssch state handling
  vfio-ccw: protect the I/O region
  vfio-ccw: add capabilities chain
  s390/cio: export hsch to modules
  vfio-ccw: add handling for async channel instructions

 drivers/s390/cio/Makefile           |   3 +-
 drivers/s390/cio/ioasm.c            |   1 +
 drivers/s390/cio/vfio_ccw_async.c   |  88 ++++++++++++
 drivers/s390/cio/vfio_ccw_cp.c      |  21 ++-
 drivers/s390/cio/vfio_ccw_cp.h      |   2 +
 drivers/s390/cio/vfio_ccw_drv.c     |  57 ++++++--
 drivers/s390/cio/vfio_ccw_fsm.c     | 143 +++++++++++++++++-
 drivers/s390/cio/vfio_ccw_ops.c     | 215 +++++++++++++++++++++++-----
 drivers/s390/cio/vfio_ccw_private.h |  48 ++++++-
 include/uapi/linux/vfio.h           |   4 +
 include/uapi/linux/vfio_ccw.h       |  12 ++
 11 files changed, 537 insertions(+), 57 deletions(-)
 create mode 100644 drivers/s390/cio/vfio_ccw_async.c

-- 
2.17.2

^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2019-04-15 16:45 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-01  9:38 [Qemu-devel] [PATCH v4 0/6] vfio-ccw: support hsch/csch (kernel part) Cornelia Huck
2019-03-01  9:38 ` [Qemu-devel] [PATCH v4 1/6] vfio-ccw: make it safe to access channel programs Cornelia Huck
2019-04-08 17:02   ` Farhan Ali
2019-04-08 17:02     ` Farhan Ali
2019-04-08 17:07     ` Cornelia Huck
2019-04-08 17:07       ` Cornelia Huck
2019-04-08 17:19       ` Farhan Ali
2019-04-08 17:19         ` Farhan Ali
2019-04-08 20:25       ` Eric Farman
2019-04-08 20:25         ` Eric Farman
2019-04-09 23:34       ` Halil Pasic
2019-04-09 23:34         ` Halil Pasic
2019-04-11  2:59         ` Eric Farman
2019-04-11  2:59           ` Eric Farman
2019-04-11 15:58           ` [Qemu-devel] [qemu-s390x] " Halil Pasic
2019-04-11 15:58             ` Halil Pasic
2019-04-11 16:25             ` Eric Farman
2019-04-11 16:25               ` Eric Farman
2019-04-11 16:36               ` Cornelia Huck
2019-04-11 16:36                 ` Cornelia Huck
2019-04-11 18:07                 ` Halil Pasic
2019-04-11 18:07                   ` Halil Pasic
2019-04-11 21:27           ` [Qemu-devel] " Eric Farman
2019-04-11 21:27             ` Eric Farman
2019-04-12  8:14             ` Cornelia Huck
2019-04-12  8:14               ` Cornelia Huck
2019-03-01  9:38 ` [Qemu-devel] [PATCH v4 2/6] vfio-ccw: rework ssch state handling Cornelia Huck
2019-03-08 22:18   ` Eric Farman
2019-03-11  9:47     ` Cornelia Huck
2019-03-01  9:38 ` [Qemu-devel] [PATCH v4 3/6] vfio-ccw: protect the I/O region Cornelia Huck
2019-03-01  9:39 ` [Qemu-devel] [PATCH v4 4/6] vfio-ccw: add capabilities chain Cornelia Huck
2019-04-15 14:40   ` Eric Farman
2019-04-15 14:40     ` Eric Farman
2019-04-15 15:24   ` Farhan Ali
2019-04-15 15:24     ` Farhan Ali
2019-03-01  9:39 ` [Qemu-devel] [PATCH v4 5/6] s390/cio: export hsch to modules Cornelia Huck
2019-03-01  9:39 ` [Qemu-devel] [PATCH v4 6/6] vfio-ccw: add handling for async channel instructions Cornelia Huck
2019-04-15 14:56   ` Eric Farman
2019-04-15 14:56     ` Eric Farman
2019-04-15 15:25   ` Farhan Ali
2019-04-15 15:25     ` Farhan Ali
2019-03-07 21:28 ` [Qemu-devel] [PATCH v4 0/6] vfio-ccw: support hsch/csch (kernel part) Eric Farman
2019-04-15 11:51 ` Cornelia Huck
2019-04-15 11:51   ` Cornelia Huck
2019-04-15 16:43 ` Cornelia Huck
2019-04-15 16:43   ` Cornelia Huck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).