All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/2] accel/kvm: notify management of vCPU run errors
@ 2026-07-08  6:12 Tao Cui
  2026-07-08  6:12 ` [PATCH v1 1/2] qapi: add KVM_VCPU_ERROR event Tao Cui
  2026-07-08  6:12 ` [PATCH v1 2/2] accel/kvm: emit KVM_VCPU_ERROR on unrecoverable vCPU exits Tao Cui
  0 siblings, 2 replies; 3+ messages in thread
From: Tao Cui @ 2026-07-08  6:12 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, armbru, eblake, kvm, Tao Cui

From: Tao Cui <cuitao@kylinos.cn>

Today, when a KVM vCPU exits with KVM_EXIT_INTERNAL_ERROR,
KVM_EXIT_UNKNOWN, or a failed KVM_RUN ioctl, QEMU logs to stderr and
calls vm_stop(RUN_STATE_INTERNAL_ERROR). The management layer then only
sees the derived STOP event; it cannot tell which vCPU failed nor obtain
the kernel suberror / extra data. This gap is even called out by a
FIXME in kvm_handle_internal_error().

This series adds a KVM_VCPU_ERROR QMP event, emitted before the VM is
stopped, that carries the failing vCPU (cpu-index, qom-path), an error
category (KvmVcpuErrorReason) and, for KVM_EXIT_INTERNAL_ERROR, the
kernel suberror and extra data words.

  Patch 1 defines the event and the KvmVcpuErrorReason enum in
          qapi/run-state.json.
  Patch 2 wires it up at the three unrecoverable-exit points in
          accel/kvm/kvm-all.c and removes the FIXME.

Tao Cui (2):
  qapi: add KVM_VCPU_ERROR event
  accel/kvm: emit KVM_VCPU_ERROR on unrecoverable vCPU exits

 accel/kvm/kvm-all.c | 46 +++++++++++++++++++++++++++++++++---
 qapi/run-state.json | 57 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 100 insertions(+), 3 deletions(-)

-- 
2.43.0



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-08  6:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-08  6:12 [PATCH v1 0/2] accel/kvm: notify management of vCPU run errors Tao Cui
2026-07-08  6:12 ` [PATCH v1 1/2] qapi: add KVM_VCPU_ERROR event Tao Cui
2026-07-08  6:12 ` [PATCH v1 2/2] accel/kvm: emit KVM_VCPU_ERROR on unrecoverable vCPU exits Tao Cui

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.