qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC 2/3] target-s390x: Prepare qtest hypercall support


From: Andreas Färber
Subject: [Qemu-devel] [RFC 2/3] target-s390x: Prepare qtest hypercall support
Date: Wed, 23 Jan 2013 11:01:53 +0100

Signed-off-by: Andreas Färber <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]