Hello,

Here's an initial throw at adding hypercall support to qtest.
This aims at making s390 virtio (and soon virtio-ccw) easily testable
during refactorings such as Fréderic's.
Depending on progress it might also be a route to add qtest support for the
individual virtio devices while waiting for a PCI libqos. :-)

qtest.c is being compiled once, so it cannot contain target-specific code.
I therefore add stubs qtest_hypercall_supported() and qtest_hypercall().
s390x then overrides them indicating support and implementing it. A dummy
test case is appending for verification that things compile and work so far.

One bug fix was already posted based on this testing; series is based on it.

I have not yet investigated what changes may need to be applied to the API
to make this work for sPAPR as well. Looking forward to feedback.

Regards,
Andreas

Cc: Anthony Liguori <anth...@codemonkey.ws>
Cc: Blue Swirl <blauwir...@gmail.com>
Cc: Alexander Graf <ag...@suse.de>
Cc: Bruce Rogers <brog...@suse.com>
Cc: Christian Borntraeger <borntrae...@de.ibm.com>
Cc: Cornelia Huck <cornelia.h...@de.ibm.com>
Cc: qemu-ppc <qemu-...@nongnu.org>
Cc: Benjamin Herrenschmidt <b...@kernel.crashing.org>
Cc: David Gibson <da...@gibson.dropbear.id.au>

Andreas Färber (3):
  qtest: Prepare hypercall support
  target-s390x: Prepare qtest hypercall support
  qtest: Add virtio-ccw test case

 hw/s390x/s390-virtio-hcall.c |   17 +++++++++++++++++
 include/sysemu/qtest.h       |    2 ++
 qtest.c                      |   26 ++++++++++++++++++++++++++
 stubs/Makefile.objs          |    1 +
 stubs/qtest.c                |   12 ++++++++++++
 tests/Makefile               |    2 ++
 tests/libqtest.c             |   21 +++++++++++++++++++++
 tests/libqtest.h             |   17 +++++++++++++++++
 tests/virtio-ccw-test.c      |   38 ++++++++++++++++++++++++++++++++++++++
 9 Dateien geändert, 136 Zeilen hinzugefügt(+)
 create mode 100644 stubs/qtest.c
 create mode 100644 tests/virtio-ccw-test.c

-- 
1.7.10.4


Reply via email to