From patchwork Tue Jan 28 13:54:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 860397 Delivered-To: patch@linaro.org Received: by 2002:a5d:6b8c:0:b0:385:e875:8a9e with SMTP id n12csp360738wrx; Tue, 28 Jan 2025 05:55:36 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXp5FFztVhr9S2JQ5Xd9LXXCue7cQTlqODRJd+DvAMikWPf61F4MNhxq9deNeeivlD3cc6Egw==@linaro.org X-Google-Smtp-Source: AGHT+IGgx+SL7kMkqiJEfVqk4v16DlJK052sUymAErqWo/4LvY1zUvDENjDRp/1n6kfFgkzdMX8T X-Received: by 2002:a05:620a:2551:b0:7b6:cb07:24bc with SMTP id af79cd13be357-7be63251a00mr8269457585a.48.1738072536299; Tue, 28 Jan 2025 05:55:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1738072536; cv=none; d=google.com; s=arc-20240605; b=Yg0sBDeipt/H2l2EwRcaFee+n1VkWlYcoeXsAYKNp25tPuqgUnTJs4B650QXAgf/M4 FuqltKEgAgiEl7zA1K4UbHIecLwhVVwVr7O7AwpyvIFrLEFRYklWAzAMfoZZm0E7SYpT 4YyCQJbfzATeYLLE3WcGjC4ZxvXoIEO9q4lq7rfykMYbYqm363+EJgpexzh74+Pnld4f lm0qp1nQvkfARbHhHnhP0RVm1CMoRsafIPxdGdqNYQZIvtwGpLMx6hHTnvKRuAMJ3yf3 a+BUSPF09vocSfmlVBmKym8hLIriDr6qclK7cY6rsLTo1/ccXOaFPwn22Hpfp2NzqWEr afnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9OqktqB1rxHpsEBpE3GI7u9cs3EXThVaOGL6hvU5oq0=; fh=he6qF/KMP6eFixTgylxvrlgxhBxgGRgoUCHyk8cWuiE=; b=NmPGr16UODH5ANdy0kIQRRTBHBD6Qtd+G0uRiATh99rgBsPUffNNeoi96gSbQ/S7mP INkgf99W/x+CjjRt3JZ2r+Gp8qC4B3n8lbGtziORRGrzXWstsCyyTpPhqrL0qcpCm1Mq u1lLMXYMf12lpBtuVJj5sfy5MzHO4lnK+nY9Q9FpRGcmIwwRJE/uzD+zHl+QT6u+pwYD L41Ymbhhbk7WH1jRUa/jwBZckPZ2AENvvgPTWFNSVydHvDIUwp6DZw6cs9O/0en8ocGo 0Yluwd42s1qK9sC7nl+llzFsWEUtfCM2v1RfiG8RcJOo4SSrV+6MestjHWZa0u4J5Zu2 0FbQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QdTFiorp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7be9ae9465fsi1221726085a.194.2025.01.28.05.55.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Jan 2025 05:55:36 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QdTFiorp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tcm3N-0004Xi-IJ; Tue, 28 Jan 2025 08:55:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tcm3A-0004VD-7A for qemu-devel@nongnu.org; Tue, 28 Jan 2025 08:54:45 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tcm38-0006ZY-Iu for qemu-devel@nongnu.org; Tue, 28 Jan 2025 08:54:43 -0500 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-385de59c1a0so3220240f8f.2 for ; Tue, 28 Jan 2025 05:54:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1738072481; x=1738677281; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9OqktqB1rxHpsEBpE3GI7u9cs3EXThVaOGL6hvU5oq0=; b=QdTFiorpnz4xoVyrlqvbL0rCTvbLC3NbggRrQwpnwt9+7ebnRwUBWJigMmP/CHvUVV 2usHeWa1EGHOOMTqTJsO2xVc9e9J/lhZ20QVKmxm4jQ5c8LaYO0Pl/PYI+QmeIXFzT2x CKJ/8znJb6wWG++Fy+bQVK2I9fWqwB6nmJwns8DDu91FssSSgolGYy7U3QjEYnDEcm0C Yp6bE1UYwTe01bLtJ2fLBuou95gOeY/q84kKoeBzuva6pGjANMOIadUrdgpecQ+uzXKy y+7pMuZqVd5YRWG8nloJ/gWJMTlyz9TqCGM525IyOWjjuTA54V6IquynPGLIFBR/fipE yI8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738072481; x=1738677281; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9OqktqB1rxHpsEBpE3GI7u9cs3EXThVaOGL6hvU5oq0=; b=YtH625zOe61r9UpkerGYqZJPK3/yIvPIjIkZH0I6rs6irofjQ2D+nXe6zQOhE6u+yv vbD5HB79VtbZkaz11c32kw07vQXxtu8hiNbh/mMjUEYh4fR8/hc/ks0PU9S9Muodt5ig hHtJhReyYq3h7cHRdz39Kmv/zCpbMF2JolizY9sVoWKftDsXn1bUoAjqT1R8YZJ8QyLk 4KjBx9RIMUtYheDQvcSNti37zKimC3W5d1ckjqLjBI5m/A7a4+qLIoNwn4LeYjdvB0tf Ny2pPb+M4V039C89UE+PDwFHGuMlQTliK+ZOkJdFELQCZjrysn38Ewh57e6gK07WUAHi 3Kyw== X-Gm-Message-State: AOJu0YwYOmeP7Fd8SZqDyDTJaSJ0nBtcMJIEDaYYsuagknTZzptmnTn4 n93kXdIgn6ufTH+V6JepO0HowqywOcTWWUIyKSu4d6xR62+YTDXmsDv3hLI8aXxmTt81St10rPS Gqco= X-Gm-Gg: ASbGncsb4koew173mNDk2OvvRzHmBS8DmjNoeOaBR7gn6nmKSmix7fy6ZoEbvMDJH2O 3xaxnxwJEbcya6dl9dKe9FTrQfUqRMMpP19125TyQxH+lOWQMS4iawjnTKqs/ZR/9O/0sGzpsGp yPJtwwhdCUrESSDO8XwdhJom+NcRhCAGMU6YMYQXDDXm6E0kKyDAL2dgihZ9WhOexSP9OK0PiMS 8Y7nuACb9iFNB0OcqdZzpAZxNSRCbpi6/9q5JKeDMjHKgl6npaX1yw8sgy2GArcKVFcXdI0zRuu Q2yW1tC5/OAkxpd0DMvrjPizWs9vQ0ol5zcl5Gs196x8EkibnBFaAuFp09O/nJIdIg== X-Received: by 2002:a05:6000:1acd:b0:38a:88be:bcb5 with SMTP id ffacd0b85a97d-38bf56555f4mr37657628f8f.5.1738072480797; Tue, 28 Jan 2025 05:54:40 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38c3ec83e20sm7499727f8f.23.2025.01.28.05.54.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 Jan 2025 05:54:40 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Fabiano Rosas , Paolo Bonzini , Laurent Vivier , Thomas Huth , Hyman Huang , Phil Dennis-Jordan , Peter Xu , Akihiko Odaki , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 2/7] tests/qtest/migration: Make 'has_dirty_ring' generic Date: Tue, 28 Jan 2025 14:54:24 +0100 Message-ID: <20250128135429.8500-3-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250128135429.8500-1-philmd@linaro.org> References: <20250128135429.8500-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Keep accelerator knowledge limited within MigrationTestEnv, expose a generic %has_dirty_ring value, only checking for KVM when initializing it in migration_get_env(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Fabiano Rosas --- tests/qtest/migration/framework.c | 2 +- tests/qtest/migration/precopy-tests.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/qtest/migration/framework.c b/tests/qtest/migration/framework.c index 4550cda129c..a3bd92a9519 100644 --- a/tests/qtest/migration/framework.c +++ b/tests/qtest/migration/framework.c @@ -946,7 +946,7 @@ MigrationTestEnv *migration_get_env(void) return env; } - env->has_dirty_ring = kvm_dirty_ring_supported(); + env->has_dirty_ring = env->has_kvm && kvm_dirty_ring_supported(); env->has_uffd = ufd_version_check(&env->uffd_feature_thread_id); env->arch = qtest_get_arch(); env->is_x86 = !strcmp(env->arch, "i386") || !strcmp(env->arch, "x86_64"); diff --git a/tests/qtest/migration/precopy-tests.c b/tests/qtest/migration/precopy-tests.c index 23599b29ee2..8dcd0ad2660 100644 --- a/tests/qtest/migration/precopy-tests.c +++ b/tests/qtest/migration/precopy-tests.c @@ -983,8 +983,7 @@ void migration_test_add_precopy(MigrationTestEnv *env) if (g_test_slow()) { migration_test_add("/migration/auto_converge", test_auto_converge); - if (g_str_equal(env->arch, "x86_64") && - env->has_kvm && env->has_dirty_ring) { + if (g_str_equal(env->arch, "x86_64") && env->has_dirty_ring) { migration_test_add("/dirty_limit", test_dirty_limit); } @@ -999,8 +998,7 @@ void migration_test_add_precopy(MigrationTestEnv *env) test_multifd_tcp_no_zero_page); migration_test_add("/migration/multifd/tcp/plain/cancel", test_multifd_tcp_cancel); - if (g_str_equal(env->arch, "x86_64") - && env->has_kvm && env->has_dirty_ring) { + if (g_str_equal(env->arch, "x86_64") && env->has_dirty_ring) { migration_test_add("/migration/dirty_ring", test_precopy_unix_dirty_ring);