aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-06-30 08:11:08 +0200
committerRichard Henderson <richard.henderson@linaro.org>2023-06-30 08:11:08 +0200
commit408015a97dbe48a9dde8c0d2526c9312691952e7 (patch)
treeb41b1a9349392da698def212ff60e19f7043f851 /tests
parentf7884164cbe3743c3bd2acc9daf877497fdb5fa3 (diff)
parent0cc889c8826cefa5b80110d31a62273b56aa1832 (diff)
downloadqemu-408015a97dbe48a9dde8c0d2526c9312691952e7.zip
qemu-408015a97dbe48a9dde8c0d2526c9312691952e7.tar.gz
qemu-408015a97dbe48a9dde8c0d2526c9312691952e7.tar.bz2
Merge tag 'pull-vfio-20230630' of https://github.com/legoater/qemu into staging
vfio queue: * migration: New switchover ack to reduce downtime * VFIO migration pre-copy support * Removal of the VFIO migration experimental flag * Alternate offset for GPUDirect Cliques * Misc fixes # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmSeVHYACgkQUaNDx8/7 # 7KHeZw/+LRe9QQpx8hU//vKBvLet2QvI3WUaXGHiHbblbRT6HhiHjWHB2/8j6jji # QhAGJ6w9yoKODyY0kGpVFEnkmXOKyqwWssBheV219ntZs09pFGxZr/ldUhT22aBN # kH8mHU9BZ3J+zF/kKphpcIC1sPxVu/DlrtnJu5vDGuRAOu8+3kFV217JC1yGs1Vh # n+KOho8a8oP9qxtzfvQ9iZ4dpBOOKpE9vscS12wJAlen93AGB6esR7VaLxDjExRP # yL1pguQ8ZZ1gEXXbXO62djKo3IViobtD08KmCXTzQ6TVquLleJzqgjp+A0THnYAe # J9Rlja7LpsO9MYSxmRE9WcQccC+sAGn/t/ufB0tL8zR43FvfhbF5H0PzBBY0H7YA # JlzN+fgrKEEHJwMhXANNvSddhWCwvrkjNxo/80u3ySYMQR1Hav/tsXYBlk16e5nS # fmtrFGTwhsVdy1Q6ZqEOyTni1eiYt5stEQMZFODdUNj6b9FugSZ0BK+2WN/M0CzU # 6mKmJQgZAG/nBoRJm/XCO5OKQ6wm/4tm6F4HSH5EJ6mDT+DqETAk4GRUWTbYa2/G # yAAOlhTMu8Xc/NhMeJ7Z99dyq0SM8pi/XpVEIv7p9yBak8ix60iCWZtDE8vlDv3M # UfMVMTAvTS30kbS6FDN2Yyl6l8/ETdcwVIN4l02ipGzpMCtn9EQ= # =dKUj # -----END PGP SIGNATURE----- # gpg: Signature made Fri 30 Jun 2023 06:05:10 AM CEST # gpg: using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1 # gpg: Good signature from "Cédric Le Goater <clg@kaod.org>" [undefined] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: A0F6 6548 F048 95EB FE6B 0B60 51A3 43C7 CFFB ECA1 * tag 'pull-vfio-20230630' of https://github.com/legoater/qemu: vfio/pci: Free leaked timer in vfio_realize error path vfio/pci: Fix a segfault in vfio_realize MAINTAINERS: Promote Cédric to VFIO co-maintainer vfio/migration: Make VFIO migration non-experimental vfio/migration: Reset bytes_transferred properly vfio/pci: Call vfio_prepare_kvm_msi_virq_batch() in MSI retry path hw/vfio/pci-quirks: Support alternate offset for GPUDirect Cliques vfio: Implement a common device info helper vfio/migration: Add support for switchover ack capability vfio/migration: Add VFIO migration pre-copy support vfio/migration: Store VFIO migration flags in VFIOMigration vfio/migration: Refactor vfio_save_block() to return saved data size tests: Add migration switchover ack capability test migration: Enable switchover ack capability migration: Implement switchover ack logic migration: Add switchover ack capability Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/qtest/migration-test.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index b0c355b..b9cc194 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -1693,6 +1693,33 @@ static void test_precopy_tcp_plain(void)
test_precopy_common(&args);
}
+static void *test_migrate_switchover_ack_start(QTestState *from, QTestState *to)
+{
+
+ migrate_set_capability(from, "return-path", true);
+ migrate_set_capability(to, "return-path", true);
+
+ migrate_set_capability(from, "switchover-ack", true);
+ migrate_set_capability(to, "switchover-ack", true);
+
+ return NULL;
+}
+
+static void test_precopy_tcp_switchover_ack(void)
+{
+ MigrateCommon args = {
+ .listen_uri = "tcp:127.0.0.1:0",
+ .start_hook = test_migrate_switchover_ack_start,
+ /*
+ * Source VM must be running in order to consider the switchover ACK
+ * when deciding to do switchover or not.
+ */
+ .live = true,
+ };
+
+ test_precopy_common(&args);
+}
+
#ifdef CONFIG_GNUTLS
static void test_precopy_tcp_tls_psk_match(void)
{
@@ -2737,6 +2764,10 @@ int main(int argc, char **argv)
#endif /* CONFIG_GNUTLS */
qtest_add_func("/migration/precopy/tcp/plain", test_precopy_tcp_plain);
+
+ qtest_add_func("/migration/precopy/tcp/plain/switchover-ack",
+ test_precopy_tcp_switchover_ack);
+
#ifdef CONFIG_GNUTLS
qtest_add_func("/migration/precopy/tcp/tls/psk/match",
test_precopy_tcp_tls_psk_match);