Skip to contentSkip to conversation

s390x: css: pong, channel subsystem test device

PATCH Superseded Pierre Morel 1 participant 2 messages Nov 28, 2019

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover s390x: css: pong, channel subsystem test device

This patch series presents a device to test the channel subsystem.

Currently it only does the following:
- answer to WRITE requests by incrementing an integer stored as string in the data of a PONG_WRITE CCW command.
- send back the same buffer, with the incremented integer when receiving a PONG_READ CCW command.
- defines a Control Unit property.

Pierre Morel (1):
s390x: css: pong, channel subsystem test device

 default-configs/s390x-softmmu.mak |   1 +
 hw/s390x/Kconfig                  |   3 +
 hw/s390x/Makefile.objs            |   1 +
 hw/s390x/ccw-pong.c               | 134 ++++++++++++++++++++++++++++++
 include/hw/s390x/pong.h           |  48 +++++++++++
 5 files changed, 187 insertions(+)
 create mode 100644 hw/s390x/ccw-pong.c
 create mode 100644 include/hw/s390x/pong.h
Signature · 9 lines
2.17.0

Changelog:
- use ccw_dstream_xxx_buf (Connie)
- adding a cu_type property
- testing the ccw.count
- conditional compiling for TEST_DEVICES (Connie, Thomas)
- suppress the device categorie (Connie ?)
- adding write callback and some funny protocol
#1 lore raw

PATCH v2 1/1 s390x: css: pong, channel subsystem test device

This is a test device for channel subsystem.
Most of the CSS instructions are handled by the common code.

The PONG_READ and PONG_WRITE CCW commands allow to test the SSCH instruction with both read and write commands.

It is also possible to define the Control Unit type with the cu_type property.
Currently only the kvm-unit-test css test uses the PONG device.

---
 default-configs/s390x-softmmu.mak |   1 +
 hw/s390x/Kconfig                  |   3 +
 hw/s390x/Makefile.objs            |   1 +
 hw/s390x/ccw-pong.c               | 134 ++++++++++++++++++++++++++++++
 include/hw/s390x/pong.h           |  48 +++++++++++
 5 files changed, 187 insertions(+)
 create mode 100644 hw/s390x/ccw-pong.c
 create mode 100644 include/hw/s390x/pong.h
default-configs/s390x-softmmu.mak +1 -0
index f2287a133f..72711912cd 100644
@@ -7,6 +7,7 @@
 #CONFIG_VFIO_CCW=n
 #CONFIG_VIRTIO_PCI=n
 #CONFIG_WDT_DIAG288=n
+#CONFIG_CCW_TESTDEV=n
 
 # Boards:
 #
hw/s390x/Kconfig +3 -0
index 5e7d8a2bae..041ede333e 100644
@@ -10,3 +10,6 @@ config S390_CCW_VIRTIO
     select SCLPCONSOLE
     select VIRTIO_CCW
     select MSI_NONBROKEN
+
+config CCW_TESTDEV
+    default y if TEST_DEVICES
hw/s390x/Makefile.objs +1 -0
index e02ed80b68..e74d0efd9d 100644
@@ -34,3 +34,4 @@ obj-$(CONFIG_KVM) += s390-stattrib-kvm.o
 obj-y += s390-ccw.o
 obj-y += ap-device.o
 obj-y += ap-bridge.o
+obj-y += ccw-pong.o
hw/s390x/ccw-pong.c new file +134 -0

134 lines not on this page · raw message

include/hw/s390x/pong.h new file +48 -0

48 lines not on this page · raw message

Signature · 1 line
2.17.0