aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorzhenwei pi <pizhenwei@bytedance.com>2020-09-30 18:04:39 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2020-10-04 18:36:23 +0200
commit77b285f7f6ed637ee2576ae96744211ce9691567 (patch)
tree05fb511ef7458c01611378c9d7d30c4560b47d53 /qapi
parent9f89f303deea2ccc624932e13fb629347a5a98de (diff)
qapi/run-state.json: introduce memory failure event
Introduce memory failure events for hypervisor and guest. This lets mft: Need exactly one file argument. Try `mft --help' for more information. Suggested by Peter Maydell, rename events name&description to make them architecture-neutral; and suggested by Paolo, add more info to distinguish a mce is AR/AO, and if a previous MCE was still being processed in the guest. Signed-off-by: zhenwei pi <pizhenwei@bytedance.com> Message-Id: <20200930100440.1060708-3-pizhenwei@bytedance.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/run-state.json90
1 files changed, 90 insertions, 0 deletions
diff --git a/qapi/run-state.json b/qapi/run-state.json
index 7cc9f96a5b..964c8ef391 100644
--- a/qapi/run-state.json
+++ b/qapi/run-state.json
@@ -475,3 +475,93 @@
'psw-mask': 'uint64',
'psw-addr': 'uint64',
'reason': 'S390CrashReason' } }
+
+##
+# @MEMORY_FAILURE:
+#
+# Emitted when a memory failure occurs on host side.
+#
+# @recipient: recipient is defined as @MemoryFailureRecipient.
+#
+# @action: action that has been taken. action is defined as @MemoryFailureAction.
+#
+# @flags: flags for MemoryFailureAction. action is defined as @MemoryFailureFlags.
+#
+# Since: 5.2
+#
+# Example:
+#
+# <- { "event": "MEMORY_FAILURE",
+# "data": { "recipient": "hypervisor",
+# "action": "fatal",
+# "flags": { 'action-required': false } }
+#
+##
+{ 'event': 'MEMORY_FAILURE',
+ 'data': { 'recipient': 'MemoryFailureRecipient',
+ 'action': 'MemoryFailureAction',
+ 'flags': 'MemoryFailureFlags'} }
+
+##
+# @MemoryFailureRecipient:
+#
+# Hardware memory failure occurs, handled by recipient.
+#
+# @hypervisor: memory failure at QEMU process address space.
+# (none guest memory, but used by QEMU itself).
+#
+# @guest: memory failure at guest memory,
+#
+# Since: 5.2
+#
+##
+{ 'enum': 'MemoryFailureRecipient',
+ 'data': [ 'hypervisor',
+ 'guest' ] }
+
+
+##
+# @MemoryFailureAction:
+#
+# Actions taken by QEMU in response to a hardware memory failure.
+#
+# @ignore: the memory failure could be ignored. This will only be the case
+# for action-optional failures.
+#
+# @inject: memory failure occurred in guest memory, the guest enabled MCE
+# handling mechanism, and QEMU could inject the MCE into the guest
+# successfully.
+#
+# @fatal: the failure is unrecoverable. This occurs for action-required
+# failures if the recipient is the hypervisor; QEMU will exit.
+#
+# @reset: the failure is unrecoverable but confined to the guest. This
+# occurs if the recipient is a guest guest which is not ready
+# to handle memory failures.
+#
+# Since: 5.2
+#
+##
+{ 'enum': 'MemoryFailureAction',
+ 'data': [ 'ignore',
+ 'inject',
+ 'fatal',
+ 'reset' ] }
+
+##
+# @MemoryFailureFlags:
+#
+# Additional information on memory failures.
+#
+# @action-required: whether a memory failure event is action-required
+# or action-optional (e.g. a failure during memory scrub).
+#
+# @recursive: whether the failure occurred while the previous
+# failure was still in progress.
+#
+# Since: 5.2
+#
+##
+{ 'struct': 'MemoryFailureFlags',
+ 'data': { 'action-required': 'bool',
+ 'recursive': 'bool'} }