All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/8] improve error handling for IO instr
@ 2017-10-04 15:41 Halil Pasic
  2017-10-04 15:41 ` [Qemu-devel] [PATCH v2 1/8] s390x/css: be more consistent if broken beyond repair Halil Pasic
                   ` (7 more replies)
  0 siblings, 8 replies; 41+ messages in thread
From: Halil Pasic @ 2017-10-04 15:41 UTC (permalink / raw)
  To: Cornelia Huck, Dong Jia Shi
  Cc: Thomas Huth, Pierre Morel, qemu-devel, Halil Pasic

This is the v2 of my infamous nameless series (archive link:
https://lists.gnu.org/archive/html/qemu-devel/2017-08/msg06076.html).

Abstract
=======

The basic idea is: tell how to handle an unusual condition where it's
identified, instead of mapping it to an errno (more or less arbitrarily),
then possibly mapping these errnos around, to finally (mentally) map the
errno back to the condition and take appropriate action.

According to Dong Jia the patch-set also has a functional value: for ccw
pass-through, he is planing to pass-through the instruction completion
information (cc or interruption condition) from the kernel, and this
patch set can pretty much be seen as a preparation for that.

Changelog
=========

There was a fair amount of discussion regarding during the review of v1.
For certain issues we have decided to address them differently (e.g. use
unit-exception for VFIO if extra constraints are not respected, get rid
of the addressing check, assert if do_subchannel_work called without
improperly) and for some we decided to not address them for now (e.g.
use if callbacks are null).

Although this was not part of the v1 discussion, I have also decided to
go back to return values (opposed to adding new state to SubchDev). There
are multiple reasons for doing so: 
* Most of, but not all IO instructions
operate on a subchannel, thus having the instruction ending control in
SubchDev is a bit weird. 
* Get both the compiler and the good habits on ours side (e.g. non-void
control reaches end of non-void function warning (-Wreturn-type), no
overwrites possible, instead of having to check a certain member of a
certain struct after a function call just don't ignore return values).

v1 -> v2:
* use assert if do_subchannel_work without any functions being
  accepted 
* generate unit-exception if ccw-vfio can't handle an otherwise
  good channel program (due to extra limitations) 
* keep using return values opposed to recording into SubchDev
* split out 'add infrastructure' from 'refactor first handler'
* reworded some commit messanges and comments
* rebased on top of current master
* dropped r-b's and acks because of the magnitude of the
  changes

Testing
=======

Regarding vfio-ccw Dong Jia did some quick testing with an equivalent
version. Regarding virtual ccw I did only some rudimentary testing.
Should the series be deemed promising more testing would make
sense.

Halil Pasic (8):
  s390x/css: be more consistent if broken beyond repair
  s390x/css: IO instr handler ending control
  s390x: improve error handling for SSCH and RSCH
  s390x: refactor error handling for XSCH handler
  s390x: refactor error handling for CSCH handler
  s390x: refactor error handling for HSCH handler
  s390x: refactor error handling for MSCH handler
  s390x: factor out common ioinst handler logic

 hw/s390x/css.c              | 162 ++++++++++++------------------------------
 hw/s390x/s390-ccw.c         |  11 ++-
 hw/vfio/ccw.c               |  30 ++++++--
 include/hw/s390x/css.h      |  44 +++++++++---
 include/hw/s390x/s390-ccw.h |   2 +-
 target/s390x/ioinst.c       | 169 +++++++-------------------------------------
 6 files changed, 131 insertions(+), 287 deletions(-)

-- 
2.13.5

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

end of thread, other threads:[~2017-10-17 13:04 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-04 15:41 [Qemu-devel] [PATCH v2 0/8] improve error handling for IO instr Halil Pasic
2017-10-04 15:41 ` [Qemu-devel] [PATCH v2 1/8] s390x/css: be more consistent if broken beyond repair Halil Pasic
2017-10-09  7:49   ` Dong Jia Shi
2017-10-10 13:25   ` Cornelia Huck
2017-10-10 14:39     ` Halil Pasic
2017-10-04 15:41 ` [Qemu-devel] [PATCH v2 2/8] s390x/css: IO instr handler ending control Halil Pasic
2017-10-09  8:20   ` Thomas Huth
2017-10-09 10:54     ` Halil Pasic
2017-10-09 11:07       ` Thomas Huth
2017-10-09 15:00         ` Halil Pasic
2017-10-10 10:28           ` Thomas Huth
2017-10-10 11:39             ` Cornelia Huck
2017-10-10 11:48               ` Halil Pasic
2017-10-10 11:41             ` Halil Pasic
2017-10-12  6:58               ` Thomas Huth
2017-10-12 11:44                 ` Halil Pasic
2017-10-17 11:10                   ` Halil Pasic
2017-10-17 11:28                     ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2017-10-17 12:13                       ` Cornelia Huck
2017-10-17 13:03                         ` Halil Pasic
2017-10-09 11:09       ` [Qemu-devel] " Cornelia Huck
2017-10-09 15:19         ` Halil Pasic
2017-10-04 15:41 ` [Qemu-devel] [PATCH v2 3/8] s390x: improve error handling for SSCH and RSCH Halil Pasic
2017-10-10  8:13   ` Dong Jia Shi
2017-10-10 10:06     ` Halil Pasic
2017-10-11  3:53       ` Dong Jia Shi
2017-10-10 13:07   ` Cornelia Huck
2017-10-10 14:36     ` Halil Pasic
2017-10-12 12:06       ` Halil Pasic
2017-10-12 12:11         ` Cornelia Huck
2017-10-12 12:17           ` Halil Pasic
2017-10-11  3:47   ` Dong Jia Shi
2017-10-11 10:54     ` Halil Pasic
2017-10-12  5:44       ` Dong Jia Shi
2017-10-04 15:41 ` [Qemu-devel] [PATCH v2 4/8] s390x: refactor error handling for XSCH handler Halil Pasic
2017-10-04 15:41 ` [Qemu-devel] [PATCH v2 5/8] s390x: refactor error handling for CSCH handler Halil Pasic
2017-10-04 15:41 ` [Qemu-devel] [PATCH v2 6/8] s390x: refactor error handling for HSCH handler Halil Pasic
2017-10-04 15:41 ` [Qemu-devel] [PATCH v2 7/8] s390x: refactor error handling for MSCH handler Halil Pasic
2017-10-04 15:41 ` [Qemu-devel] [PATCH v2 8/8] s390x: factor out common ioinst handler logic Halil Pasic
2017-10-10 13:10   ` Cornelia Huck
2017-10-10 14:37     ` Halil Pasic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.