diff options
author | Anthony PERARD <anthony.perard@citrix.com> | 2022-04-11 15:47:49 +0100 |
---|---|---|
committer | Stefan Berger <stefanb@linux.ibm.com> | 2022-06-07 20:37:25 -0400 |
commit | e37a0ef4605e5d2041785ff3fc89ca6021faf7a0 (patch) | |
tree | 7925dbcabc22cc87499ca7d7387beed459f30525 /hw/tpm | |
parent | 4d84bb6c8b42cc781a02e1ac6648875966abc877 (diff) |
tpm_crb: mark command buffer as dirty on request completion
At the moment, there doesn't seems to be any way to know that QEMU
made modification to the command buffer. This is potentially an issue
on Xen while migrating a guest, as modification to the buffer after
the migration as started could be ignored and not transfered to the
destination.
Mark the memory region of the command buffer as dirty once a request
is completed.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Message-id: 20220411144749.47185-1-anthony.perard@citrix.com
Diffstat (limited to 'hw/tpm')
-rw-r--r-- | hw/tpm/tpm_crb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c index aa9c00aad3..67db594c48 100644 --- a/hw/tpm/tpm_crb.c +++ b/hw/tpm/tpm_crb.c @@ -197,6 +197,7 @@ static void tpm_crb_request_completed(TPMIf *ti, int ret) ARRAY_FIELD_DP32(s->regs, CRB_CTRL_STS, tpmSts, 1); /* fatal error */ } + memory_region_set_dirty(&s->cmdmem, 0, CRB_CTRL_CMD_SIZE); } static enum TPMVersion tpm_crb_get_version(TPMIf *ti) |