diff --git a/tests/qemu-iotests/051.s390-virtio.out
b/tests/qemu-iotests/051.s390-virtio.out
new file mode 100644
index 0000000..751670f
--- /dev/null
+++ b/tests/qemu-iotests/051.s390-virtio.out
@@ -0,0 +1,377 @@
+QA output created by 051
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
backing_file='TEST_DIR/t.IMGFMT.base'
+
+=== Unknown option ===
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=:
could not open disk image TEST_DIR/t.qcow2: Block format 'qcow2' used
by device 'virtio0' doesn't support the option 'unknown_opt'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on:
could not open disk image TEST_DIR/t.qcow2: Block format 'qcow2' used
by device 'virtio0' doesn't support the option 'unknown_opt'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234: could not open
disk image TEST_DIR/t.qcow2: Block format 'qcow2' used by device
'virtio0' doesn't support the option 'unknown_opt'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo: could not open
disk image TEST_DIR/t.qcow2: Block format 'qcow2' used by device
'virtio0' doesn't support the option 'unknown_opt'
+
+
+=== Unknown protocol option ===
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=: could not open
disk image TEST_DIR/t.qcow2: Block protocol 'file' doesn't support
the option 'unknown_opt'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=on
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=on: could not
open disk image TEST_DIR/t.qcow2: Block protocol 'file' doesn't
support the option 'unknown_opt'
+
+Testing: -drive
file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=1234
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=1234: could not
open disk image TEST_DIR/t.qcow2: Block protocol 'file' doesn't
support the option 'unknown_opt'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=foo
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=foo: could not
open disk image TEST_DIR/t.qcow2: Block protocol 'file' doesn't
support the option 'unknown_opt'
+
+
+=== Invalid format ===
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=foo
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=foo: 'foo' invalid
format
+
+Testing: -drive file=TEST_DIR/t.qcow2,driver=foo
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,driver=foo: could not open
disk image TEST_DIR/t.qcow2: Unknown driver 'foo'
+
+Testing: -drive file=TEST_DIR/t.qcow2,driver=raw,format=qcow2
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,driver=raw,format=qcow2:
could not open disk image TEST_DIR/t.qcow2: Driver specified twice
+
+
+=== Overriding backing file ===
+
+Testing: -drive
file=TEST_DIR/t.qcow2,driver=qcow2,backing.file.filename=TEST_DIR/t.qcow2.orig
-nodefaults
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu)
i[K[Din[K[D[Dinf[K[D[D[Dinfo[K[D[D[D[Dinfo
[K[D[D[D[D[Dinfo b[K[D[D[D[D[D[Dinfo
bl[K[D[D[D[D[D[D[Dinfo
blo[K[D[D[D[D[D[D[D[Dinfo
bloc[K[D[D[D[D[D[D[D[D[Dinfo block[K
+virtio0: TEST_DIR/t.qcow2 (qcow2)
+ Backing file: TEST_DIR/t.qcow2.orig (chain depth: 1)
+(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
+
+Testing: -drive
file=TEST_DIR/t.qcow2,driver=raw,backing.file.filename=TEST_DIR/t.qcow2.orig
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,driver=raw,backing.file.filename=TEST_DIR/t.qcow2.orig:
could not open disk image TEST_DIR/t.qcow2: Driver doesn't support
backing files
+
+Testing: -drive
file=TEST_DIR/t.qcow2,file.backing.driver=file,file.backing.filename=TEST_DIR/t.qcow2.orig
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,file.backing.driver=file,file.backing.filename=TEST_DIR/t.qcow2.orig:
could not open disk image TEST_DIR/t.qcow2: Driver doesn't support
backing files
+
+Testing: -drive
file=TEST_DIR/t.qcow2,file.backing.driver=qcow2,file.backing.file.filename=TEST_DIR/t.qcow2.orig
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,file.backing.driver=qcow2,file.backing.file.filename=TEST_DIR/t.qcow2.orig:
could not open disk image TEST_DIR/t.qcow2: Driver doesn't support
backing files
+
+
+=== Enable and disable lazy refcounting on the command line, plus
some invalid values ===
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=off
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=: could not open
disk image TEST_DIR/t.qcow2: Parameter 'lazy-refcounts' expects 'on'
or 'off'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=42
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=42: could not open
disk image TEST_DIR/t.qcow2: Parameter 'lazy-refcounts' expects 'on'
or 'off'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=foo
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=foo: could not open
disk image TEST_DIR/t.qcow2: Parameter 'lazy-refcounts' expects 'on'
or 'off'
+
+
+=== With version 2 images enabling lazy refcounts must fail ===
+
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on
+QEMU_PROG: -drive
file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on: could not open
disk image TEST_DIR/t.qcow2: Lazy refcounts require a qcow2 image
with at least qemu 1.1 compatibility level
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=off
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
+
+
+=== No medium ===
+
+Testing: -drive if=floppy
+QEMU X.Y.Z monitor - type 'help' for more information
+(qemu) Warning: Orphaned drive without device:
id=floppy0,file=,if=floppy,bus=0,unit=0
+q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K