[PATCH v3 5/6] vfio: ccw: Documenting state transitions

From: Pierre Morel
Date: Wed Nov 28 2018 - 07:41:24 EST


Let's document the state transitions.

Signed-off-by: Pierre Morel <pmorel@xxxxxxxxxxxxx>
---
Documentation/s390/vfio-ccw.txt | 45 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)

diff --git a/Documentation/s390/vfio-ccw.txt b/Documentation/s390/vfio-ccw.txt
index 2be11ad..0a1a19f 100644
--- a/Documentation/s390/vfio-ccw.txt
+++ b/Documentation/s390/vfio-ccw.txt
@@ -263,6 +263,51 @@ Q6. Get the signal and event handler reads out the result from the I/O
region.
Q7. Update the irb for the guest.

+
+States transitions
+------------------
+
+The CCW VFIO driver maintain a device states to determine the response
+- to external events like interruptions, data send, halt and clear
+ from sub-channels.
+- to configuration events, device binding, mdev creation, VM start/stop.
+- to other events like errors or reset of the VM
+
+The event and states are summed up in the diagramme below:
+
+ bind() unbind()
+ | ^
+ v |
+ -------------
+ | NOT_OPER |<---- error
+ ------------- |
+ | ^ |
+ create() remove() |
+ v | |
+ ------------- |
+ | STANDBY |<--- release()
+ ------------- |
+ | ^ |
+ open() release() |
+ v | |
+ ------------- |
+ -->| IDLE |<--- reset
+ | ------------- |
+ | | ^ |
+ | write() err |
+ | v | |
+ | ------------- |
+ | | BOXED | |
+ | ------------- |
+ | | |
+ irq success |
+ | v |
+ | ------------- |
+ ---| BUSY |>----
+ -------------
+
+
+
Limitations
-----------

--
2.7.4