xemu/backends
Stefan Berger 99bdcd2cc2 tpm_emulator: Have swtpm relock storage upon migration fall-back
Swtpm may release the lock once the last one of its state blobs has been
migrated out. In case of VM migration failure QEMU now needs to notify
swtpm that it should again take the lock, which it can otherwise only do
once it has received the first TPM command from the VM.

Only try to send the lock command if swtpm supports it. It will not have
released the lock (and support shared storage setups) if it doesn't
support the locking command since the functionality of releasing the lock
upon state blob reception and the lock command were added to swtpm
'together'.

If QEMU sends the lock command and the storage has already been locked
no error is reported.

If swtpm does not receive the lock command (from older version of QEMU),
it will lock the storage once the first TPM command has been received. So
sending the lock command is an optimization.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20220912174741.1542330-3-stefanb@linux.ibm.com
2022-09-13 10:27:17 -04:00
..
tpm tpm_emulator: Have swtpm relock storage upon migration fall-back 2022-09-13 10:27:17 -04:00
confidential-guest-support.c confidential guest support: Introduce new confidential guest support class 2021-02-08 16:57:37 +11:00
cryptodev-builtin.c crypto: Introduce RSA algorithm 2022-06-16 12:54:58 -04:00
cryptodev-vhost-user.c crypto: Introduce RSA algorithm 2022-06-16 12:54:58 -04:00
cryptodev-vhost.c vhost: Add Error parameter to vhost_dev_init() 2021-06-30 13:15:44 +02:00
cryptodev.c crypto: Introduce RSA algorithm 2022-06-16 12:54:58 -04:00
dbus-vmstate1.xml docs: move D-Bus VMState documentation to source XML 2021-12-21 10:50:21 +04:00
dbus-vmstate.c dbus-vmstate: Restrict error checks to registered proxies in dbus_get_proxies 2022-08-18 10:35:44 +04:00
hostmem-epc.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
hostmem-file.c include: Move qemu_madvise() and related #defines to new qemu/madvise.h 2022-02-21 13:30:20 +00:00
hostmem-memfd.c hostmem: Wire up RAM_NORESERVE via "reserve" property 2021-06-15 20:27:38 +02:00
hostmem-ram.c hostmem: Wire up RAM_NORESERVE via "reserve" property 2021-06-15 20:27:38 +02:00
hostmem.c backends/hostmem: Fix support of memory-backend-memfd in qemu_maxrampagesize() 2022-08-26 13:33:51 +02:00
Kconfig tpm: Move backend code under the 'backends/' directory 2020-06-19 07:25:55 -04:00
meson.build meson: use have_vhost_* variables to pick sources 2022-05-07 07:46:58 +02:00
rng-builtin.c replay: rng-builtin support 2021-02-08 15:15:32 +01:00
rng-egd.c rng-egd: Register "chardev" as class property 2020-10-13 15:56:30 -04:00
rng-random.c rng-random: register "filename" as class property 2020-10-13 15:56:30 -04:00
rng.c rng: make opened property read-only 2022-05-14 12:33:44 +02:00
trace-events docs: fix references to docs/devel/tracing.rst 2021-06-02 06:51:09 +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: Add Error parameter to vhost_dev_init() 2021-06-30 13:15:44 +02:00