From nobody Tue Nov 26 22:33:31 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=1704646979; cv=none; d=zohomail.com; s=zohoarc; b=eepScAeizY24aMZMGBZ0T6p1GPnKAJhN21zSAf6K0AOV8Yj0cJv9uhIo1PtjgG50gZRGQykx/tV/Af4S83frf1V6tAbQz2TKOiRAq6khN8kz+EoSsI9mcW2o8+2ey8dTwKYUkV5l0nwLqkjX4jTyKKC/EQ6bVmj35LH5u7rk4Mk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704646979; 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=YLpVpr4lXcxtiYkgYwO8f+zCCPIx0i1aEW37ifuFYyc=; b=FF4J9O2mzhWY1dR8dTCtCszUCZNHroQMsFLMRr45r2FR2kKqKhyV9//38EV3fj1QrtLf2xYNBdM3hJGHKKnmsLFn1/eSEHdyCIFfgUrQvUh97WHWjbv7J174quA8GtOMxC/Lv2x4TUmlCNB5z9jg78qYaw0XpQXbVhqXeujAUi0= 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 1704646979515299.69243390551594; Sun, 7 Jan 2024 09:02:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMWXz-00020q-Jz; Sun, 07 Jan 2024 12:02:51 -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 1rMWXo-0001nD-NZ; Sun, 07 Jan 2024 12:02:44 -0500 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMWXm-0007an-RU; Sun, 07 Jan 2024 12:02:40 -0500 Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-28be8ebcdc1so521689a91.0; Sun, 07 Jan 2024 09:02:38 -0800 (PST) Received: from wheely.local0.net ([203.87.79.144]) by smtp.gmail.com with ESMTPSA id c9-20020a170902c1c900b001d3ea8ad878sm4632883plc.290.2024.01.07.09.02.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 09:02:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704646957; x=1705251757; 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=YLpVpr4lXcxtiYkgYwO8f+zCCPIx0i1aEW37ifuFYyc=; b=TFupAU3eRRedZNBOqZX2ti0mujlWAbgKhZvrISNJQhwFtxeFZXH2tzlKBDElTWVoa6 JSDqe76VkhWONbKfjctFklS71YOnwP1M2+6jJKbNw5hk71xCZG1GaVWQSJDxILME9Dz2 lqPqAxa4STIegQaLwgSBURVx6uobKtr85H6rWmAyeQVtnMMNNGryu/e1mxq0TcjZQ7+U +BukVI2HjVM16+8/gMKe7LapX+qvOVfQhbt12iMrD209OHo1xoeDta5JRIGjL9E13tr8 Gfr2B4B+qJOBNzDcpMGgmuuGMTv6wlCNnyi50oQriamlZ6ZHKs+Sa4w9rq11Cfz8ELAx Zn7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704646957; x=1705251757; 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=YLpVpr4lXcxtiYkgYwO8f+zCCPIx0i1aEW37ifuFYyc=; b=TtV7/msOZUy4NDC6EPAW7TFCZoVJNY2r7K/WBlCLuLfxdG2jB1nY0kXPhyeB48mj4X B7e4h6WaJ97e5m2EFElPCbh9ezaTbWiYHhMocOSIqPrIZQIFa/YCUK0bKpJtBGVqmVpd Egba+WBIOOP7Wa7QHdbhDdnGIYmgWSXRCGEtPLoeSI+5bqJ79+xJPx+hLTNwjZiLb4sE 0h0XGN/Jc1Dwg+WaTKtCTDoVMgUhpCpfrEa0gRLI7isLUEcUK0FHckNn9PY6SfsjVHph WKRcGbHKu/W8mMSO5xKqavDuXwfV4w0yerWF8VYAfVBYePjOtXLlXpHhj+WOK34v74BR Vmxg== X-Gm-Message-State: AOJu0Yxik/n1E8a+3ztE7wUYF6EUqBEhDOWE27SlDlNL4oMT95U4blgJ SucMDfyrmopbEm8SHmTPlRO72WZlA0o= X-Google-Smtp-Source: AGHT+IGpVYZH+WxnWpoCV5wMccBY2sxR9/AlZEMxNAz0KrpF9S/IPDXr62OXB4nFej6dlVf3Zu9J3w== X-Received: by 2002:a17:902:ce8c:b0:1d4:399d:8511 with SMTP id f12-20020a170902ce8c00b001d4399d8511mr939223plg.84.1704646956660; Sun, 07 Jan 2024 09:02:36 -0800 (PST) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Daniel Henrique Barboza , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Harsh Prateek Bora , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal , Cleber Rosa , qemu-ppc@nongnu.org Subject: [PATCH 6/9] tests/avocado: Add ppc pseries and powernv hash MMU tests Date: Mon, 8 Jan 2024 03:01:16 +1000 Message-ID: <20240107170119.82222-7-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240107170119.82222-1-npiggin@gmail.com> References: <20240107170119.82222-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::102c; envelope-from=npiggin@gmail.com; helo=mail-pj1-x102c.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: 1704646980577100005 Content-Type: text/plain; charset="utf-8" POWER CPUs support hash and radix MMU modes. Linux supports running in either mode, but defaults to radix. To keep up testing of QEMU's hash MMU implementation, add some Linux hash boot tests. Signed-off-by: Nicholas Piggin --- tests/avocado/ppc_powernv.py | 23 +++++++++++++++++++---- tests/avocado/ppc_pseries.py | 20 +++++++++++++++++--- 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/tests/avocado/ppc_powernv.py b/tests/avocado/ppc_powernv.py index d0e5c07bde..4342941d5d 100644 --- a/tests/avocado/ppc_powernv.py +++ b/tests/avocado/ppc_powernv.py @@ -12,11 +12,11 @@ class powernvMachine(QemuSystemTest): =20 timeout =3D 90 - KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 ' + KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 console=3Dhvc0 ' panic_message =3D 'Kernel panic - not syncing' good_message =3D 'VFS: Cannot open root device' =20 - def do_test_linux_boot(self): + def do_test_linux_boot(self, command_line =3D KERNEL_COMMON_COMMAND_LI= NE): self.require_accelerator("tcg") kernel_url =3D ('https://archives.fedoraproject.org/pub/archive' '/fedora-secondary/releases/29/Everything/ppc64le/os' @@ -25,9 +25,8 @@ def do_test_linux_boot(self): kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) =20 self.vm.set_console() - kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3Dhvc0' self.vm.add_args('-kernel', kernel_path, - '-append', kernel_command_line) + '-append', command_line) self.vm.launch() =20 def test_linux_boot(self): @@ -54,6 +53,22 @@ def test_linux_smp_boot(self): wait_for_console_pattern(self, console_pattern, self.panic_message) wait_for_console_pattern(self, self.good_message, self.panic_messa= ge) =20 + def test_linux_smp_hpt_boot(self): + """ + :avocado: tags=3Darch:ppc64 + :avocado: tags=3Dmachine:powernv + :avocado: tags=3Daccel:tcg + """ + + self.vm.add_args('-smp', '4') + self.do_test_linux_boot(self.KERNEL_COMMON_COMMAND_LINE + + 'disable_radix') + console_pattern =3D 'smp: Brought up 1 node, 4 CPUs' + wait_for_console_pattern(self, 'hash-mmu: Initializing hash mmu', + self.panic_message) + wait_for_console_pattern(self, console_pattern, self.panic_message) + wait_for_console_pattern(self, self.good_message, self.panic_messa= ge) + def test_linux_smt_boot(self): """ :avocado: tags=3Darch:ppc64 diff --git a/tests/avocado/ppc_pseries.py b/tests/avocado/ppc_pseries.py index a8311e6555..74aaa4ac4a 100644 --- a/tests/avocado/ppc_pseries.py +++ b/tests/avocado/ppc_pseries.py @@ -12,11 +12,11 @@ class pseriesMachine(QemuSystemTest): =20 timeout =3D 90 - KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 ' + KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 console=3Dhvc0 ' panic_message =3D 'Kernel panic - not syncing' good_message =3D 'VFS: Cannot open root device' =20 - def do_test_ppc64_linux_boot(self): + def do_test_ppc64_linux_boot(self, kernel_command_line =3D KERNEL_COMM= ON_COMMAND_LINE): kernel_url =3D ('https://archives.fedoraproject.org/pub/archive' '/fedora-secondary/releases/29/Everything/ppc64le/os' '/ppc/ppc64/vmlinuz') @@ -24,7 +24,6 @@ def do_test_ppc64_linux_boot(self): kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) =20 self.vm.set_console() - kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3Dhvc0' self.vm.add_args('-kernel', kernel_path, '-append', kernel_command_line) self.vm.launch() @@ -62,6 +61,21 @@ def test_ppc64_linux_smp_boot(self): wait_for_console_pattern(self, console_pattern, self.panic_message) wait_for_console_pattern(self, self.good_message, self.panic_messa= ge) =20 + def test_ppc64_linux_hpt_smp_boot(self): + """ + :avocado: tags=3Darch:ppc64 + :avocado: tags=3Dmachine:pseries + """ + + self.vm.add_args('-smp', '4') + self.do_test_ppc64_linux_boot(self.KERNEL_COMMON_COMMAND_LINE + + 'disable_radix') + console_pattern =3D 'smp: Brought up 1 node, 4 CPUs' + wait_for_console_pattern(self, 'hash-mmu: Initializing hash mmu', + self.panic_message) + wait_for_console_pattern(self, console_pattern, self.panic_message) + wait_for_console_pattern(self, self.good_message, self.panic_messa= ge) + def test_ppc64_linux_smt_boot(self): """ :avocado: tags=3Darch:ppc64 --=20 2.42.0