[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/19] qapi/run-state.json: introduce memory failure event
From: |
Paolo Bonzini |
Subject: |
[PULL 16/19] qapi/run-state.json: introduce memory failure event |
Date: |
Mon, 5 Oct 2020 10:23:46 +0200 |
From: zhenwei pi <pizhenwei@bytedance.com>
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>
---
qapi/run-state.json | 90 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 90 insertions(+)
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'} }
--
2.26.2
- [PULL 04/19] configure: rewrite accelerator defaults as tests, (continued)
- [PULL 04/19] configure: rewrite accelerator defaults as tests, Paolo Bonzini, 2020/10/05
- [PULL 03/19] configure: convert accelerator variables to meson options, Paolo Bonzini, 2020/10/05
- [PULL 06/19] configure: remove dead variable, Paolo Bonzini, 2020/10/05
- [PULL 08/19] configure: remove useless config-target.mak symbols, Paolo Bonzini, 2020/10/05
- [PULL 05/19] configure: move accelerator logic to meson, Paolo Bonzini, 2020/10/05
- [PULL 11/19] configure: move OpenBSD W^X test to meson, Paolo Bonzini, 2020/10/05
- [PULL 12/19] default-configs: use TARGET_ARCH key, Paolo Bonzini, 2020/10/05
- [PULL 10/19] default-configs: remove default-configs/devices for user-mode targets, Paolo Bonzini, 2020/10/05
- [PULL 13/19] default-configs: remove redundant keys, Paolo Bonzini, 2020/10/05
- [PULL 15/19] target-i386: seperate MCIP & MCE_MASK error reason, Paolo Bonzini, 2020/10/05
- [PULL 16/19] qapi/run-state.json: introduce memory failure event,
Paolo Bonzini <=
- [PULL 09/19] configure: remove target configuration, Paolo Bonzini, 2020/10/05
- [PULL 19/19] dockerfiles: add diffutils to Fedora, Paolo Bonzini, 2020/10/05
- [PULL 14/19] meson: move sparse detection to Meson and rewrite check_sparse.py, Paolo Bonzini, 2020/10/05
- [PULL 17/19] target-i386: post memory failure event to QMP, Paolo Bonzini, 2020/10/05
- [PULL 18/19] tests: tcg: do not use implicit rules, Paolo Bonzini, 2020/10/05
- Re: [PULL 00/19] Build system + MCE patches for 2020-10-05, Peter Maydell, 2020/10/05