mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-29 02:30:29 -07:00
tests: Wait for migration completion on destination QEMU to avoid failures
Rather than waiting for the completion of migration on the source side,
wait for it on the destination QEMU side to avoid accessing the TPM TIS
memory mapped registers before QEMU could restore their state. This
error condition could be triggered on busy systems where the destination
QEMU did not have enough time to restore the TIS state while the test case
was already reading its registers. The test case was for example reading
the STS register and received an unexpected value (0xffffffff), which
lead to a segmentation fault later on due to trying to read 0xffff bytes
from the TIS into a buffer.
Cc: <qemu-stable@nongnu.org>
Reported-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
(cherry picked from commit d9280ea317)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
15137b66bf
commit
bc5014cde5
1 changed files with 1 additions and 1 deletions
|
|
@ -114,7 +114,7 @@ void tpm_test_swtpm_migration_test(const char *src_tpm_path,
|
|||
sizeof(tpm_pcrread_resp));
|
||||
|
||||
tpm_util_migrate(src_qemu, uri);
|
||||
tpm_util_wait_for_migration_complete(src_qemu);
|
||||
tpm_util_wait_for_migration_complete(dst_qemu);
|
||||
|
||||
tpm_util_pcrread(dst_qemu, tx, tpm_pcrread_resp,
|
||||
sizeof(tpm_pcrread_resp));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue