From nobody Mon Nov 25 04:28:07 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1717055159; cv=none; d=zohomail.com; s=zohoarc; b=YJXEQa5L1h4H8tBZh6VnwuuzMpFthABEWUkyWTX0dwfGOBv7IDIBuORN9MNjLD2PxhLP8KbVTKX657tz5+4JaCH9RYO49FZauJSCfPVz2qjKONK2vtTE/EkM5+TNC3OLmIuaEWHYG6RYxtyIXYouH+vXQcP8t0H4HTApCfVSsZk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1717055159; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=rr4J6dxm5AtV4yAbJU19/SHZXAqfpuKCexnfNQQEgp8=; b=Wvlt4YhI5emxcyFLGW9CcK4iE+Emiv6GLbV7hrrpnYkpgXHMMQnSacgC6yVY615QZizNLK2nHjNb4E8+IwZWIU1JebjH3kjUqsD2KoN2qjLytvtU9ME6BMTNerJdhE85lcttq4t2imBWWpSzOzZ0Wcf4Bs4PnwoPiwS4NOqpjMQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 171705515998341.69149575315862; Thu, 30 May 2024 00:45:59 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCaTk-0001vA-7F; Thu, 30 May 2024 03:45:40 -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 1sCaTY-0001tJ-UP; Thu, 30 May 2024 03:45:29 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCaTK-000315-DF; Thu, 30 May 2024 03:45:28 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-70232305fecso307251b3a.2; Thu, 30 May 2024 00:45:11 -0700 (PDT) Received: from wheely.local0.net ([1.146.118.54]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f61aa2e998sm8025335ad.62.2024.05.30.00.45.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 00:45:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717055107; x=1717659907; 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=rr4J6dxm5AtV4yAbJU19/SHZXAqfpuKCexnfNQQEgp8=; b=TE0rBmo/RMIjMcqiiLq9L0vchpi/+gNXrYj3AYm8QriJQtQYyAoMHMjqBcV9jNCMuC PMQ5bseXyVsdWNhu1xLjF1lUkQi4w/xtJWI6oZ5/0xo1TOAH/oN/EcqWTQ+hkT9zohzO 49NAL4vDmKgDk796W/OHiq8RS/S62X5KkSt+Fa2xBE++rIzSH/mmiPJvX+GynG7bWqmx 16hNK8xCPHnROZgCyRkvfOHHI0IGTh4IOuwnwr0GgjMoSEuebb9ufEoAx5ZTbupKGdmU vG6ljmE2zEElMN1tPVvLZ9G5ESba5o8TiIa2+b7bPer4cDfH+F/IE3+qFwVh04TA+KIG 7Viw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717055107; x=1717659907; 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=rr4J6dxm5AtV4yAbJU19/SHZXAqfpuKCexnfNQQEgp8=; b=OWrH9M0jzctNbJwmXjP/fz5b/IkfxJihwZJklJHSLVj8c6fOsvVLVXj7Iaz0+NkpvD VL0R/r0zi3HbESz8lYmXcas1N81twJBQ0DorsBVIqeqZMykgu3YGG5LxM1+oRUL9QLZe wUjfDIpZRbzoR9Ndn+9hQiuIL7RlLVEY+13cNK/qCDwAa9V4CusSLTcVzBGIWtBkVlK1 NzCsFG1qlavmwx3ly7LtRJJSF7rk8qmZRIiqcdy1uFxZNm2uP9I1IALcQRnpQvbwvWxH qeqx0lZczMwhCGpPrSao4HBH9Fiu/EPq4gkFwCtDXGUqhhy1E5UjwBgOfABhMGq0oGMO lF8A== X-Forwarded-Encrypted: i=1; AJvYcCVfLH8/3vMg16t7vMz2SgUtd0z4F/FzrqTOWntZ2CICQanKlOdreiZIxOXvhBmkHEgTyYOA5soBmzrh8AFsozQEFZwD X-Gm-Message-State: AOJu0YwzVrRMkqA/yLTSE3/oABRZell+qhwss5MV5LYdtY9+ePR2ys33 dN1K35smLGZGtG0OdP6WL+Xm6P2RyP/ywmp7dml61nZAV2QYjPK5CopZkg== X-Google-Smtp-Source: AGHT+IErhFRqyaaMVyaK5X3ImbnaR5GCT6W+TxcRJCSykVwxk81VnEgxXCfQeqE5W1sQWR2JCq/kPA== X-Received: by 2002:a05:6a20:158c:b0:1af:a35b:a34f with SMTP id adf61e73a8af0-1b264563a5emr1552498637.25.1717055107323; Thu, 30 May 2024 00:45:07 -0700 (PDT) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , Peter Xu , Fabiano Rosas , Thomas Huth , Laurent Vivier , Paolo Bonzini , qemu-ppc@nongnu.org Subject: [PATCH v3 1/4] tests/qtest: Move common define from libqos-spapr.h to new ppc-util.h Date: Thu, 30 May 2024 17:44:49 +1000 Message-ID: <20240530074453.21780-2-npiggin@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240530074453.21780-1-npiggin@gmail.com> References: <20240530074453.21780-1-npiggin@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=npiggin@gmail.com; helo=mail-pf1-x42b.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, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1717055161861100003 Content-Type: text/plain; charset="utf-8" The spapr QEMU machine defaults is useful outside libqos, so create a new header for ppc specific qtests and move it there. Reviewed-by: Thomas Huth Signed-off-by: Nicholas Piggin --- tests/qtest/libqos/libqos-spapr.h | 7 ------- tests/qtest/ppc-util.h | 19 +++++++++++++++++++ tests/qtest/boot-serial-test.c | 2 +- tests/qtest/prom-env-test.c | 2 +- tests/qtest/pxe-test.c | 2 +- 5 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 tests/qtest/ppc-util.h diff --git a/tests/qtest/libqos/libqos-spapr.h b/tests/qtest/libqos/libqos-= spapr.h index e4483c14f8..a446276416 100644 --- a/tests/qtest/libqos/libqos-spapr.h +++ b/tests/qtest/libqos/libqos-spapr.h @@ -9,11 +9,4 @@ QOSState *qtest_spapr_boot(const char *cmdline_fmt, ...) G_GNUC_PRINTF(1, 2); void qtest_spapr_shutdown(QOSState *qs); =20 -/* List of capabilities needed to silence warnings with TCG */ -#define PSERIES_DEFAULT_CAPABILITIES \ - "cap-cfpc=3Dbroken," \ - "cap-sbbc=3Dbroken," \ - "cap-ibs=3Dbroken," \ - "cap-ccf-assist=3Doff," - #endif diff --git a/tests/qtest/ppc-util.h b/tests/qtest/ppc-util.h new file mode 100644 index 0000000000..f68ee93520 --- /dev/null +++ b/tests/qtest/ppc-util.h @@ -0,0 +1,19 @@ +/* + * PowerPC misc useful things + * + * Copyright (c) 2024, IBM Corporation. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef PPC_UTIL_H +#define PPC_UTIL_H + +/* List of capabilities needed to silence warnings with TCG */ +#define PSERIES_DEFAULT_CAPABILITIES \ + "cap-cfpc=3Dbroken," \ + "cap-sbbc=3Dbroken," \ + "cap-ibs=3Dbroken," \ + "cap-ccf-assist=3Doff," + +#endif /* PPC_UTIL_H */ diff --git a/tests/qtest/boot-serial-test.c b/tests/qtest/boot-serial-test.c index df389adeeb..3b92fa5d50 100644 --- a/tests/qtest/boot-serial-test.c +++ b/tests/qtest/boot-serial-test.c @@ -15,7 +15,7 @@ =20 #include "qemu/osdep.h" #include "libqtest.h" -#include "libqos/libqos-spapr.h" +#include "ppc-util.h" =20 static const uint8_t bios_avr[] =3D { 0x88, 0xe0, /* ldi r24, 0x08 */ diff --git a/tests/qtest/prom-env-test.c b/tests/qtest/prom-env-test.c index 39ccb59797..14705105ad 100644 --- a/tests/qtest/prom-env-test.c +++ b/tests/qtest/prom-env-test.c @@ -21,7 +21,7 @@ =20 #include "qemu/osdep.h" #include "libqtest.h" -#include "libqos/libqos-spapr.h" +#include "ppc-util.h" =20 #define MAGIC 0xcafec0de #define ADDRESS 0x4000 diff --git a/tests/qtest/pxe-test.c b/tests/qtest/pxe-test.c index e4b48225a5..a3f900fbea 100644 --- a/tests/qtest/pxe-test.c +++ b/tests/qtest/pxe-test.c @@ -16,7 +16,7 @@ #include #include "libqtest.h" #include "boot-sector.h" -#include "libqos/libqos-spapr.h" +#include "ppc-util.h" =20 #define NETNAME "net0" =20 --=20 2.43.0 From nobody Mon Nov 25 04:28:07 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1717055192; cv=none; d=zohomail.com; s=zohoarc; b=NOsMQlw3XaKGXllU7xw99GOwrGoets1lXaQPltZ3syl2rUTbowYRsID/zWc7ECzQvKD7K1Y4myxtqM75iEZPezC0ZSCpQVcU8cpM4Yn5X3FMHoWt2ytydQreWa1Hq1iwvX0cPwuwLgfW+QMRZ8hQLXmPlXkI31KpP01Sk7EfmYQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1717055192; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=FicYbNCOmL8X97Ki3IW5fEmYcntLrpNCwbZ1/ZtVHwc=; b=MMxgCqCZYgy5xNM8bEIKzCspTJTtWKA/SuVt2zNZdQIbrvxPG9T+JSOFFWWn70za4eWnAGHfjeu1gQgfqb2F22vsRsXYJwaDHu1FNROD5bnTHPhihDWJAYorzV0UBQ8CIi2sZtWjajIJp4h7x1YLuK0D1vXcFb+3/skuH+cWAt8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1717055192491725.0601519221799; Thu, 30 May 2024 00:46:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCaTr-00029q-PJ; Thu, 30 May 2024 03:45: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 1sCaTZ-0001tr-Ke; Thu, 30 May 2024 03:45:31 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCaTL-000329-Gg; Thu, 30 May 2024 03:45:29 -0400 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1f47784a2adso4414305ad.1; Thu, 30 May 2024 00:45:13 -0700 (PDT) Received: from wheely.local0.net ([1.146.118.54]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f61aa2e998sm8025335ad.62.2024.05.30.00.45.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 00:45:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717055112; x=1717659912; 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=FicYbNCOmL8X97Ki3IW5fEmYcntLrpNCwbZ1/ZtVHwc=; b=I+8Q9yjzRbk8ZEnAt5gAaGTqVALIwhtmVBaAC5cUNQ9i3OO9KJiAht1BWOecd4y6Og NPhdOoxFjtIV62zGz28cerjRl8tRCEIuzxAX1444dW/kHUYVLlfoGDWxa62+Hhw7D4CG 6spOKSe8hbFrBqVPj8ZfOZE2jKY7GGD9KnazTStDTPV/rHJfFtseyd1aBErIlPjWuL4M 2J/GfIApnfUAJaPRBh0zMSeNjIC/ci5f3dL7BfAfF8gPXjY2F3d6ZDfsJXMFbn7Z4eR/ jlbIlioPWihJBPE+AjYP1s2wDxoIPfAwWGTdp+JMBpFtiYJUiIVaejYJJJlcIxe3nw3S N1TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717055112; x=1717659912; 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=FicYbNCOmL8X97Ki3IW5fEmYcntLrpNCwbZ1/ZtVHwc=; b=OazeuxhbWQjdtlkex6tgsqW/1zWuVy9Ay9UcTYXIRI0vB/1GoHu077tkJDyQC1Lnvk IvnJXQcdzuzlKvLRQXSu3DEm16o6Jj3eLnFP6gGImEjie+RJzwIKKWUzMxYRoOwZm0Ax CVAu+b4OAGFSvqByBnrGo6/oCqb3srK5ESpe7KxGdou1Ie/PlB8jVCD5r5LKCHt7go2Q EJeqBaPdzroIMrVZze0n5qL5mA+2NDX7h2sud4mCDGpe6i6SS0Of0ci6s+AOMBA1fg7o aUvUurvPPBlstELCMdtvAJRxvYGdKb25HjLbdMZG7tPUZV0tQeEPwhQ6Y/F+4I3xuhX9 0P7Q== X-Forwarded-Encrypted: i=1; AJvYcCVBOunRv6DGu0wQKcpJ+UpwkS8GDSL2Xmgg5tkKYAzW3+VIxYvEhye8nE1p89aiiGoX7KNI/iwOpi0Dx7EtY5fAy9Du X-Gm-Message-State: AOJu0YyO7gkTv1TCxXkpB6fugmyxfy5Dgbb/AsRinGiIaTUxhI9O40Ae ORWyYw4as11ZXVFM6qrR/uRlOAZNj8/skwLdkyyrcLy3H8TVEKdgx5NN2Q== X-Google-Smtp-Source: AGHT+IEbF7yd8eHfCfzcj/CVVu2i9oizrMol9VZnl7yZnSoJzEqMYMFqmsz+/fSfccOjf0tSphJysw== X-Received: by 2002:a17:902:da86:b0:1f4:7a5c:65d4 with SMTP id d9443c01a7336-1f6195fac0emr13263445ad.18.1717055112253; Thu, 30 May 2024 00:45:12 -0700 (PDT) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , Peter Xu , Fabiano Rosas , Thomas Huth , Laurent Vivier , Paolo Bonzini , qemu-ppc@nongnu.org Subject: [PATCH v3 2/4] tests/qtest/migration-test: Quieten ppc64 QEMU warnings Date: Thu, 30 May 2024 17:44:50 +1000 Message-ID: <20240530074453.21780-3-npiggin@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240530074453.21780-1-npiggin@gmail.com> References: <20240530074453.21780-1-npiggin@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=npiggin@gmail.com; helo=mail-pl1-x631.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, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1717055194036100003 Content-Type: text/plain; charset="utf-8" Reviewed-by: Thomas Huth 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..48f59822f4 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 "ppc-util.h" =20 #include "migration-helpers.h" #include "tests/migration/migration-test.h" @@ -742,7 +743,8 @@ static int test_migrate_start(QTestState **from, QTestS= tate **to, "until'", end_address, start_address= ); machine_alias =3D "pseries"; machine_opts =3D "vsmt=3D8"; - arch_opts =3D g_strdup("-nodefaults"); + arch_opts =3D g_strdup("-nodefaults " + "-machine " PSERIES_DEFAULT_CAPABILITIES); } else if (strcmp(arch, "aarch64") =3D=3D 0) { memory_size =3D "150M"; machine_alias =3D "virt"; --=20 2.43.0 From nobody Mon Nov 25 04:28:07 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1717055228; cv=none; d=zohomail.com; s=zohoarc; b=Fx+Oh8QzT3ZaTNTDSkVT4p7LUVa5MxK75GBwoxSRIZuxi/70CbJFkxb0UboWKybSmT9LDn+FLuFLKLYWwVosLt00ExzH/8mXgEmXSyeBDiS/rzSItOTnSYTjVsMBPFv2DtVu7CckLFEkhfl9sG5sm8HZmxo8PtHKbUeed5ZnfVo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1717055228; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=NbPEeRWPILNUzNuILr/esH7ih7rVY13FKF1oFFMWtjM=; b=V7hdtQI97zC5XwGfPty+W9RDzqtDWErj2jZ+VZT3CVNlA4xUx8CNUf5xp5tXUy8ca/ReGu20sW0cLleANscJPjrfskB+/BTRsHpJ09QN5sKWtjJlIewoLhMaIAD1cs19L60Ov0Lh3xgjWSxmsPooo7QoQuL4NVp0s9C32oKJuNQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1717055228315103.57804169212989; Thu, 30 May 2024 00:47:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCaTs-0002C2-6M; Thu, 30 May 2024 03:45:48 -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 1sCaTa-0001tv-6z; Thu, 30 May 2024 03:45:31 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCaTT-00034m-4z; Thu, 30 May 2024 03:45:29 -0400 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1f44b5b9de6so4752005ad.3; Thu, 30 May 2024 00:45:18 -0700 (PDT) Received: from wheely.local0.net ([1.146.118.54]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f61aa2e998sm8025335ad.62.2024.05.30.00.45.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 00:45:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717055117; x=1717659917; 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=NbPEeRWPILNUzNuILr/esH7ih7rVY13FKF1oFFMWtjM=; b=WPjL4N/mEA0Lt6/CQix5ZckAcZBMbFpC+ohsnSY55FmbsBuGR6KL8QnaB/HDUp6i2y v51fkFAoMD2GEyu2rGIYXLDRBfwvW8eAGL7cdPMEcDTNP5rqbGW7sy7V50QAPrGMZOdj tlVSHXMlJqZYAfdtumSVUkB/NRtRq9xVobt7ja/paQU8U+kuyomOm+ldJ2RDdyW0AT82 F/bhkqKB+XiuVRpieEtxs2ahnyFtLETUNVfpj/1wFTWz7gIbxi7Pj5kRK4rK+IJC4jVD I05C6gm8CeLlTwhQgaL3oYzuchJJHy9np1Ef2dsvnQKyrf7Aj62K+QcFtJzx1IVaf/uj Pm8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717055117; x=1717659917; 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=NbPEeRWPILNUzNuILr/esH7ih7rVY13FKF1oFFMWtjM=; b=HsHUMlbw5dHfg7drVXhnzyNKwhhPxI4OpQ9xCrHG7IipwRlb23cJbWLAPROwvfdjSe 4JVcyW5F2OyDNp/ofJZp3nZp4nrYJbXORCtW5Sbvz4blE0TTnoMmif7hoNjDqs0uPNNN zDyWWhbYnTk1wi7FMtcYAnJqgMnvfnpGXJeIPVwjy+dK9XUQ02vpXKTXZJ5Tp4Lc+1HI CPYjFiN65xlXXB8QwsNsBI2OxZ2YEEfLqwd37Yb+F3AgsuKx/alT/CJb4fiu9wqQfTsE DVf3l70RQFYhepIb9AFJS9vBNWfkvUQvttfVkN45lNOIOjwFVv/TDn2NHVCdGKIUl3kF sn5Q== X-Forwarded-Encrypted: i=1; AJvYcCUle7VuBE+M4iYy2brECUeyhD1R7Z+XUsdP15PnxPZnyq7r2aTgceLgkgAn1uz3c1RLM0tdWBFLjdrgjRTMZ1rRrMiL X-Gm-Message-State: AOJu0YwqEFfTxJX6h/AbVkXiWa11caLN267vOlsWTHQ/4lVixTuFD5vs JTZsDgysaJ69pNkfou/oodniiEy1iNdZxh1ch6dDnc4oitreXtY7kAUr9g== X-Google-Smtp-Source: AGHT+IFfesfKOKLyxaPOvhXsaTdUqJFJSWerkRxupFW40o8qBxGCF/6Nh75Y0KbFgKwShV9YebWiLw== X-Received: by 2002:a17:902:ec83:b0:1f4:7bf1:71f8 with SMTP id d9443c01a7336-1f6192ed3e4mr15229315ad.5.1717055116890; Thu, 30 May 2024 00:45:16 -0700 (PDT) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , Peter Xu , Fabiano Rosas , Thomas Huth , Laurent Vivier , Paolo Bonzini , qemu-ppc@nongnu.org Subject: [PATCH v3 3/4] tests/qtest/migration-test: Enable on ppc64 TCG Date: Thu, 30 May 2024 17:44:51 +1000 Message-ID: <20240530074453.21780-4-npiggin@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240530074453.21780-1-npiggin@gmail.com> References: <20240530074453.21780-1-npiggin@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=npiggin@gmail.com; helo=mail-pl1-x62b.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, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1717055230147100007 Content-Type: text/plain; charset="utf-8" ppc64 with TCG seems to no longer be failing this test, perhaps since commit 03bfc2188f061 ("physmem: Fix migration dirty bitmap coherency with TCG memory access") which is not ppc specific but was seen to hit ppc64 quite easily. Let's enable it again. The s390x problem has been identified so mention it while we are adjusting the comment. Reviewed-by: Thomas Huth Signed-off-by: Nicholas Piggin Reviewed-by: Prasad Pandit --- 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 48f59822f4..ef9ddef1c8 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -3454,19 +3454,9 @@ int main(int argc, char **argv) #endif =20 /* - * 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 f= or - * 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 with TCG, migration is observed to hang due to the 'pendin= g' + * state of the flic interrupt controller not being migrated or + * reconstructed post-migration. Disable it until the problem is resol= ved. */ if (g_str_equal(arch, "s390x") && !has_kvm) { g_test_message("Skipping tests: s390x host with KVM is required"); --=20 2.43.0 From nobody Mon Nov 25 04:28:07 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1717055202; cv=none; d=zohomail.com; s=zohoarc; b=WjohLSwJ3FJjaOBReqCIN1uYTjGtwLX81K0137+o3txISMrBg008LMc6jX9/lVCW4ZaEDF4NacSkLWTjowD8wtp9Jcj1hfvAGTCGLq4Lwu/8fecOMaGegqEf0g+f2vjTJTTKFQn5HT060lo5EsJ0Pnh8zzBHoQnK5RlVRNvxjhQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1717055202; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=oNa7i7u8FMMWYIpnus5uj2Kvjb3YL5l1i9xFksmJZZc=; b=Mq/c7UxtZoiNPxh3CRM7ujRVMnFb/OL1RQ36UnSzKte71aImYr1xDTUg8U1gBY8pC9x/AYDaP/qS324GeAIO0sGyiHOBq8ZIJYLS9FVtbwG8DFGPAXQjMebWigJSx+kSN796sPvZ+0yIugCO9C+gGBmoGcCLrJKhu4Jepekvc2A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1717055202950933.8751634879144; Thu, 30 May 2024 00:46:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCaTt-0002Cw-5Z; Thu, 30 May 2024 03:45: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 1sCaTd-0001vZ-Ga; Thu, 30 May 2024 03:45:38 -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 1sCaTV-00035b-U9; Thu, 30 May 2024 03:45:32 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-6f8ea5e3812so509957b3a.2; Thu, 30 May 2024 00:45:24 -0700 (PDT) Received: from wheely.local0.net ([1.146.118.54]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f61aa2e998sm8025335ad.62.2024.05.30.00.45.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 00:45:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717055121; x=1717659921; 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=oNa7i7u8FMMWYIpnus5uj2Kvjb3YL5l1i9xFksmJZZc=; b=ewQKEPoLYG4rHP98RNdwrU/MsQU0ePwSRwi3Zl+Sd6ZBPctvr7KnGTz9PAvn4NrZ6g A0vE3NR0Hg8pc001oVJSoMwArlnJFbz0fJilGr5L5SHoZBfJ8SM7w1mNUPVHKFosNDNq nmDwFuRTkG1Rrt9t+RzuDnYmFmqFPbQ301Q9bbxQcIVPoTF7JyWgkYuFP7D1XNpS0fFy aaRAQCwWhY4EnEzNxlIH7a+Rm/c+8cLHXIGLTvo55VbUIX9oXId+TCYB5spbcBnmNxmB sBAgPDreciB9I6HeK/OJm0VvZxV9ApkXVv/lKy3jZ8e2f+HXIvZpaCSp1dwroZKI5IVx skqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717055121; x=1717659921; 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=oNa7i7u8FMMWYIpnus5uj2Kvjb3YL5l1i9xFksmJZZc=; b=fehpm92VZILiSn8CogKTT95U26u+FmmHYGm8bevvdxOntStbY4VFrxWEcpwJRSM+fZ jyrf0hZwOaSbigq3EtfTR0Ju5gRO5m7kFn/CU9V7DebV5VLFmqrW5JzLsg10Noa7KfEw V+nkdz7ez1/Ji6XHymY1Xy9knfVN5OGerNlKCxkdLToefUdZtywwRxm8u3NWrdFOTEAD u2x1f3da/qPI3E7558/LZ0gLHyAGghWZ7doynIU8zgDHKy5FHUxEswKj9HY9fGT9NfMv AopMHJgutPc+KSVR2OdUWF6e1f9pH6+E7N0N9BX31rjHGN3YyNJKZuj2NibtMY/75BOm 7QHQ== X-Forwarded-Encrypted: i=1; AJvYcCUBEG3DQPPr93m14oSy6XMKhgm2GmwIAQTX2KI4ghqJy4qOy1HLghT7tqojryvlXU69t3nhZTqFPywC5lCMqMg9AeR4 X-Gm-Message-State: AOJu0YwdhZrMqZ5wLSdSpxkC/tkpKvGrxvQQGbg0zWFlV63vxK4sRvPu ko5kSWh7FQC758OfccFI1gOf8xord/wBEFhKF/nwKB15U8kg9ekkggJvug== X-Google-Smtp-Source: AGHT+IEz4o/JZWpR/4+fPfpPkWOm1HNhwIDyF021VAy9j1h/c4+IC/ndY15U2+nJ2Gl1VJseJ9kprA== X-Received: by 2002:a05:6a21:8192:b0:1a9:b3e9:a62c with SMTP id adf61e73a8af0-1b2645e7d43mr1068895637.48.1717055121229; Thu, 30 May 2024 00:45:21 -0700 (PDT) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , Peter Xu , Fabiano Rosas , Thomas Huth , Laurent Vivier , Paolo Bonzini , qemu-ppc@nongnu.org Subject: [PATCH v3 4/4] tests/qtest/migration-test: Use custom asm bios for ppc64 Date: Thu, 30 May 2024 17:44:52 +1000 Message-ID: <20240530074453.21780-5-npiggin@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240530074453.21780-1-npiggin@gmail.com> References: <20240530074453.21780-1-npiggin@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1717055204111100007 Content-Type: text/plain; charset="utf-8" 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). Reviewed-by: Fabiano Rosas Signed-off-by: Nicholas Piggin --- tests/migration/migration-test.h | 1 + tests/migration/ppc64/a-b-kernel.h | 42 +++++++++++++++++++ tests/qtest/migration-test.c | 37 +++-------------- tests/migration/Makefile | 2 +- tests/migration/ppc64/Makefile | 15 +++++++ tests/migration/ppc64/a-b-kernel.S | 66 ++++++++++++++++++++++++++++++ 6 files changed, 131 insertions(+), 32 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-t= est.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 =20 /* 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[] =3D { + 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 ef9ddef1c8..d6f5ceed80 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" =20 static void bootfile_create(char *dir, bool suspend_me) @@ -147,10 +148,8 @@ static void bootfile_create(char *dir, bool suspend_me) content =3D s390x_elf; len =3D sizeof(s390x_elf); } else if (strcmp(arch, "ppc64") =3D=3D 0) { - /* - * sane architectures can be programmed at the boot prompt - */ - return; + content =3D ppc64_kernel; + len =3D sizeof(ppc64_kernel); } else if (strcmp(arch, "aarch64") =3D=3D 0) { content =3D aarch64_kernel; len =3D sizeof(aarch64_kernel); @@ -181,29 +180,10 @@ static void wait_for_serial(const char *side) { g_autofree char *serialpath =3D g_strdup_printf("%s/%s", tmpfs, side); FILE *serialfile =3D fopen(serialpath, "r"); - const char *arch =3D qtest_get_arch(); - int started =3D (strcmp(side, "src_serial") =3D=3D 0 && - strcmp(arch, "ppc64") =3D=3D 0) ? 0 : 1; =20 do { int readvalue =3D fgetc(serialfile); =20 - 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 =3D 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; =20 case EOF: - started =3D (strcmp(side, "src_serial") =3D=3D 0 && - strcmp(arch, "ppc64") =3D=3D 0) ? 0 : 1; fseek(serialfile, 0, SEEK_SET); usleep(1000); break; @@ -737,14 +715,11 @@ static int test_migrate_start(QTestState **from, QTes= tState **to, memory_size =3D "256M"; start_address =3D PPC_TEST_MEM_START; end_address =3D PPC_TEST_MEM_END; - arch_source =3D g_strdup_printf("-prom-env 'use-nvramrc?=3Dtrue' -= prom-env " - "'nvramrc=3Dhex .\" _\" begin %x %x " - "do i c@ 1 + i c! 1000 +loop .\" B\"= 0 " - "until'", end_address, start_address= ); machine_alias =3D "pseries"; machine_opts =3D "vsmt=3D8"; - arch_opts =3D g_strdup("-nodefaults " - "-machine " PSERIES_DEFAULT_CAPABILITIES); + arch_opts =3D g_strdup_printf( + "-nodefaults -machine " PSERIES_DEFAULT_CAPABILITIES " " + "-bios %s", bootpath); } else if (strcmp(arch, "aarch64") =3D=3D 0) { memory_size =3D "150M"; machine_alias =3D "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. # =20 -TARGET_LIST =3D i386 aarch64 s390x +TARGET_LIST =3D i386 aarch64 s390x ppc64 =20 SRC_PATH =3D ../.. =20 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=3Dnone $< + +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: +. =3D 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 --=20 2.43.0