qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Ross Lagerwall
Subject: Re: [PATCH] tpm_emulator: Avoid double initialization during migration
Date: Mon, 1 Aug 2022 15:25:03 +0000

> From: Marc-André Lureau <marcandre.lureau@gmail.com>
> Sent: Monday, August 1, 2022 3:36 PM
> To: Ross Lagerwall <ross.lagerwall@citrix.com>
> Cc: Stefan Berger <stefanb@linux.vnet.ibm.com>; qemu-devel@nongnu.org 
> <qemu-devel@nongnu.org>
> Subject: Re: [PATCH] tpm_emulator: Avoid double initialization during 
> migration 
>  
> [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments 
> unless you have verified the sender and know the content is safe.
> Hi
> 
> On Mon, Aug 1, 2022 at 6:28 PM Ross Lagerwall via <qemu-devel@nongnu.org> 
> 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 during a migration to avoid initializing the TPM twice.
> 
> Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
> 
> lgtm
> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> There are no visible bugs/symptoms, I suppose?

I started looking into this because swtpm would complain about
"tpm2-00.volatilestate" being missing during migration. This happened
during the first init because the volatile state only got set by
QEMU before the 2nd init. I'm not sure if there are any other
negative consequences to sending init twice (I suspect probably
not?).

Ross


reply via email to

[Prev in Thread] Current Thread [Next in Thread]