mbox series

[0/2] tpm_emulator: Signal swtpm to again lock storage

Message ID 20220912174741.1542330-1-stefanb@linux.ibm.com (mailing list archive)
Headers show
Series tpm_emulator: Signal swtpm to again lock storage | expand

Message

Stefan Berger Sept. 12, 2022, 5:47 p.m. UTC
Swtpm has been extended to release the lock on the storage where its state
is written to upon migration of the last one of its state blobs. Signal
swtpm to again lock the storage upon migration fallback. An explicit signal
helps swtpm to lock the storage earlier because otherwise it would have
to wait for the next TPM command from the VM.

Releasing the lock on the storage is necessary for setups where the storage
holding the TPM state is shared between hosts.

Regards,
   Stefan

v3:
 - extended timeout to 3 seconds

Stefan Berger (2):
  tpm_emulator: Use latest tpm_ioctl.h from swtpm project
  tpm_emulator: Have swtpm relock storage upon migration fall-back

 backends/tpm/tpm_emulator.c | 60 ++++++++++++++++++++++-
 backends/tpm/tpm_ioctl.h    | 96 +++++++++++++++++++++++++++++--------
 backends/tpm/trace-events   |  2 +
 3 files changed, 137 insertions(+), 21 deletions(-)