From patchwork Sat May 25 03:13:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 13673934 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BEDECC25B7C for ; Sat, 25 May 2024 03:14:59 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sAhqt-0006fC-By; Fri, 24 May 2024 23:13:47 -0400 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 1sAhqs-0006er-5r; Fri, 24 May 2024 23:13:46 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0: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 1sAhqp-0004pF-5u; Fri, 24 May 2024 23:13:45 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-6f6765226d0so3693224b3a.3; Fri, 24 May 2024 20:13:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716606821; x=1717211621; 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=ZzD8EfQ/EhvSdLMQvyJg5EvWSbu7FiDHBlj47lHYMbw=; b=YCnFi/PtIDNB3LR5NEdPxbraIEzgnju9XslOKd3IahaIL1CZ3ad4jUczG51k6QKTV/ XZtW+CVLu1avZ7jzrBydKS60HfLLb5tPwmkdM8e7TtT2+IZXwL7tl6/9HA074nadn44K p1DxA0pePHh9ZBXqyHfkJ9AiVVtNhJyU0JUSfBDpA3nYdCghxs0D8Rj9O4WsLKeOLezw 4C+WC/5eFkIkwPU/FHLYRpsk95615Wk2g3nHhtUGf0HTUn+qSkQobsq2NdX0rHR7Rv5A dpdBke5MMmhK29XaBoOwhPpM2q3I5IvNiR6/xTQW+VPo0yq6BYrO+DVPk62rKJnzZbyP S1rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716606821; x=1717211621; 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=ZzD8EfQ/EhvSdLMQvyJg5EvWSbu7FiDHBlj47lHYMbw=; b=HhGpu+T2TaZirNqzj9LlK2A9tr/T4y2TYQqQ3M70jCJQfsr4e+WGnAgOC1VYHC6ykY SUWMrUQxuwgNOyEgCks0RtXtXic5Twd0yJQMt4Mx/IT9ujBwa5WCzcWxeSfiJ14dDygI 0OkBx+Slq/PYzwRioaXMIz+nn3qlOPNnQpVLo84LsCXZr9d7/3+4H4Jh4o379IUUvHMr YQhwShqFQAK9Nl9t1NA1bDyBIRs1R5Uo3rDN0U+Fz1H9lFALE3qFlhuop0DSbzBTvpbm pDjImdW9s4E/2C+ZFPIO5JIqdOA38A2g5GbebTv/ezYF6B/mR0wjfzoHU5yKzxMQ5B61 VPGg== X-Forwarded-Encrypted: i=1; AJvYcCXKHkYiFpZnaVNYJhmwcLPV0fcSaZwMuMm4eOTu3QWsj4BJsJEqiGWGqccviNCtXW29qsW6RVM2KDnBiqNbMEFJyvOxo6OG7XtoG9tCiXe+7aVfxcArun3580k= X-Gm-Message-State: AOJu0Yy+q2nlpdT5DPEfg1CII4P/I5Mkg+CtGZCii5ToEUpNymXKqOKM 8ibcAD/aDpj5D+JCSAPVOIRNYcH3d3qIdZN4TYz8BgG8NQgby4ve23zKyQ== X-Google-Smtp-Source: AGHT+IHFSeCk1C4jNFDY9PAtABM7S6CArJLmkgw46kzkNTqydXALa6px1rFz29gx5Bo1TS6tQYQBIA== X-Received: by 2002:a05:6a00:e8b:b0:6f8:caf2:eeb1 with SMTP id d2e1a72fcca58-6f8f33b1ad2mr4421167b3a.15.1716606821163; Fri, 24 May 2024 20:13:41 -0700 (PDT) Received: from wheely.local0.net (110-175-65-7.tpgi.com.au. [110.175.65.7]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f8fc05a363sm1744306b3a.64.2024.05.24.20.13.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 20:13:40 -0700 (PDT) From: Nicholas Piggin To: Fabiano Rosas Cc: Nicholas Piggin , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Thomas Huth Subject: [PATCH 1/3] tests/qtest/migration-test: Quieten ppc64 QEMU warnigns Date: Sat, 25 May 2024 13:13:27 +1000 Message-ID: <20240525031330.196609-2-npiggin@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240525031330.196609-1-npiggin@gmail.com> References: <20240525031330.196609-1-npiggin@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=npiggin@gmail.com; helo=mail-pf1-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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Signed-off-by: Nicholas Piggin --- tests/qtest/migration-test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index b7e3406471..c13535c37d 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -21,6 +21,7 @@ #include "chardev/char.h" #include "crypto/tlscredspsk.h" #include "qapi/qmp/qlist.h" +#include "libqos/libqos-spapr.h" #include "migration-helpers.h" #include "tests/migration/migration-test.h" @@ -742,7 +743,8 @@ static int test_migrate_start(QTestState **from, QTestState **to, "until'", end_address, start_address); machine_alias = "pseries"; machine_opts = "vsmt=8"; - arch_opts = g_strdup("-nodefaults"); + arch_opts = g_strdup_printf("-nodefaults " + "-machine " PSERIES_DEFAULT_CAPABILITIES); } else if (strcmp(arch, "aarch64") == 0) { memory_size = "150M"; machine_alias = "virt"; From patchwork Sat May 25 03:13:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 13673931 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D865CC25B74 for ; Sat, 25 May 2024 03:14:29 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sAhqv-0006g4-5S; Fri, 24 May 2024 23:13:49 -0400 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 1sAhqt-0006fR-Gn; Fri, 24 May 2024 23:13:47 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sAhqr-0004pZ-Vm; Fri, 24 May 2024 23:13:47 -0400 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-6f6911d16b4so4538830b3a.3; Fri, 24 May 2024 20:13:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716606824; x=1717211624; 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=xwPEk5rL1N4IcIYFt16Y4N39BZIy4DXLe+XVJQA7nDE=; b=H3cDOdCSGxT3UuadpwY8FXsvMgh1gu/+WH++jZ9W9QpAv6Mmlw1n81ModmMihm8VHk 6w5qWFsFbBSCevk7W1H/PqgETw9FJS7PrTs/6vA96/L+uNJdEcT4LKsBWgsQGsxse/RJ afRJib6m4Pb19efHkiogkF08j1u+TW+BRGT9xm+F+1xCSF29HCdumK4cPrlClaDBPGnK v3dbp+jcjAsAJW6NsWGf637ciInRDex6Pc0hd7VcWybHHm9lEFrmzd/UJyRD+K33QjL8 H+BiGjcbjspM+2NbEI1rVEx7nVKS4FEnSzVTOCQOyMPMDe0IYZyoraEKm94BQrZpxy5C Tp0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716606824; x=1717211624; 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=xwPEk5rL1N4IcIYFt16Y4N39BZIy4DXLe+XVJQA7nDE=; b=VurnTnpXtXiNfzUqRd+OiUvQi1kEsAz7A949lgUY81ZySQgy9cPS9ns+Yn0T+L986H WyoY2z57uk9ioYkbgE+mRfb255XReVDTUcrYK0r8JnBDrizYyO6YK5ueEdDD3wPd+CDX IKZ+ejGd4BOivIxAvH35KMA0UdoHZfGp3abW68Jcv42VNDP5TmrIy0c/+1pgSELu+EKU zJOKJbauJK3Hq+J9qyA8Cba3W+3IvNgl93C8JqfgYMaKqY/z068QitNmIEq2ZvBUN/1q E/+8SGjUiuYcoWBZMgDcgm+kWc1jV5xMBO+D2wGYu8B5VoSA0XAWyHcZo8n29PeB7VnW s7oA== X-Forwarded-Encrypted: i=1; AJvYcCVlbkydTZ9p8D0ibToBWLBu20lt2KLlf0/8TwZAmaN2P9UWeHabznv/i9a4X7VNTMGI3LGwk5Ojl6Hcz6lFXYBeRaPqPHrFBZrnaJb6ft2+gWXUX9X6Onld67E= X-Gm-Message-State: AOJu0Yy1cBFbqTsRN7aSojQKXzlh4bv1p6Jsft+05s1ANOVy6DbWsu9h a8RCDxFCtOvN5Z0DprbqzlGN+nWUSxYfq0DiInGRR1ewVYUGCJyxozCJgg== X-Google-Smtp-Source: AGHT+IGyyx7xYnqwGP45J/4F0tefpC2y8EA5HL5zKKwmbdbC6uG6S3LRQIC/EvEyA5QFprFmWXn2fg== X-Received: by 2002:a05:6a00:8013:b0:6f3:f5e8:31f7 with SMTP id d2e1a72fcca58-6f8f2c71745mr4058477b3a.7.1716606824228; Fri, 24 May 2024 20:13:44 -0700 (PDT) Received: from wheely.local0.net (110-175-65-7.tpgi.com.au. [110.175.65.7]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f8fc05a363sm1744306b3a.64.2024.05.24.20.13.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 20:13:44 -0700 (PDT) From: Nicholas Piggin To: Fabiano Rosas Cc: Nicholas Piggin , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Thomas Huth Subject: [PATCH 2/3] tests/qtest/migration-test: Enable on ppc64 Date: Sat, 25 May 2024 13:13:28 +1000 Message-ID: <20240525031330.196609-3-npiggin@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240525031330.196609-1-npiggin@gmail.com> References: <20240525031330.196609-1-npiggin@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=npiggin@gmail.com; helo=mail-pf1-x429.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org ppc64 with TCG seems to no longer be failing this test. Let's try to enable it. s390x is still hanging about 1 in 10 runs. Signed-off-by: Nicholas Piggin Reviewed-by: Thomas Huth --- tests/qtest/migration-test.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index c13535c37d..b8617cc843 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -3454,19 +3454,9 @@ int main(int argc, char **argv) #endif /* - * On ppc64, the test only works with kvm-hv, but not with kvm-pr and TCG - * is touchy due to race conditions on dirty bits (especially on PPC for - * some reason) - */ - if (g_str_equal(arch, "ppc64") && - (!has_kvm || access("/sys/module/kvm_hv", F_OK))) { - g_test_message("Skipping tests: kvm_hv not available"); - goto test_add_done; - } - - /* - * Similar to ppc64, s390x seems to be touchy with TCG, so disable it - * there until the problems are resolved + * On s390x, the test seems to be touchy with TCG, perhaps due to race + * conditions on dirty bits, so disable it there until the problems are + * resolved. */ if (g_str_equal(arch, "s390x") && !has_kvm) { g_test_message("Skipping tests: s390x host with KVM is required"); From patchwork Sat May 25 03:13:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 13673932 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DB5EEC41513 for ; Sat, 25 May 2024 03:14:29 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sAhqz-0006ik-P2; Fri, 24 May 2024 23:13:54 -0400 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 1sAhqx-0006hk-Gu; Fri, 24 May 2024 23:13:51 -0400 Received: from mail-oa1-x36.google.com ([2001:4860:4864:20::36]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sAhqv-0004q9-E3; Fri, 24 May 2024 23:13:51 -0400 Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-24fd4f615bfso6636fac.3; Fri, 24 May 2024 20:13:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716606827; x=1717211627; 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=6GoopJJATWYm8J4AQBO2uEawHJimowUcs3mDf1Js1Io=; b=OGn5N5EClt6PBUOaypB+T4rhAChg+uaJAuLj75L26DLPODjMxsdzT/O9L740vpI0zJ 3A8MMh6V/Uw4rstArYBwc7hhnV4atlzPOsRZZjo17wkSWnDLOb7AyXO4X1EdfNHqONHO Ub1Kllj7dmrrhKkBaI6g7XBzu9pTdYXigOTfRiHvyyaU9AVN17Zeh8SIEBK9vOwjnmKf Lns0rhFcHdrEkWbQCus2TidA7ZfllKe+niu6H+x7W1hAJIgh4IXOacjCfGP3zGc2VS9u bAMCWAPqm2paujIJYnfZ/Hp7xiDDIs3ZFtn6p9vN9gqI4X18io1eQmCsJX8JF76H/pzB Qw8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716606827; x=1717211627; 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=6GoopJJATWYm8J4AQBO2uEawHJimowUcs3mDf1Js1Io=; b=IaWj+z66vuaa7qOPIutiLHBnedd2Prrqp1pwo+oZnA1uO4lokJENRUI2gCWP7yyXM6 r5fcetIkzOOFtwEUDZ8lbP/3nXRuZaRUz8GIev2gedUKAEwfo+pQ4WWRp0BQRFW/T2m0 GIi67zalIIxP/WEtj/qY1rZbaZ7k21nl67A8rX/FinG9QqsRwVANdqKpu0JE/s7JIN5z Ld3vmg4kfT2NKozb4e94scYj5vXqtD8JhM/z03T6u5xynAv2uv0e+5qGdSjBxa8HOdhc Ugo4fpAA2VQUuJsFOrHlXC/FgrKgCcL3CkhiGMqTVFBZH+pAfkI5rY5WB5ik4teiWhGw y0Ew== X-Forwarded-Encrypted: i=1; AJvYcCUBJ9UedX5YnQH8DmuwzyjsWoQ6TxjliUSfxMnkiG66jzGEnZiAamYn5n08C2pNdDk2zfcDyGLBFT1FkvRB76n1ta/+WGS4u+gqqCvov7PBnhRx405wn/C7+Cg= X-Gm-Message-State: AOJu0YymSEMSQOrVZ044IA5HLQVuuKjv6GerlMFVFojPa1wv8Oydz5W3 cZtXaBhbsXRrUPyn7DIA1pU4PNzecT2QmoM+oTDZOdp1UVct6QRD X-Google-Smtp-Source: AGHT+IG9i9Lkcmw7QgT7b69cZCa1EWMJUpj0EJGzhTYeaA5ndSw2Y+Rf3X3Hv2cFB88eTK5jZlRNXA== X-Received: by 2002:a05:6870:d112:b0:24f:d3ad:ac96 with SMTP id 586e51a60fabf-24fd3adeed9mr113464fac.22.1716606827490; Fri, 24 May 2024 20:13:47 -0700 (PDT) Received: from wheely.local0.net (110-175-65-7.tpgi.com.au. [110.175.65.7]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f8fc05a363sm1744306b3a.64.2024.05.24.20.13.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 20:13:47 -0700 (PDT) From: Nicholas Piggin To: Fabiano Rosas Cc: Nicholas Piggin , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Thomas Huth Subject: [PATCH 3/3] tests/qtest/migration-test: Use custom asm bios for ppc64 Date: Sat, 25 May 2024 13:13:29 +1000 Message-ID: <20240525031330.196609-4-npiggin@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240525031330.196609-1-npiggin@gmail.com> References: <20240525031330.196609-1-npiggin@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2001:4860:4864:20::36; envelope-from=npiggin@gmail.com; helo=mail-oa1-x36.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Similar to other archs, build a custom bios memory updater. Running the test with OF code is a cool trick, but SLOF takes a long time to boot. This reduces test time by around 3x (150s to 50s). Signed-off-by: Nicholas Piggin Reviewed-by: Fabiano Rosas --- tests/migration/migration-test.h | 1 + tests/migration/ppc64/a-b-kernel.h | 42 +++++++++++++++++++ tests/qtest/migration-test.c | 35 +++------------- tests/migration/Makefile | 2 +- tests/migration/ppc64/Makefile | 15 +++++++ tests/migration/ppc64/a-b-kernel.S | 66 ++++++++++++++++++++++++++++++ 6 files changed, 130 insertions(+), 31 deletions(-) create mode 100644 tests/migration/ppc64/a-b-kernel.h create mode 100644 tests/migration/ppc64/Makefile create mode 100644 tests/migration/ppc64/a-b-kernel.S diff --git a/tests/migration/migration-test.h b/tests/migration/migration-test.h index 68512c0b1b..194df7df6f 100644 --- a/tests/migration/migration-test.h +++ b/tests/migration/migration-test.h @@ -22,6 +22,7 @@ /* PPC */ #define PPC_TEST_MEM_START (1 * 1024 * 1024) #define PPC_TEST_MEM_END (100 * 1024 * 1024) +#define PPC_H_PUT_TERM_CHAR 0x58 /* ARM */ #define ARM_TEST_MEM_START (0x40000000 + 1 * 1024 * 1024) diff --git a/tests/migration/ppc64/a-b-kernel.h b/tests/migration/ppc64/a-b-kernel.h new file mode 100644 index 0000000000..673317efdb --- /dev/null +++ b/tests/migration/ppc64/a-b-kernel.h @@ -0,0 +1,42 @@ +/* This file is automatically generated from the assembly file in + * tests/migration/ppc64. Edit that file and then run "make all" + * inside tests/migration to update, and then remember to send both + * the header and the assembler differences in your patch submission. + */ +unsigned char ppc64_kernel[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x7d, 0x20, 0x00, 0xa6, 0x39, 0x40, 0xff, 0xff, + 0x79, 0x49, 0xf8, 0x0e, 0x7d, 0x20, 0x01, 0x64, 0x3e, 0x80, 0x00, 0x10, + 0x62, 0x94, 0x00, 0x00, 0x3d, 0x20, 0x06, 0x40, 0x61, 0x29, 0x00, 0x00, + 0x7e, 0xb4, 0x48, 0x50, 0x39, 0x40, 0x10, 0x00, 0x7e, 0xb5, 0x53, 0xd2, + 0x38, 0x60, 0x00, 0x58, 0x38, 0x80, 0x00, 0x00, 0x38, 0xa0, 0x00, 0x01, + 0x38, 0xc0, 0x00, 0x41, 0x78, 0xc6, 0xc1, 0xc6, 0x44, 0x00, 0x00, 0x22, + 0x38, 0x60, 0x00, 0x00, 0x7e, 0x89, 0xa3, 0x78, 0x7e, 0xa9, 0x03, 0xa6, + 0x98, 0x69, 0x00, 0x00, 0x39, 0x29, 0x10, 0x00, 0x42, 0x00, 0xff, 0xf8, + 0x7e, 0x89, 0xa3, 0x78, 0x7e, 0xa9, 0x03, 0xa6, 0x88, 0x69, 0x00, 0x00, + 0x38, 0x63, 0x00, 0x01, 0x98, 0x69, 0x00, 0x00, 0x39, 0x29, 0x10, 0x00, + 0x42, 0x00, 0xff, 0xf0, 0x38, 0x60, 0x00, 0x58, 0x38, 0x80, 0x00, 0x00, + 0x38, 0xa0, 0x00, 0x01, 0x38, 0xc0, 0x00, 0x42, 0x78, 0xc6, 0xc1, 0xc6, + 0x44, 0x00, 0x00, 0x22, 0x4b, 0xff, 0xff, 0xcc +}; + diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index b8617cc843..94d5057857 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -128,6 +128,7 @@ static char *bootpath; */ #include "tests/migration/i386/a-b-bootblock.h" #include "tests/migration/aarch64/a-b-kernel.h" +#include "tests/migration/ppc64/a-b-kernel.h" #include "tests/migration/s390x/a-b-bios.h" static void bootfile_create(char *dir, bool suspend_me) @@ -147,10 +148,8 @@ static void bootfile_create(char *dir, bool suspend_me) content = s390x_elf; len = sizeof(s390x_elf); } else if (strcmp(arch, "ppc64") == 0) { - /* - * sane architectures can be programmed at the boot prompt - */ - return; + content = ppc64_kernel; + len = sizeof(ppc64_kernel); } else if (strcmp(arch, "aarch64") == 0) { content = aarch64_kernel; len = sizeof(aarch64_kernel); @@ -181,29 +180,10 @@ static void wait_for_serial(const char *side) { g_autofree char *serialpath = g_strdup_printf("%s/%s", tmpfs, side); FILE *serialfile = fopen(serialpath, "r"); - const char *arch = qtest_get_arch(); - int started = (strcmp(side, "src_serial") == 0 && - strcmp(arch, "ppc64") == 0) ? 0 : 1; do { int readvalue = fgetc(serialfile); - if (!started) { - /* SLOF prints its banner before starting test, - * to ignore it, mark the start of the test with '_', - * ignore all characters until this marker - */ - switch (readvalue) { - case '_': - started = 1; - break; - case EOF: - fseek(serialfile, 0, SEEK_SET); - usleep(1000); - break; - } - continue; - } switch (readvalue) { case 'A': /* Fine */ @@ -215,8 +195,6 @@ static void wait_for_serial(const char *side) return; case EOF: - started = (strcmp(side, "src_serial") == 0 && - strcmp(arch, "ppc64") == 0) ? 0 : 1; fseek(serialfile, 0, SEEK_SET); usleep(1000); break; @@ -737,14 +715,11 @@ static int test_migrate_start(QTestState **from, QTestState **to, memory_size = "256M"; start_address = PPC_TEST_MEM_START; end_address = PPC_TEST_MEM_END; - arch_source = g_strdup_printf("-prom-env 'use-nvramrc?=true' -prom-env " - "'nvramrc=hex .\" _\" begin %x %x " - "do i c@ 1 + i c! 1000 +loop .\" B\" 0 " - "until'", end_address, start_address); machine_alias = "pseries"; machine_opts = "vsmt=8"; arch_opts = g_strdup_printf("-nodefaults " - "-machine " PSERIES_DEFAULT_CAPABILITIES); + "-machine " PSERIES_DEFAULT_CAPABILITIES " " + "-bios %s", bootpath); } else if (strcmp(arch, "aarch64") == 0) { memory_size = "150M"; machine_alias = "virt"; diff --git a/tests/migration/Makefile b/tests/migration/Makefile index 13e99b1692..2c5ee287ec 100644 --- a/tests/migration/Makefile +++ b/tests/migration/Makefile @@ -5,7 +5,7 @@ # See the COPYING file in the top-level directory. # -TARGET_LIST = i386 aarch64 s390x +TARGET_LIST = i386 aarch64 s390x ppc64 SRC_PATH = ../.. diff --git a/tests/migration/ppc64/Makefile b/tests/migration/ppc64/Makefile new file mode 100644 index 0000000000..a3a2d98ac8 --- /dev/null +++ b/tests/migration/ppc64/Makefile @@ -0,0 +1,15 @@ +.PHONY: all clean +all: a-b-kernel.h + +a-b-kernel.h: ppc64.kernel + echo "$$__note" > $@ + xxd -i $< | sed -e 's/.*int.*//' >> $@ + +ppc64.kernel: ppc64.elf + $(CROSS_PREFIX)objcopy -O binary -S $< $@ + +ppc64.elf: a-b-kernel.S + $(CROSS_PREFIX)gcc -static -o $@ -nostdlib -Wl,--build-id=none $< + +clean: + $(RM) *.kernel *.elf diff --git a/tests/migration/ppc64/a-b-kernel.S b/tests/migration/ppc64/a-b-kernel.S new file mode 100644 index 0000000000..0613a8d18e --- /dev/null +++ b/tests/migration/ppc64/a-b-kernel.S @@ -0,0 +1,66 @@ +# +# Copyright (c) 2024 IBM, Inc +# +# This work is licensed under the terms of the GNU GPL, version 2 or later. +# See the COPYING file in the top-level directory. + +#include "../migration-test.h" + +.section .text + +.macro print ch + li %r3,PPC_H_PUT_TERM_CHAR + li %r4,0 + li %r5,1 + li %r6,\ch + sldi %r6,%r6,56 + sc 1 +.endm + + .globl _start +_start: +. = 0x100 + /* + * Enter 64-bit mode. Not necessary because the test uses 32-bit + * addresses, but those constants could easily be changed and break + * in 32-bit mode. + */ + mfmsr %r9 + li %r10,-1 + rldimi %r9,%r10,63,0 + mtmsrd %r9 + + /* + * Set up test memory region. Non-volatiles are used because the + * hcall can clobber regs. + * r20 - start address + * r21 - number of pages + */ + lis %r20,PPC_TEST_MEM_START@h + ori %r20,%r20,PPC_TEST_MEM_START@l + lis %r9,PPC_TEST_MEM_END@h + ori %r9,%r9,PPC_TEST_MEM_END@l + subf %r21,%r20,%r9 + li %r10,TEST_MEM_PAGE_SIZE + divd %r21,%r21,%r10 + + print 'A' + + li %r3,0 + mr %r9,%r20 + mtctr %r21 +1: stb %r3,0(%r9) + addi %r9,%r9,TEST_MEM_PAGE_SIZE + bdnz 1b + +loop: + mr %r9,%r20 + mtctr %r21 +1: lbz %r3,0(%r9) + addi %r3,%r3,1 + stb %r3,0(%r9) + addi %r9,%r9,TEST_MEM_PAGE_SIZE + bdnz 1b + + print 'B' + b loop