[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-7.2.15 13/33] tests: Wait for migration completion on destinatio
From: |
Michael Tokarev |
Subject: |
[Stable-7.2.15 13/33] tests: Wait for migration completion on destination QEMU to avoid failures |
Date: |
Sat, 9 Nov 2024 09:38:39 +0300 |
From: Stefan Berger <stefanb@linux.ibm.com>
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 d9280ea3174700170d39c4cdd3f587f260757711)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/tests/qtest/tpm-tests.c b/tests/qtest/tpm-tests.c
index 25073d1f9e..7ea9038f60 100644
--- a/tests/qtest/tpm-tests.c
+++ b/tests/qtest/tpm-tests.c
@@ -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));
--
2.39.5
- [Stable-7.2.15 03/33] block/reqlist: allow adding overlapping requests, (continued)
- [Stable-7.2.15 03/33] block/reqlist: allow adding overlapping requests, Michael Tokarev, 2024/11/09
- [Stable-7.2.15 02/33] target/ppc: Fix lxvx/stxvx facility check, Michael Tokarev, 2024/11/09
- [Stable-7.2.15 05/33] tracetool: avoid invalid escape in Python string, Michael Tokarev, 2024/11/09
- [Stable-7.2.15 06/33] linux-user/flatload: Take mmap_lock in load_flt_binary(), Michael Tokarev, 2024/11/09
- [Stable-7.2.15 08/33] scsi: fetch unit attention when creating the request, Michael Tokarev, 2024/11/09
- [Stable-7.2.15 10/33] hw/audio/hda: free timer on exit, Michael Tokarev, 2024/11/09
- [Stable-7.2.15 09/33] hw/intc/arm_gicv3_cpuif: Add cast to match the documentation, Michael Tokarev, 2024/11/09
- [Stable-7.2.15 07/33] linux-user: Fix parse_elf_properties GNU0_MAGIC check, Michael Tokarev, 2024/11/09
- [Stable-7.2.15 11/33] KVM: Dynamic sized kvm memslots array, Michael Tokarev, 2024/11/09
- [Stable-7.2.15 14/33] raw-format: Fix error message for invalid offset/size, Michael Tokarev, 2024/11/09
- [Stable-7.2.15 13/33] tests: Wait for migration completion on destination QEMU to avoid failures,
Michael Tokarev <=
- [Stable-7.2.15 12/33] accel/kvm: check for KVM_CAP_READONLY_MEM on VM, Michael Tokarev, 2024/11/09
- [Stable-7.2.15 16/33] target/i386: Avoid unreachable variable declaration in mmu_translate(), Michael Tokarev, 2024/11/09
- [Stable-7.2.15 15/33] tcg: Reset data_gen_ptr correctly, Michael Tokarev, 2024/11/09
- [Stable-7.2.15 17/33] target/i386: Walk NPT in guest real mode, Michael Tokarev, 2024/11/09
- [Stable-7.2.15 18/33] linux-user/ppc: Fix sigmask endianness issue in sigreturn, Michael Tokarev, 2024/11/09
- [Stable-7.2.15 21/33] net/tap-win32: Fix gcc 14 format truncation errors, Michael Tokarev, 2024/11/09
- [Stable-7.2.15 19/33] gitlab: make check-[dco|patch] a little more verbose, Michael Tokarev, 2024/11/09
- [Stable-7.2.15 20/33] Fix calculation of minimum in colo_compare_tcp, Michael Tokarev, 2024/11/09