On 9/12/26 1:31 AM, Akihiko Odaki wrote:
Currently only the normal migration mode is blocked with unsupported CRB
chunk migration. However, all CPR modes stop the VM before saving.
Stopping only freezes an outstanding chunk transaction; it does not
clear it.

tpm_crb_pre_save() waits for the backend request to finish but may leave
command_buffer and response_buffer with some state. Those fields are
then omitted when allow_chunk_migration is false. CPR preserves guest
RAM or selected kernel resources, not these GByteArray heap objects.
Block the CPR modes too.

Fixes: a8aa1b220c71 ("hw/tpm: Add support for VM migration with TPM CRB 
chunking")
Signed-off-by: Akihiko Odaki <[email protected]>

Reviewed-by: Stefan Berger <[email protected]>

---
  hw/tpm/tpm_crb.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c
index 54fa2042b5a8..943809103b63 100644
--- a/hw/tpm/tpm_crb.c
+++ b/hw/tpm/tpm_crb.c
@@ -482,7 +482,7 @@ static void tpm_crb_realize(DeviceState *dev, Error **errp)
          error_setg(&s->migration_blocker,
                     "The tpm-crb device does not support chunk migration with "
                     "machine version less than 11.1");
-        ret = migrate_add_blocker_normal(&s->migration_blocker, errp);
+        ret = migrate_add_blocker(&s->migration_blocker, errp);
          if (ret < 0) {
              return;
          }



Reply via email to