qemu-cr16/backends
Arun Menon 42e556fa3f backends/tpm: Propagate vTPM error on migration failure
- When migration of a VM with encrypted vTPM fails on the
  destination host, (e.g., due to a mismatch in secret values),
  the error message displayed on the source host is generic and unhelpful.
- For example, a typical error looks like this:
  "operation failed: job 'migration out' failed: Sibling indicated error 1.
  operation failed: job 'migration in' failed: load of migration failed:
  Input/output error"
- Such generic errors are logged using error_report(), which prints to
  the console/monitor but does not make the detailed error accessible via
  the QMP query-migrate command.
- This change, along with the set of changes of passing errp Error object
  to the VM state loading functions, help in addressing the issue.
  We use the post_load_errp hook of VMStateDescription to propagate errors
  by setting Error **errp objects in case of failure in the TPM backend.
- It can then be retrieved using QMP command:
  {"execute" : "query-migrate"}

Buglink: https://issues.redhat.com/browse/RHEL-82826

Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Arun Menon <armenon@redhat.com>
Tested-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Link: https://lore.kernel.org/r/20250918-propagate_tpm_error-v14-27-36f11a6fb9d3@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>
2025-10-03 09:48:02 -04:00
..
tpm backends/tpm: Propagate vTPM error on migration failure 2025-10-03 09:48:02 -04:00
confidential-guest-support.c backends/confidential-guest-support: Add set_guest_policy() function 2025-07-12 15:28:21 +02:00
cryptodev-builtin.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
cryptodev-hmp-cmds.c qapi: Move include/qapi/qmp/ to include/qobject/ 2025-02-10 15:33:16 +01:00
cryptodev-lkcf.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
cryptodev-vhost-user.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
cryptodev-vhost.c cryptodev/vhost: allocate CryptoDevBackendVhost using g_mem0() 2025-02-21 07:18:42 -05:00
cryptodev.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
dbus-vmstate.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
dbus-vmstate1.xml docs: move D-Bus VMState documentation to source XML 2021-12-21 10:50:21 +04:00
host_iommu_device.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
hostmem-epc.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
hostmem-file.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
hostmem-memfd.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
hostmem-ram.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
hostmem-shm.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
hostmem.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
igvm-cfg.c backends/igvm: Add IGVM loader and configuration 2025-07-12 15:28:21 +02:00
igvm.c sev: Provide sev_features flags from IGVM VMSA to KVM_SEV_INIT2 2025-07-12 15:28:21 +02:00
igvm.h sev: Provide sev_features flags from IGVM VMSA to KVM_SEV_INIT2 2025-07-12 15:28:21 +02:00
iommufd.c iommufd: preserve DMA mappings 2025-07-03 13:42:28 +02:00
Kconfig backends: Initial support for SPDM socket support 2024-07-22 20:15:42 -04:00
meson.build backends/igvm: Add IGVM loader and configuration 2025-07-12 15:28:21 +02:00
rng-builtin.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
rng-egd.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
rng-random.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
rng.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
spdm-socket.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
trace-events backends/iommufd: change process ioctl 2025-07-03 13:42:28 +02:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
vhost-user.c vhost-user: return failure if backend crash when live migration 2025-05-14 05:39:15 -04:00