From patchwork Tue Jan 28 13:54:23 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: 860395 Delivered-To: patch@linaro.org Received: by 2002:a5d:6b8c:0:b0:385:e875:8a9e with SMTP id n12csp360608wrx; Tue, 28 Jan 2025 05:55:22 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV7mGiUZ2epm9sfm4joPNyDlQZC97vx441Z6wg45RrZCpO3DuUTQs1xG7U8eAS4/oh1eAwjJQ==@linaro.org X-Google-Smtp-Source: AGHT+IHMG652O/WcGJP17Mt8SicHLK+QbT1daAF5galdB1jfR1BcEIgUDPkEFsTPZytxG9rxLxJK X-Received: by 2002:ad4:5e89:0:b0:6e1:728c:a5d2 with SMTP id 6a1803df08f44-6e2366ea793mr45436096d6.6.1738072522317; Tue, 28 Jan 2025 05:55:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1738072522; cv=none; d=google.com; s=arc-20240605; b=eT2j0zMT0W6UJlFmX+XhnIB0c1gu/nYxycwZibhd5tuXNHJ7kRs9UxCzQ1niu+w0YN DbNOts5sGY9YDnzyDDcfCFnfdk+uVmrBKtuvJDp5FZna+w1YN1uynxV2H4AMyYbvPamO 8rdJIKUTdtyPnO0vb/fluhgJ9IgwAJX2ax32hikLRvSzl7Yd566ZhviYtmv3Tc09WEy3 O7/Miy6YsXcgwF0bgpsVO5sugoFd4YjT2eQu9vzEwMo0jswoNS4Xwg3jiBRLPiP88Kpx D4W09C6SMBM7htyQUTgqhxgQEcJ2cWltS9BEXBnL+Lgg615BVLQUpO4XIkdobdc9q16q MbpQ== 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=xFX3tCyD8J8AsK027Or5bRe/fC+DXtJLFTNEYqXZkJ0=; fh=he6qF/KMP6eFixTgylxvrlgxhBxgGRgoUCHyk8cWuiE=; b=CX4AO9ht+jJokHnXZ9DntZSyGB2YVXwqZE8gDSh+aDidrMw4wGV3D5AJniNRkhnj9e vkrImPtzX673TTZUD7H6AItuQFe69kFeacnZi5v4+oqrWDhH2UYsPrenqeo/05dj/j75 sxjF6KVR23UffNKOt6+4TwVRn/r6dnChbzC5nVSX6J0dyNY9twXuBlWTVTjsNta6S5Dp vFUafs0AITFbosrq2fFX0H8CojCugqo8A+WeROJ14TrJkmF+wDmr8sMagr20IXsVJHt6 QbmdAWfeK3oYQgj2BzQqRdMfROtYZ8m7/1pxc43MU4WdAzHIFZBv/yIiUFTT44Sxncwj MB3A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KzKpqIB1; 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 6a1803df08f44-6e20525c236si132657546d6.4.2025.01.28.05.55.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Jan 2025 05:55:22 -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=KzKpqIB1; 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 1tcm3L-0004XO-S6; Tue, 28 Jan 2025 08:54:57 -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 1tcm36-0004Sg-Tw for qemu-devel@nongnu.org; Tue, 28 Jan 2025 08:54:41 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tcm35-0006Yn-A3 for qemu-devel@nongnu.org; Tue, 28 Jan 2025 08:54:40 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-436345cc17bso40353585e9.0 for ; Tue, 28 Jan 2025 05:54:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1738072476; x=1738677276; 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=xFX3tCyD8J8AsK027Or5bRe/fC+DXtJLFTNEYqXZkJ0=; b=KzKpqIB1fQ7eS0wvaQ5VJeIJBGjxaOmmXyMClK+RF/9ckMQ6+rE7Km4rR044ramPNV nhLZPoLpk+Dy/4HPTykpdyabeVL93qmVxpbNnOAcd2mbC+2yI8pVhUN6TJVr+SCXCYdp 4SeL50RgUFJNIAGmwjbdV6J93Uj1R0OvruLRX20XecQEOE0yy5iE280FYr6SItvPeSID b2QZUjwKuLAduAD533iE+godwxiwaO+IXEV6zX06GG+tAOkpnMhf90PRbHeOBP7OGX40 BVzHiv3HCCjse76yZMIbhls8XAgz3ZoHtzrWda+IXRan8A1TjMvZWiijXd6PiAx1mOe1 cQcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738072476; x=1738677276; 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=xFX3tCyD8J8AsK027Or5bRe/fC+DXtJLFTNEYqXZkJ0=; b=iV9hWeIZfqSYZfKq9MLp1UAzeXH7sE+O9XTRoX859yRH77uZGZQ1+4WW0JIRz3cSSw mvxYA5iR12w96VRZx9mf34rGWYeKENO4Wq4zHYNqzIINmmojJ8jRFlIUIntcfj04QayV qrqnH4Vf8P0+s/oOTNe0fYDV1PFLN+v0xuOFsMTF3olBQSRDFxRZpv36jDegBhl8tcBT u6FhQZEJCB25JF1XG0KwRfTWWzU5ct4JRES+Gqdjo/NTRUr0JzP/RT/26G+I2VqUq9tz 7Xlxag19bZ0ctHZawd6LEGAiiXSl9rakiF5tuhdqMQep8xp8YYIQF2pTBv78Vvp7VAMB A4AA== X-Gm-Message-State: AOJu0Yz35AB+W36g2FPK5CQOXzotD+febkN5juDE7UGZeQpJYMgE/DvP 0K3prAFMja5l+D+1b5F11RR7nyomvPuDDhydBX86GEonyAsGi4x52Gybl4ygR1y3k11MgPp3IZ+ TVNg= X-Gm-Gg: ASbGncuK1591MMN8tB+fuKYOSKEgkg5/bqtMmwA7ltMFsznuTZgLpagJy2LM4xlKMVt ojKOl7L6XpOsRDM+sBN+1xv4WCr1OHc9aKqSVT0tjRRcyNf9g0cJtdiIdFl+KCvb9Bk1Hdd6pFY PCTBV1yo+gnRTBajmkS3YV/1ubzvklJA5u2E70uJdNs2DCE28i23iTZzaSGHWnViuuixPQeCP03 yjgkngZ3C3/slQzB6rjReeQS0moPyVrrZbm6k8hkZfsNqwm6rFgm3a3k7XNZuJGMdAejEhDQnf+ K4WEztWerLUGxY8PqOu+eDBAqOdez+L6/dsyNyWIbhLuIWAb81hQl1b2CYz4ESmq5w== X-Received: by 2002:a05:600c:4f48:b0:42c:b16e:7a22 with SMTP id 5b1f17b1804b1-438913cb740mr458739165e9.12.1738072476039; Tue, 28 Jan 2025 05:54:36 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd5730a6sm167998125e9.35.2025.01.28.05.54.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 Jan 2025 05:54:35 -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 1/7] migration/dirtyrate: Do not unlock cpu_list lock twice Date: Tue, 28 Jan 2025 14:54:23 +0100 Message-ID: <20250128135429.8500-2-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::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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 &qemu_cpu_list_lock is locked within the WITH_QEMU_LOCK_GUARD() context, then unlocked. No need to manually unlock it. Fixes: 370ed600296 ("cpu: expose qemu_cpu_list_lock for lock-guard use") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Fabiano Rosas Reviewed-by: Richard Henderson --- migration/dirtyrate.c | 1 - 1 file changed, 1 deletion(-) diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c index 7c955894e47..4b94dd7c500 100644 --- a/migration/dirtyrate.c +++ b/migration/dirtyrate.c @@ -174,7 +174,6 @@ retry: if (gen_id != cpu_list_generation_id_get()) { g_free(records); g_free(stat->rates); - cpu_list_unlock(); goto retry; } vcpu_dirty_stat_collect(records, false); 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); From patchwork Tue Jan 28 13:54:25 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: 860394 Delivered-To: patch@linaro.org Received: by 2002:a5d:6b8c:0:b0:385:e875:8a9e with SMTP id n12csp360587wrx; Tue, 28 Jan 2025 05:55:19 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWCCECdSsV7CCX5duQYRMdImztJyJA4SUI+eziLn0iDHW9xqKk0q7UgLdMkJGDLzWKNnC1NnA==@linaro.org X-Google-Smtp-Source: AGHT+IEC9cwHe7H04YOuqtXiNdkBDvvOrb4pqFX4B/FJDkMs3l6k6m7lEs6ubYX1Iv/vnroELEkh X-Received: by 2002:a05:6214:2483:b0:6d8:9002:bdd4 with SMTP id 6a1803df08f44-6e1b220c883mr710521626d6.28.1738072519616; Tue, 28 Jan 2025 05:55:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1738072519; cv=none; d=google.com; s=arc-20240605; b=gPbvlPuIPCvSbeWziVPP+8NnsG06qrGjO4L4FyPoqzARPOPikCYj59ITO4E9u3S5j9 86Jp392PTB5cxt8lNZgzDZf4EWZdF4RUCU5/I9yG0Sb2T4TXLqfF1+sL1mBi1/Pgzpmh d14MRnxRKOqAqYRvpniAR3O0LIsWMP8agzYVb86fFQfoD05mrXN88xA5sK0ciEizuccX fBt5WPf8ifVAHUCQY+kYquxaJNmttSQv5gWZaVWB/b4WAIKG8ywaLUQVwkajp1ns4vk4 o2FHIZLJuruR5V8NNCVTqu/D8FMwio0geBM6wYmTG1c7UncZxytg97hY+5rSS9FiQsTm 54TA== 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=0i342P8VSr9afA5LND7tALkWhr4DBdVvCjT09Me9Agg=; fh=he6qF/KMP6eFixTgylxvrlgxhBxgGRgoUCHyk8cWuiE=; b=jeXBBdKLJHVke6wboXHia9feYHUIoNbC8/3YcrP9OUELsYwlFxSCMXMVINw0MhBdKR yjiW1YYZauXcn4l1e0Adu1jQbrs9LtrEDX3qsZOVoit41LsxvOLK4NApWA8xtKqlDKQ5 pIwWralVD0yQRmSbd5K/kAEoDmlstXT92tlPyWPBDKU99xC2mVjmzAiDroJfouQ60Pcl NR1zlzKYdoSkHbCw0s+yjyzxYGn+shSeGk+A/6wdDXIk6a1R1YLq511oHljnDSbFqggQ 4E162hJDbIrBALZ4YM0HhzQpHmmLIbJcVe/daFvklTNeTivaXhbEXwpVptUJ/x9I7ExY 7yOA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PeIXKkOv; 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 6a1803df08f44-6e205f12322si117764846d6.354.2025.01.28.05.55.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Jan 2025 05:55:19 -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=PeIXKkOv; 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 1tcm3Z-0004a9-C3; Tue, 28 Jan 2025 08:55:09 -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 1tcm3F-0004WO-Ke for qemu-devel@nongnu.org; Tue, 28 Jan 2025 08:54:51 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tcm3E-0006aW-2m for qemu-devel@nongnu.org; Tue, 28 Jan 2025 08:54:49 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-43634b570c1so40017535e9.0 for ; Tue, 28 Jan 2025 05:54:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1738072486; x=1738677286; 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=0i342P8VSr9afA5LND7tALkWhr4DBdVvCjT09Me9Agg=; b=PeIXKkOv/DI7xdIOEg1AeLXDUInspFnBiL0+1hVgMGWhPfypaavq8oLz0BY0TTnpGg 8Cb0XfpIKjTILIV79vn8g0Yj7krtKCrR/apskwdUsH5P+5xy3aF8Dj1PdYF2mins9RwI uSpt01iDeLpKvxPM+sij0BhO5AVdUCkTAHJGZLpd2aUqoMLzQzM7SzXkVmYKRFPApKKr /zUrjQ0VjHE5izYNk2B+CD1fN7su4UBqcfEilspEfs2bd5hwLV5ODXjBNhS1yeaaAZgs jNuOtyxdAY+TJyQ013h9bQVvDSFWdqgdVtOJaACG7m1alFLtzNRFzJW494Hm7rbnKujy kODQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738072486; x=1738677286; 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=0i342P8VSr9afA5LND7tALkWhr4DBdVvCjT09Me9Agg=; b=TptS064fgIsa7hRlYlSsnIPNgIGfZxwbCj5iU/B5GJG7wjQoFNf2RqPskL76rcatrW fKa/ulm3IMsza3K464ygCxtsrpdKZASJ6bfhtTtMNNFoxksspZRyaflH15w1l3BUIner 2jiUra3vvN7zgx6xRgC569einNPaC09WoCDEP6g2GNEEQ6ABWjHXcpJQpqnW2KZFN9St bZapQD/OnrA+2ahZDnoZmzN84kYr8tsyx6ftWC6aD2UH5eTvDJGBMZ98gMEQS4M78CDK 9IOTJ/e42Kiq0ypP0HEUeJvlF7HBcLls+afrHBH7lDhuuF1khcqZrC0CooQBK6Yc+zWO ikcw== X-Gm-Message-State: AOJu0YyCEOtCR/iBnfiOZXc6Vhv1hrWcdx8Q0DayRMgRSMHeVVb4BwQg +Te5Lp5qd8PiTQkvi0Jg5wb6zOZR0KWnX1bzSFP2C+owMv748rYaGhgmXZ1vyaRPkCVAM+tsig6 mBpI= X-Gm-Gg: ASbGncvOqgfbLHD7YLme5Q1KFqH81WuRnjqYQxAZufWNDVDgT/G4faIIG05+qLascKa wcQoD44OIFE/fNgkyGtn5Z3Yi+rGKVGd23ti8/56fY+KXJUnm+zeXSV62Lvfr4Pf2dRj728r9YX AfCcvdwwDIT7XyN9TXapim9of/Fg5NwsZ4DWuozAu8hG60Lxe3otx7mJX2SCRlusET4w/T5Ii2u ITZilxIgjC29IQRYjkNoYE6t2qTJJ+vhbxsOlm1NYNynJ6e3LnAFXjO4YbsL3hDaCQW/nUOohtS f5MLVT++aWqA5KKdl1qDahiwsg070sUSiqrIY9FwlARNvE+217V+5D5o6Gx/2Nw3MQ== X-Received: by 2002:a05:600c:1f82:b0:436:fbe0:cebe with SMTP id 5b1f17b1804b1-43891452f6emr461566115e9.30.1738072485683; Tue, 28 Jan 2025 05:54:45 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438d75de282sm11809185e9.2.2025.01.28.05.54.44 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 Jan 2025 05:54:45 -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 3/7] tests/qtest/migration: Initialize MigrationTestEnv::arch early Date: Tue, 28 Jan 2025 14:54:25 +0100 Message-ID: <20250128135429.8500-4-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::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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 Some tests expect MigrationTestEnv::arch to be set. Initialize it early enough to avoid SIGSEGV, for example like the following g_str_equal() call in migration/precopy-tests.c: 954 void migration_test_add_precopy(MigrationTestEnv *env) 955 { ... 1001 if (g_str_equal(env->arch, "x86_64") && env->has_dirty_ring) { 1002 1003 migration_test_add("/migration/dirty_ring", 1004 test_precopy_unix_dirty_ring); Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Fabiano Rosas Reviewed-by: Richard Henderson --- tests/qtest/migration/framework.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qtest/migration/framework.c b/tests/qtest/migration/framework.c index a3bd92a9519..38a0a1a5264 100644 --- a/tests/qtest/migration/framework.c +++ b/tests/qtest/migration/framework.c @@ -938,6 +938,8 @@ MigrationTestEnv *migration_get_env(void) exit(1); } + env->arch = qtest_get_arch(); + env->has_kvm = qtest_has_accel("kvm"); env->has_tcg = qtest_has_accel("tcg"); @@ -948,7 +950,6 @@ MigrationTestEnv *migration_get_env(void) 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"); env->tmpfs = g_dir_make_tmp("migration-test-XXXXXX", &err); From patchwork Tue Jan 28 13:54:26 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: 860396 Delivered-To: patch@linaro.org Received: by 2002:a5d:6b8c:0:b0:385:e875:8a9e with SMTP id n12csp360670wrx; Tue, 28 Jan 2025 05:55:28 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVJbijcQHOw+NVjhbhDBRPYrFlo2JxJwHW4Ws5MjbRKhuzsfxDf1Wj2sWqE59Xi9dqcCU2UNw==@linaro.org X-Google-Smtp-Source: AGHT+IE+CTsKpwYJmYRAF0orp9vHU578/ecGuPgOnl7CTc9gcGSkyyrtKqEbswMpBodIVGEKMo7F X-Received: by 2002:a05:622a:1a91:b0:467:53c8:7570 with SMTP id d75a77b69052e-46e12a56915mr774294241cf.13.1738072527744; Tue, 28 Jan 2025 05:55:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1738072527; cv=none; d=google.com; s=arc-20240605; b=EMrQupPEjvgaOpai6vglJ/4l5wy+JHRge/2Ssasc5GYCfMksLIAbClfpP/DWJFmqhT 59hCjf3uiu9UTrp1b/hUmQIlc7MOLGKItJ9/zqmv9CMBDp64W2z8+aU3WOnauKIhYaIF FY6alPXT//45ReOZQFQo5sdgTwkcXmgStmFHp7xZ+QoTphczFnPd1PmZA3PUPmdf93JG IC70qTvVv9mJd9kHexfAIooCxsZOlUbnAO5sPiOValhfDDESPdfjB4G131IbNrZhH3o3 yrzA/1Jv+0Sir2pLVfRNyhcaHR1y42ZJHoYXV3uEUh4xHJ7FrA50uKVycgejczr34mQn aJTQ== 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=Js4tcXY+4Im8Bd7IwohrqklQy95jFm8lPyjSB87jskE=; fh=he6qF/KMP6eFixTgylxvrlgxhBxgGRgoUCHyk8cWuiE=; b=KdAWC91czQoIRxoLNloj3ZHioN+MzeARXcwk2/BJv8Bj3+X0KAXZLAEOHACvDC5Hsl +MJPtYAo8IH85Ee2IcuGV+SU6ASSp2ynb2KrswIKw3Uy/fusTw/90u0aH534b1oUKVRc HaLpeSzx7NgPnD0VpAODItyVFtih7iAGxigrzlAND6J6bSuGRgusEnjJy1JvS0ckcZlu eAFZaeHVW9VbpmeaePXqQYyv46pKIJUYrAG1qZekQd+Y5u0SujNBsPvUAwsepipkUbIN ehYAOVvItvxipogOz07oLVBOE15gfhHSsvphxEUEg36kSFNqI5utNxjx7+q+KTBa+HUH YLvg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f6CYeyWG; 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 6a1803df08f44-6e205f009dbsi129078486d6.286.2025.01.28.05.55.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Jan 2025 05:55:27 -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=f6CYeyWG; 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 1tcm3b-0004i5-T5; Tue, 28 Jan 2025 08:55:11 -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 1tcm3N-0004a4-Vg for qemu-devel@nongnu.org; Tue, 28 Jan 2025 08:55:03 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tcm3J-0006bB-F3 for qemu-devel@nongnu.org; Tue, 28 Jan 2025 08:54:55 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-436a03197b2so38154805e9.2 for ; Tue, 28 Jan 2025 05:54:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1738072491; x=1738677291; 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=Js4tcXY+4Im8Bd7IwohrqklQy95jFm8lPyjSB87jskE=; b=f6CYeyWGo5k2AY2zrIcK4hr9B5p4LWdHxiUsS4ERRIScORrQFPOdYKrCsypK739oOR NekkF+IcC2cfPTlo2WGUd5dKcxoQ73TnrsUlJ4Vrc0q6e+6l0J6oV1n86i2HMn434QSP j/IB+WpcUnrjzdmmjfA1u2hWYmBSfBmcSgUJ98sfgDAcfwAydQaBUKAsI1CtFe+X9XG+ 63umuBXtNUwoRrghSVv0b3yj/wVtyEIoe6PKWQjGYOlaERzGf3TZ30Uji+I5JiMiecZg nkJjC+WrF7/dC8PRurFw/Y9hsS7D+tS/ZVaxtSLJlpgmRcWOE2Ox8WSFNAmDsbKLcDfn wLwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738072491; x=1738677291; 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=Js4tcXY+4Im8Bd7IwohrqklQy95jFm8lPyjSB87jskE=; b=mOX5JcoFyKrv0jPGzHgmnADxfr89CteAFE4y/vH+6jqRJOk7sbGwM6xkc7k+IsVUu7 vemh592Wg8BFcrRhJvzOksv77TI00wMunQq3MoP6AwwbUv2UAjr8zZ+lTfUBwunk5y+T RLCvMCd2sDfyzrSOyUZ4nbQmc0lQx8jM+ps+SQZua8ArYZzvFYFTtv4DHshMHKZs0FlT qLgaWzxZH2DzKVHmRKiWzY4RNWbt/zzksh80afjnf7m2JXuaLWjBnzEhNKNpXSxYGZvc 2j8PLesVgyF86EZqBSuk6UAvC8UV4JdRG4g6LiHGzMr0xWmvHA4k4fz2/kHzfPSvWGli 8V8g== X-Gm-Message-State: AOJu0YzgLywAXc8ygC9WVE7mtKyhvViqyYWblex0g7SKNWWtJhlMF7Gc K3LDlFWau5FkOM69OmhE3PYAfhr59CfOjM26W6iDY7FeX2VdeQ2dA5mCeEtB7yezB0ysLiMMIm1 CzNE= X-Gm-Gg: ASbGncsE/ClF8Xifr3BTqo9h7bg1aMaPYSv6KD0QgrlGa48U0FYCDASBf5S6jf4bPNY sG4VNgXmqM9s1B9KgAgm86njYITC2ue+g/+zj/TzO+DExT13/FM9sQIcd+AntAzyOUiJ5lxqgfN cUHfKb7G2FH2n+1dUZ8TOUTPSY1XCwuWg2iVBOMfbzyyZAA3gFtSbw5aF9mlHcHIp1Iaphhe3Cy RYJzaFlY8bHQGB4mDb2KvJ+Cz/KTo1GTvc61V27uiNtF0CVgGj/URTiuem8JLsJ9ZH5AYZ1cIK+ PsGd4awNuKW82IB9ymXh0IQxAkKnb1DDTKUCbEVp/hjW9wMAoh0bEWXZsQZYOvPOew== X-Received: by 2002:a05:6000:cc3:b0:385:f47a:e9d1 with SMTP id ffacd0b85a97d-38bf56852bdmr28927870f8f.17.1738072490848; Tue, 28 Jan 2025 05:54:50 -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-38c2a1bb057sm14374562f8f.62.2025.01.28.05.54.49 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 Jan 2025 05:54:50 -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 4/7] tests/qtest/migration: Pass accelerator arguments as machine option Date: Tue, 28 Jan 2025 14:54:26 +0100 Message-ID: <20250128135429.8500-5-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::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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 The '-accel' CLI option is handler as sugar property as '-machine,accel='. Replace the migration tests command line, only using the best accelerator available (first hardware, then software). Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/migration/framework.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/tests/qtest/migration/framework.c b/tests/qtest/migration/framework.c index 38a0a1a5264..e567296b014 100644 --- a/tests/qtest/migration/framework.c +++ b/tests/qtest/migration/framework.c @@ -214,8 +214,9 @@ int migrate_start(QTestState **from, QTestState **to, const char *uri, const gchar *ignore_stderr; g_autofree char *shmem_opts = NULL; g_autofree char *shmem_path = NULL; - const char *kvm_opts = NULL; - const char *arch = qtest_get_arch(); + const char *accel_args = NULL; + const MigrationTestEnv *env = migration_get_env(); + const char *arch = env->arch; const char *memory_size; const char *machine_alias, *machine_opts = ""; g_autofree char *machine = NULL; @@ -296,8 +297,15 @@ int migrate_start(QTestState **from, QTestState **to, const char *uri, memory_size, shmem_path); } - if (args->use_dirty_ring) { - kvm_opts = ",dirty-ring-size=4096"; + if (env->has_kvm) { + if (args->use_dirty_ring) { + accel_args = "kvm,dirty-ring-size=4096"; + } else { + accel_args = "kvm"; + } + } else { + assert(env->has_tcg); + accel_args = "tcg"; } if (!qtest_has_machine(machine_alias)) { @@ -311,14 +319,12 @@ int migrate_start(QTestState **from, QTestState **to, const char *uri, g_test_message("Using machine type: %s", machine); - cmd_source = g_strdup_printf("-accel kvm%s -accel tcg " - "-machine %s,%s " + cmd_source = g_strdup_printf("-machine %s,%s,accel=%s " "-name source,debug-threads=on " "-m %s " "-serial file:%s/src_serial " "%s %s %s %s", - kvm_opts ? kvm_opts : "", - machine, machine_opts, + machine, machine_opts, accel_args, memory_size, tmpfs, arch_opts ? arch_opts : "", shmem_opts ? shmem_opts : "", @@ -332,15 +338,13 @@ int migrate_start(QTestState **from, QTestState **to, const char *uri, &src_state); } - cmd_target = g_strdup_printf("-accel kvm%s -accel tcg " - "-machine %s,%s " + cmd_target = g_strdup_printf("-machine %s,%s,accel=%s " "-name target,debug-threads=on " "-m %s " "-serial file:%s/dest_serial " "-incoming %s " "%s %s %s %s", - kvm_opts ? kvm_opts : "", - machine, machine_opts, + machine, machine_opts, accel_args, memory_size, tmpfs, uri, arch_opts ? arch_opts : "", shmem_opts ? shmem_opts : "", From patchwork Tue Jan 28 13:54:27 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: 860399 Delivered-To: patch@linaro.org Received: by 2002:a5d:6b8c:0:b0:385:e875:8a9e with SMTP id n12csp361089wrx; Tue, 28 Jan 2025 05:56:34 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXr5JO95v6ymqgWrToTxCq49Qz6tS53zHJQbu4WAtobiynljNLpRajOiPCrWV3/TcnzE+AGBg==@linaro.org X-Google-Smtp-Source: AGHT+IEiTa/fzPIzF7fm4ZMCmwz9iisKIi+LIIIffcIiQJsj8Scx/DqW52GjiKSKHLZE2DEjrDp/ X-Received: by 2002:a05:6214:2585:b0:6d8:8874:2127 with SMTP id 6a1803df08f44-6e1b216f38cmr655482576d6.5.1738072594662; Tue, 28 Jan 2025 05:56:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1738072594; cv=none; d=google.com; s=arc-20240605; b=ADz4TmiuZZ0efKq6x0inXjCLjcxax5BdH2w7jFflM70YsIpM7RZ+GugaxXo+8f/3xI TZquSfFuikTMIv7tlvjiQoifSn4nCNiT3Ep2oldZM94vKXWnvfB5GbEHTB12o+3AdUdP Tft8hMxovhDw0rypktolWTNwreR6KabmzMKr8PbbfZWJ378QsVm/14c/bOyYaan+ndg4 IjCIC58hgoQYQDpddJi4Smp/8lY7TZa3/Kc9XGbTat+YFWlY2Gjr/n1JoZCUODOuX/XU VQDE+sl9hCUDHYPkvqkbsGtzx/sS67TzpXdEzZJYtLVKHZEmvFpQqSk8aWxcWl8EwHNI MRnQ== 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=sHTZdSk34mjGYxV+5W6LTI1L6AwP2TGsJTRkRZPId30=; fh=he6qF/KMP6eFixTgylxvrlgxhBxgGRgoUCHyk8cWuiE=; b=NtBto7ApbhoL15KF2253d7A4nJ7YBqGFDcxYbY8YYqyxxfZuNjK18Hj4/mEm34BTaA TmQfPMFcXiV1OKW1LhC6j1m0gXWUZTe+UpUbIz9uN33MqzNju0oTnxg4YvkZwbMCxlkB Br9o04t7Eqaj+d6SILmR7mjs3qmS0RHedOpCt2WsitpBbK+Dljp68WnA8NbkLQP4wrXK LZj82dvAAI8Wf1FwRL9r2jAqWJw0beJ9EkrzuN5PpevaBRyTJgqIV1hvbe67ZGUAHJ9j Ek716JO8kdoT9Z4TEzxt/lVHHeDa0ohrhBkPZgw8LzrrNU/hUQlt+3XQjXxu8NqAFEXE exnQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I6+cN42I; 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 6a1803df08f44-6e20525c53bsi131467346d6.36.2025.01.28.05.56.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Jan 2025 05:56:34 -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=I6+cN42I; 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 1tcm3d-0004nb-IW; Tue, 28 Jan 2025 08:55:13 -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 1tcm3Q-0004aj-1j for qemu-devel@nongnu.org; Tue, 28 Jan 2025 08:55:06 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tcm3N-0006bx-JP for qemu-devel@nongnu.org; Tue, 28 Jan 2025 08:54:58 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-436281c8a38so39833745e9.3 for ; Tue, 28 Jan 2025 05:54:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1738072495; x=1738677295; 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=sHTZdSk34mjGYxV+5W6LTI1L6AwP2TGsJTRkRZPId30=; b=I6+cN42Ic3NNltT4lzPMeS2CHPf+hkvEmiSho1CRoBjz+jrWPAYgf7laPJD5mUrJvD 86SxBB/MruLeKGOUhtb0Nhk3ArVEGTfpOIay/sV0H69loTkHB977OvvAOVVzuFvS+ZQI 9UbG7/pXG4nyVpeSPmh/5LqFvLrbL4Ndek18Fco7pWP3dJJZIcoztOhaAE00b3lYzXhj MhB7XhjAEhRs+Ec1ovp2wK1KYXsE7eK5qNWlgBX1N41wtINrFHJss0+Uz4hRGb6CPx3k co+dU3uQB7Og2gNGPo3pGxIq3gMb938Md7zUS+w7E3Jaye5qOZOryfVIE4kION/vq2sX 2UiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738072495; x=1738677295; 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=sHTZdSk34mjGYxV+5W6LTI1L6AwP2TGsJTRkRZPId30=; b=qPKzqUIK86ZVtDWT4SgOt712NU8/WCtXxO7wGt/OS6WYrnYJUVoWHgQ+s/V93VCL46 YVelrh+6kRcCcYTquH1OxZrdHnzizNZpzCU1dwWuIb4OWRkSLndpzcxFIBLJJ2W3At99 Wt6Ik8o1CbMaUpEG3j8JXqoQJTKQjs7aSiGzJY1GhSdmkvnzG3ASe1pEM59lCe5Idu0o 6tLhv4tI3UuW0XC7Zmm8/xOxhdei7ARzXWpXA4N+UscwAv46X0vwZvuTw8l/AOyXHWSq WShjl200vBk9rohvUVoBy98Xtz8C6zawxlHEshdInF2qPG7M7UjkS8a9dZrULqFiM/t+ ZesA== X-Gm-Message-State: AOJu0YzasxNsAf4BmpYeyLv0NjUkdPdxj8jymwgsBvN3BjbFCMDimLpw O5fhAw/KACORDtwICGmEa/l0qbEGemtAAAJ69/+ujR6rF/JUEpg4vgz8HnhIrrsQbVHl4SVVXBE sgBw= X-Gm-Gg: ASbGncvp6kkAzeSkcfmDWPnA5NORkdZmy+dKgf0VTWNEN4Sg7F6c1H22D4PCxwjZwVk mYNJXR6jh5nEgzUjCGLRZPLwsMnlsyn2ZnMn5V12cKIRy20B90ZYrps7oJAB5IRjvMurt1emZ70 UmM5Z1BG5/XJ8eTh3b/MOR7a+0p3q9UhvGtAEYnY62ZTzt54Q0UDGP2uffjOPLgFPII9byIzlGI k/kW3LQI6crMIyqBap/PT99ym2b0nOxtTvzoua0PSdPgYXEdWOkaYfS5hPu1QpKaoHlw+pma0ju xzOc6wECXljsoQktUGZ/rGE7XilszQKfOo9twE53b9pvFRUgqXjQ50uqMH7gqtzf0Q== X-Received: by 2002:a05:600c:1987:b0:436:faf1:9da with SMTP id 5b1f17b1804b1-438913c68ebmr397739205e9.2.1738072495662; Tue, 28 Jan 2025 05:54:55 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd507dc9sm172973355e9.19.2025.01.28.05.54.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 Jan 2025 05:54:55 -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 5/7] tests/qtest/migration: Add MigrationTestEnv::has_hvf field Date: Tue, 28 Jan 2025 14:54:27 +0100 Message-ID: <20250128135429.8500-6-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::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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 Allow tests to tune their parameters when running on HVF. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Fabiano Rosas Reviewed-by: Richard Henderson --- tests/qtest/migration/framework.h | 1 + tests/qtest/migration/framework.c | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/qtest/migration/framework.h b/tests/qtest/migration/framework.h index 7991ee56b6f..76bd4dc1a95 100644 --- a/tests/qtest/migration/framework.h +++ b/tests/qtest/migration/framework.h @@ -19,6 +19,7 @@ typedef struct MigrationTestEnv { bool has_kvm; + bool has_hvf; bool has_tcg; bool has_uffd; bool uffd_feature_thread_id; diff --git a/tests/qtest/migration/framework.c b/tests/qtest/migration/framework.c index e567296b014..5629b8ba4e3 100644 --- a/tests/qtest/migration/framework.c +++ b/tests/qtest/migration/framework.c @@ -945,6 +945,7 @@ MigrationTestEnv *migration_get_env(void) env->arch = qtest_get_arch(); env->has_kvm = qtest_has_accel("kvm"); + env->has_hvf = qtest_has_accel("hvf"); env->has_tcg = qtest_has_accel("tcg"); if (!env->has_tcg && !env->has_kvm) { From patchwork Tue Jan 28 13:54:28 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: 860400 Delivered-To: patch@linaro.org Received: by 2002:a5d:6b8c:0:b0:385:e875:8a9e with SMTP id n12csp361142wrx; Tue, 28 Jan 2025 05:56:43 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX4btY32bTe38UD+UMJd7i/siE+3jWxs2IM04etMjs3hA8KlkAMyhyS2rDRoYKWI6IaiFIFRQ==@linaro.org X-Google-Smtp-Source: AGHT+IE8tdoYRvy1/t6mZ9giUteXdFVWAxfdPIx+2+FrAJwSdLdPJeWDyQ3y4xwmvcdBnfPxxOW1 X-Received: by 2002:a05:620a:838e:b0:7b6:c540:9531 with SMTP id af79cd13be357-7be6321bca4mr7700923685a.18.1738072602844; Tue, 28 Jan 2025 05:56:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1738072602; cv=none; d=google.com; s=arc-20240605; b=KYWmA5OA6HtGcr7Pet+n6YYBjzhUgi2qX+9wmMV9PvizwlNk9tBKt81FO4UPGETOiv osObeXDalpy3Uoq76DFESwUZkkJUbLo3ceW/OPWMG7vF07ZbsOkl+6LXEX0QLC/rP0gC Zg970R1cxBTb4lliKp4lhdkYzbe9vSg7eenUr2NUIz1HBvHJgtqm+1N7dOnScjBtIS0l qsENYjlb5Yr6fw65inom4rGy/7/eDHcbdAXZrM/qVhdzmXOM2A/xRHIvDGznK40EPYsa 5CN6J1SKiqmIqi/NbLjPAyGniJEWhfnSWdHj+gtBB/L/BkV+8F4oRHvV0enUKi+C+u8G 37AQ== 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=NfNuHQWNeJu5X2wCDgIQnnHrGGyk47oR/kdhbtMYcjw=; fh=he6qF/KMP6eFixTgylxvrlgxhBxgGRgoUCHyk8cWuiE=; b=eYNfnL6DwQGxZhAATBgqTT2tR5FWakAswA/sDx17FfBi5KaWNInSxwx2YaH6YpcbZu Of1FFZIv1o7jPzlQTkx+mClT/fVP+a5mSCeEN0HS3Nc5iBvY0OObhZ6B2UegAelfyTwt IcyoywF09vX8mKEd9gtWOLbT/8oGD9zPmFmbPH4G9IfDVydkp+ta2ekWQ+Gxk6j5W5QS BBmp81tnsUaNaexwa7xxNZAPjWpT523H9UgceEsCkDJ50u8m1/XLwmd6OTRdfUA/hErg Xuns7YKflc67yl2fJ00nCZWJZpQdZvS0lFkCZC9TFNvpPcK6xt2p5oA3NCYpYI8r228M OtJA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AEVHp+e5; 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-7be9aee1109si1399263285a.198.2025.01.28.05.56.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Jan 2025 05:56:42 -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=AEVHp+e5; 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 1tcm3d-0004mJ-9C; Tue, 28 Jan 2025 08:55:13 -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 1tcm3X-0004eT-JA for qemu-devel@nongnu.org; Tue, 28 Jan 2025 08:55:09 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tcm3T-0006di-HD for qemu-devel@nongnu.org; Tue, 28 Jan 2025 08:55:06 -0500 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-385e06af753so3090609f8f.2 for ; Tue, 28 Jan 2025 05:55:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1738072500; x=1738677300; 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=NfNuHQWNeJu5X2wCDgIQnnHrGGyk47oR/kdhbtMYcjw=; b=AEVHp+e57Gd41rHDlvEsxaCHvRpz8C8nKq/vP8rT8vuiXgYysVcVqCP3zgnncC+baq 2KcsT/2yAiQg9ZfIP52SaE44rrCWK8N+wX/ggl5nYp+4K0joJ1K0JyDwB8ug838MeNj2 Ft8rwEpp5IH/y6N9krOJhZNBBc+t5Wx0zTBaqGxKLOLaVyKgwi6mw7gZOTeM4fPkVct7 4x8xZ8pECXzF41McTTEXjNCZHX7oONuvgmqCcedgifJ805PKk8usHhwGsaFAWIV3tFkU YPYJ1rcnraGUOT3lNpsAnMJCxmv9L4TiqqkkrQZI8aGYYL2DWkeggGGmVkz/TJi6EzNn S1bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738072500; x=1738677300; 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=NfNuHQWNeJu5X2wCDgIQnnHrGGyk47oR/kdhbtMYcjw=; b=oE79qVJU37NHqyGk0FpQogPEfdCfXU2nQzdi4W5tDdJrnAEn27l5tVJoP0BjYfck+8 6Al0Q7FzwRcrOeIZAXBFNNitdSakQHSNQ8yo6FafBRYwZJrpoXAyIYoN4V2OpkZPQMSL 8Rg0Is8TFYVA5f9EESJzTAj5qMGsOHvgpL2Ue6XJvLIjx/FD5doOcfdcyamjqesWVnIY 02yb+qhBaDDrut+rvKZO/3TjYLWMQBA8PWcxgIQSWZhpKVnlUaIk/UH7XET+3u1URjOD 2VED6B3nAUwvqnksvNKz8KUTkn0Ooz1b5+oGfyrVh4TfrhFY15K6iBL7PKvoxJon2cs6 +E3Q== X-Gm-Message-State: AOJu0Yw3WvZKU5LdHCwn8pGSkuFEm2A+pWoBpRfnQVZIfmrNYmDPWSiz ScGgFhpoQ+ziC3l/C8Fu83rOxV8WqKn91Qv1+N76ltuLCiQ5gHyDB1lmpbJ4mXqPsqAFIlxzhR8 vyl4= X-Gm-Gg: ASbGncuoeIzrF3a9oWjeUUcWMXhs9EbX5niWptnTH48rgPPW+N3Re26hTiJo5Mb4StS 2ynx8JzRndMT4OcS1sk3s8ydCqU96t0d+TUWEr54/mNl8NIvJPRcKEyDq8odCw+Qx9y81Rzs3p5 rWxaY1lycIIHtRCuvDLuxkXk61GVN2j3NPeQKDs1n29Y9qvMm0CObH2WZKCRyZ601bHintsjkA8 Pr87QzMWBSwHNmuMFnzr5Z7CGei3x2j8xJd3RhZ28rRJxqSsvuhXuLy+SdTxoTJllyMRIlOuMWP P9LZr1Sb0Y0HCxXvQxCdHScpO64BGotsCHsmX+lukhkVgHRMJT4cDX7CU9EMBquSlg== X-Received: by 2002:adf:eb10:0:b0:385:fc00:f5d4 with SMTP id ffacd0b85a97d-38bf566ce7dmr31162296f8f.29.1738072500350; Tue, 28 Jan 2025 05:55:00 -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-38c2a1bad16sm14540405f8f.68.2025.01.28.05.54.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 Jan 2025 05:54:59 -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: [RFC PATCH 6/7] tests/qtest/migration: Run aarch64/HVF tests using GICv2 Date: Tue, 28 Jan 2025 14:54:28 +0100 Message-ID: <20250128135429.8500-7-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::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.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 GICv3 isn't supported on aarch64/HVF, but GICv2 is. Signed-off-by: Philippe Mathieu-Daudé --- RFC: Test eventually timeouts :( tests/qtest/migration/framework.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/qtest/migration/framework.c b/tests/qtest/migration/framework.c index 5629b8ba4e3..30808de14e0 100644 --- a/tests/qtest/migration/framework.c +++ b/tests/qtest/migration/framework.c @@ -266,7 +266,7 @@ int migrate_start(QTestState **from, QTestState **to, const char *uri, } else if (strcmp(arch, "aarch64") == 0) { memory_size = "150M"; machine_alias = "virt"; - machine_opts = "gic-version=3"; + machine_opts = env->has_hvf ? "gic-version=2" : "gic-version=3"; arch_opts = g_strdup_printf("-cpu max -kernel %s", bootpath); start_address = ARM_TEST_MEM_START; end_address = ARM_TEST_MEM_END; @@ -303,6 +303,8 @@ int migrate_start(QTestState **from, QTestState **to, const char *uri, } else { accel_args = "kvm"; } + } else if (env->has_hvf) { + accel_args = "hvf"; } else { assert(env->has_tcg); accel_args = "tcg"; From patchwork Tue Jan 28 13:54:29 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: 860398 Delivered-To: patch@linaro.org Received: by 2002:a5d:6b8c:0:b0:385:e875:8a9e with SMTP id n12csp360806wrx; Tue, 28 Jan 2025 05:55:49 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWg6Zj0DTmO3xoVgy6SXPUDfAqMfF4CTCpr9d5+JyLr11/AKVpPY/pN9SI2zudGqMl/Lmf4yA==@linaro.org X-Google-Smtp-Source: AGHT+IHCwN5AWi0IILbvVlMMNaqZOoszmNkB38QflZl4brvUEJT9ScJ/Zd4YRqu7jom6QgeQfSbu X-Received: by 2002:a05:620a:439c:b0:7bc:df55:2cd0 with SMTP id af79cd13be357-7be63253e13mr8354917685a.48.1738072548943; Tue, 28 Jan 2025 05:55:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1738072548; cv=none; d=google.com; s=arc-20240605; b=WIS1mUNQlm8VfotOIoaFTdHaSnyZhLqEL6Py21afmsyE6F2sE2UXeHwP5vVAjKLrti ObUc07dHkb6C2KCBBcZpJBKsjnzPIHqj7CLIcm6WSutIeaLB+DKlAWODBubuSaI2UUmG tLZVNARcCYlSOa2UwveeTa7detnilP8IrXcmWCHdwInYskZofeKvGZibdsK719llZP3y pphNBVnNp2rv2yqZ3ctqAn4WdZSYWUHW5WOxRp6pCY8JUrAA2B7IMDqv4nnrb1e7HpFP d5BxeGx3CV3cgl7T6147zbzBEvYT+DLLF0rHWQxpHyxv6lrY+uXfaivB/M62h6dNenRE uMSA== 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=ggA0ewTkbOxosT43tBc3qZcSHcVtGttVuRMmEBH4Avg=; fh=he6qF/KMP6eFixTgylxvrlgxhBxgGRgoUCHyk8cWuiE=; b=LaXTa7KAyrVD5hkvVxIFPRt5xlfQZJRWWHg62kAVcuspi7xrR8UaT9NdNA6ZM10z2+ eX9/mWqFXzcyNxw3gzvslnVCpnuB8xFk6YtkpI7uz5HHDUTEfUSbppRX3ZUwlx5sjJ37 4Upvw7vcBV+8bit7fO0ea2mmReYPkyJxVqYnTm4+TN+ycWNRL3Mf3obzPcE6B/S1dSKJ 8oOMbljjwHQcO6e/SI0aJnwo19iWgQAz+lDDFqa9bxRBnojNpDj/H07ljBEF+B1GmS3N W2z6E0RqsgPPrYAC1mBL8jnb4KfTVrFmatPdDM5Q8W/oe5e43uh9YepDrsdv9cBCf12r EZUA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WNL80UOt; 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-7be9aeeded9si1223432385a.400.2025.01.28.05.55.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Jan 2025 05:55:48 -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=WNL80UOt; 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 1tcm3g-0004pp-VN; Tue, 28 Jan 2025 08:55:16 -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 1tcm3b-0004hQ-3t for qemu-devel@nongnu.org; Tue, 28 Jan 2025 08:55:11 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tcm3X-0006pf-Fk for qemu-devel@nongnu.org; Tue, 28 Jan 2025 08:55:09 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-436202dd7f6so65060095e9.0 for ; Tue, 28 Jan 2025 05:55:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1738072505; x=1738677305; 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=ggA0ewTkbOxosT43tBc3qZcSHcVtGttVuRMmEBH4Avg=; b=WNL80UOtDKMK4bCUSLNrd/AYAhOenlo5JlXmmnioR8E+j6/jUUnFVnVYrSk9csppiZ aj/EBYYv1Zws59vqO8QVFIPbByB66J154KogXoYg9vhMlPFku1afiR9qDiAzuhGboqC0 J2MphyOusLUGVd1WmznuydhRT/djd8JHe14tmAr4LzJ03aC/A/wpsc/7bv2huJ5uiJ6o VaFVKTu7hJwaclyxmRQczIlxycau3o66gRzHfPjIV0OQgy3REFW2L3c5F3Mi+Ewh529l rk9fNyFAwugTdSZ+0j6QUIwwTVow/uLJnftVjlUNn0H5Zm2kfqfAn8cryKaiSumhzeCv q75w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738072505; x=1738677305; 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=ggA0ewTkbOxosT43tBc3qZcSHcVtGttVuRMmEBH4Avg=; b=udJEv8QM5TR9YHtDlJI4ChCLp0aavf6G9/7kTd1siCXQ19VimhKH1PPA9g8szDDgbK 9VAc0Ql0+3keUA0FO3C0HgJh/w+KQUgWsdNwwpdYNDzv0JwH/0SBAOj1ZVKJfj4QR7xa te5U6/CxN6WDDwXhZpDkWv/Och9blnOnouj/QCV5/ZuFGX2znF6cbleZGGlthohDQkcw QI3uXh/gh4u7t5njmkVIU8Ur/bsLEuDiPgbsafIQHcKKqmLI8gxU/X30razZwfS6dE2v PPNY1MmP1n6UPIW+hfYEylqJixUnXY3O4m+QxzJw3KVzg/RKfxK7mPGGd1NdFHSUN08u S3Dg== X-Gm-Message-State: AOJu0YxW9zFem1SdvMrDkRAQjFePhfDMSYmhkKNXlmXfAGsUHAjpCSyE Al524M8+YcJkR3eUSozMOykMjgVrxKb2Mhps1yHRIecXRvwzZeAjuE925SobNxT0hAMqF7ZZip+ EhiE= X-Gm-Gg: ASbGncvyIfjybDA/CUsFNAS9KngjDWU8idV0YcV1fbAEEnlsQwi0XjLJqsmhVued76+ qnlsk2/KjFEYsEwwpLwJzkQAhQFENql+d/amPFnTcGi0fjC2gwdNN0Ua91DafCh8VtrjykusXuh da8N1HUNmMku8bI3mrRWzFxmBxeskIsFYVrLkjbwk6zcQTWFI88T3pjzaGOGfSFjfEB3poKiaS5 /9DO0vibEmnvujHOwaCny6E9ZXMbdFIIhvWm14d0JPM0XRLta2I56+H9ZvGdqF6dDrKsSoO+enS 2UF/pRQ5IaYK9HcOdMFHRUgvYeAZ1J3tbKjfKvTFKVCvwWyZpp1YExra+GjA20jzmg== X-Received: by 2002:a05:600c:4fc1:b0:434:f218:e1a8 with SMTP id 5b1f17b1804b1-4389141c21cmr359787385e9.19.1738072505153; Tue, 28 Jan 2025 05:55:05 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd573245sm170550175e9.33.2025.01.28.05.55.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 Jan 2025 05:55:04 -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 7/7] tests/qtest/migration: Allow using accelerators different of TCG / KVM Date: Tue, 28 Jan 2025 14:54:29 +0100 Message-ID: <20250128135429.8500-8-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::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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 There is no particular reason to restrict all the framework to TCG or KVM, since we can check on a per-test basis which accelerator is available (via MigrationTestEnv::has_$ACCEL). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- tests/qtest/migration/framework.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/qtest/migration/framework.c b/tests/qtest/migration/framework.c index 30808de14e0..e5f0712c266 100644 --- a/tests/qtest/migration/framework.c +++ b/tests/qtest/migration/framework.c @@ -950,11 +950,6 @@ MigrationTestEnv *migration_get_env(void) env->has_hvf = qtest_has_accel("hvf"); env->has_tcg = qtest_has_accel("tcg"); - if (!env->has_tcg && !env->has_kvm) { - g_test_skip("No KVM or TCG accelerator available"); - return env; - } - env->has_dirty_ring = env->has_kvm && kvm_dirty_ring_supported(); env->has_uffd = ufd_version_check(&env->uffd_feature_thread_id); env->is_x86 = !strcmp(env->arch, "i386") || !strcmp(env->arch, "x86_64");