Signed-off-by: Andreas Färber <afaer...@suse.de> --- hw/s390x/s390-virtio-hcall.c | 17 +++++++++++++++++ 1 Datei geändert, 17 Zeilen hinzugefügt(+)
diff --git a/hw/s390x/s390-virtio-hcall.c b/hw/s390x/s390-virtio-hcall.c index d7938c0..6d044f8 100644 --- a/hw/s390x/s390-virtio-hcall.c +++ b/hw/s390x/s390-virtio-hcall.c @@ -11,6 +11,7 @@ #include "cpu.h" #include "hw/s390-virtio.h" +#include "sysemu/qtest.h" #define MAX_DIAG_SUBCODES 255 @@ -34,3 +35,19 @@ int s390_virtio_hypercall(CPUS390XState *env) return fn(&env->regs[2]); } + +int qtest_hypercall(uint64_t code, uint64_t *args) +{ + s390_virtio_fn fn = s390_diag500_table[code]; + + if (fn == NULL) { + return -EINVAL; + } + + return fn(args); +} + +bool qtest_hypercall_supported(void) +{ + return true; +} -- 1.7.10.4