Re: [PATCH] tpm_emulator: Avoid double initialization during migration

2022-08-08 Thread Stefan Berger
On 8/1/22 10:27, Ross Lagerwall via wrote: When resuming after a migration, the backend sends CMD_INIT to the emulator from the startup callback, then it sends the migration state This startup hook is called upon TIS/CRB device reset, so this is likely called before the device state has bee

Re: [PATCH] tpm_emulator: Avoid double initialization during migration

2022-08-01 Thread Marc-André Lureau
Hi On Mon, Aug 1, 2022 at 6:28 PM Ross Lagerwall via wrote: > When resuming after a migration, the backend sends CMD_INIT to the > emulator from the startup callback, then it sends the migration state > from the vmstate to the emulator, then it sends CMD_INIT again. Skip the > first CMD_INIT dur

[PATCH] tpm_emulator: Avoid double initialization during migration

2022-08-01 Thread Ross Lagerwall via
When resuming after a migration, the backend sends CMD_INIT to the emulator from the startup callback, then it sends the migration state from the vmstate to the emulator, then it sends CMD_INIT again. Skip the first CMD_INIT during a migration to avoid initializing the TPM twice. Signed-off-by: Ro