From: Stefan Berger <stefanb@linux.ibm.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org,
Anthony PERARD <anthony.perard@citrix.com>,
Stefan Berger <stefanb@linux.ibm.com>
Subject: [PULL v1 2/2] tpm_crb: mark command buffer as dirty on request completion
Date: Tue, 7 Jun 2022 21:00:06 -0400 [thread overview]
Message-ID: <20220608010006.2122022-3-stefanb@linux.ibm.com> (raw)
In-Reply-To: <20220608010006.2122022-1-stefanb@linux.ibm.com>
From: Anthony PERARD <anthony.perard@citrix.com>
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
---
hw/tpm/tpm_crb.c | 1 +
1 file changed, 1 insertion(+)
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)
--
2.35.3
next prev parent reply other threads:[~2022-06-08 1:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-08 1:00 [PULL v1 0/2] Merge tpm 2022/06/07 v1 Stefan Berger
2022-06-08 1:00 ` [PULL v1 1/2] hw/tpm/tpm_tis_common.c: Assert that locty is in range Stefan Berger
2022-06-08 1:00 ` Stefan Berger [this message]
2022-06-08 14:40 ` [PULL v1 0/2] Merge tpm 2022/06/07 v1 Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220608010006.2122022-3-stefanb@linux.ibm.com \
--to=stefanb@linux.ibm.com \
--cc=anthony.perard@citrix.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).