[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v21 8/8] Wire up disabled wait a panicked event on s
From: |
Hu Tao |
Subject: |
[Qemu-devel] [PATCH v21 8/8] Wire up disabled wait a panicked event on s390 |
Date: |
Fri, 26 Apr 2013 11:24:47 +0800 |
From: Christian Borntraeger <address@hidden>
On s390 the disabled wait state indicates a state of attention.
For example Linux uses that state after a panic. Lets
put the system into panicked state.
An alternative implementation would be to state
disabled-wait <address> instead of pause in the action field.
(e.g. z/OS, z/VM and other classic OSes use the address of the
disabled wait to indicate an error code).
Signed-off-by: Christian Borntraeger <address@hidden>
---
target-s390x/kvm.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
index 644f484..0c111f0 100644
--- a/target-s390x/kvm.c
+++ b/target-s390x/kvm.c
@@ -34,6 +34,8 @@
#include "sysemu/kvm.h"
#include "cpu.h"
#include "sysemu/device_tree.h"
+#include "qapi/qmp/qjson.h"
+#include "monitor/monitor.h"
/* #define DEBUG_KVM */
@@ -705,9 +707,18 @@ static int handle_intercept(S390CPU *cpu)
r = handle_instruction(cpu, run);
break;
case ICPT_WAITPSW:
- if (s390_del_running_cpu(cpu) == 0 &&
- is_special_wait_psw(cs)) {
- qemu_system_shutdown_request();
+ /* disabled wait, since enabled wait is handled in kernel */
+ if (s390_del_running_cpu(cpu) == 0) {
+ if (is_special_wait_psw(cs)) {
+ qemu_system_shutdown_request();
+ } else {
+ QObject *data;
+
+ data = qobject_from_jsonf("{ 'action': %s }", "pause");
+ monitor_protocol_event(QEVENT_GUEST_PANICKED, data);
+ qobject_decref(data);
+ vm_stop(RUN_STATE_GUEST_PANICKED);
+ }
}
r = EXCP_HALTED;
break;
--
1.8.1.4
- [Qemu-devel] [PATCH v21 4/8] fw_cfg: add required header files, (continued)
- [Qemu-devel] [PATCH v21 4/8] fw_cfg: add required header files, Hu Tao, 2013/04/25
- [Qemu-devel] [PATCH v21 5/8] pvpanic: pass configurable ioport to seabios, Hu Tao, 2013/04/25
- [Qemu-devel] [PATCH v21 3/8] introduce a new qom device to deal with panicked event, Hu Tao, 2013/04/25
- [Qemu-devel] [PATCH v21 7/8] pvpanic: create pvpanic by default for machine 1.5, Hu Tao, 2013/04/25
- [Qemu-devel] [PATCH v21 6/8] pvpanic: add document of pvpanic, Hu Tao, 2013/04/25
- [Qemu-devel] [PATCH v21 8/8] Wire up disabled wait a panicked event on s390,
Hu Tao <=