From nobody Sat Sep 26 21:35:37 2026 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=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1788112375; cv=none; d=zohomail.com; s=zohoarc; b=PAi3I3z0zw6y+PN8z6JhfCjfZ2yBntwO1NRypEW5fMRqmLxGCWJ8R9AmRiHDpV8mf4BonbSXMeNwPj0RsudSGF8+h622dk+O5weua4v0/h8B1qiI7ZyTTZoeAtrtZ5O7UUCTf6901ce4k88dgN9yU8wYve4CoqGwObWHO/lFPc8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1788112375; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=xPtMTA67u2wyxCK1Jvbc0WvXjv7zwrf5a4LT3OvGogQ=; b=Bbk9RGtmA2xFBFxAkgR2WPhlgJ4j6vTmQ7fGgX2JNlC6Oy95cmFRh4BRO/YWNivUw9tcOxFo7aFsAsnJB2N4kyXH/T4TUxqELBArsPZaIKBZmOwLPp2cGPwjD/Ky3XrjYZq7uAO0KIfX/z34VYxzvOQHtziKcH7dmXQmd0LP0zo= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 178811237493477.70779506619317; Sun, 30 Aug 2026 10:52:54 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1x0jhb-0005nN-62; Sun, 30 Aug 2026 13:52:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1x0jhY-0005n2-5o; Sun, 30 Aug 2026 13:52:16 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1x0jhV-0000KU-Sc; Sun, 30 Aug 2026 13:52:15 -0400 Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67UGVhKP2874632; Sun, 30 Aug 2026 17:52:10 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4gbnudd7qx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 30 Aug 2026 17:52:10 +0000 (GMT) Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.18.1.7/8.18.1.7) with ESMTP id 67UHfKuc020819; Sun, 30 Aug 2026 17:52:09 GMT Received: from smtprelay02.dal12v.mail.ibm.com ([172.16.1.4]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 4gccexsrx2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 30 Aug 2026 17:52:09 +0000 (GMT) Received: from smtpav06.dal12v.mail.ibm.com (smtpav06.dal12v.mail.ibm.com [10.241.53.105]) by smtprelay02.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 67UHq8Sf64487838 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 30 Aug 2026 17:52:08 GMT Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3929458055; Sun, 30 Aug 2026 17:52:08 +0000 (GMT) Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B33FA58043; Sun, 30 Aug 2026 17:52:04 +0000 (GMT) Received: from [9.124.216.242] (unknown [9.124.216.242]) by smtpav06.dal12v.mail.ibm.com (Postfix) with ESMTP; Sun, 30 Aug 2026 17:52:04 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=pp1; bh=xPtMTA67u2wyxCK1Jvbc0WvXjv7z wrf5a4LT3OvGogQ=; b=FB5twDeleVjiD5E9QKOuOAbGXxYR94hKoeCA4aSg7/9U 1G+e4597D0SN2+G0J7ww23H/XEa274LgJiS6AHkpSOWfiYMuehoKh6Rr6W10Iu4D LbMReGhccuJ7/uWHZl15xWBSBhC0sbmIiWj//6yA53jJf01jDGIxG6sOTNykOzsZ jF3rQ4RlpbaLxTtu965MF9mHwGpo5VDb3oe/0mP6l/Q30Fy8XCix9V21z+gkswnP dXynXTlSout1tIa+IXGVmzvVt+KtJaIY6oqpqfDmOTAYnKgXn83TDLCxcetM+KVj mMFqvkfvu6Mir2im9GqUhzxvVHQH6XuHlTtTyyhTYw== Message-ID: <77e89fea-0284-4e19-8ee7-04b900b13749@linux.ibm.com> Date: Sun, 30 Aug 2026 23:22:03 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: npiggin@gmail.com, Chinmay Rath , milesg@linux.ibm.com, harshpb@linux.ibm.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org Cc: anushree.mathur@linux.ibm.com, misanjum@linux.ibm.com, adityag@linux.ibm.com, gautam@linux.ibm.com From: Aniket Sahu Subject: [PATCH] tests/functional/ppc64: add pseries migration and powernv NVMe tests Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Reinject: loops=2 maxloops=12 X-Proofpoint-GUID: Y7M4tAygjyhkbYgc6bLvbX1Zd9iEOYvN X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODMwMDE1MyBTYWx0ZWRfX69GgBMYHER0m AR5S8ovpC59PgddbwSAfQ/eKWmvuI1xJdNZz8uLht3mnTwsz3PgKic9JRGewiEPHRz2ChWReAJ1 XdisukLtlxiq2mTs0ndInO8YK39shZBM9hFWvuX8QLTujumtjlJThafXCACv+G5M+AkRG744b43 h+YYpWelshgTig1iiDzG2QBzq2yogUHGp7BGCFaGluzeSvvayKLzutYUx3Wa22mFFLwr3pF6BkW OcgSNpAfwZTLJwdHJ3woDm1UW0wc6i7Y5xceclryKA22ii1X8+L8MJwKIOhs8S0fz90y0SF0VUb UvITd4q6z5U07q7tEUHGjNmBijTfyrQabNV/YMFsX6xCplnCeDuWJHhhPo5idO0yh/oS1NKIgwn 0aQmCr+heiM5PZXs/xKD5KrsWZuz2zNTYBttITeYqgt6DUpOdRtjpRwJuZ4+Axc8/RphDgkqDvJ jpwxc5F29gjnW7QAzbw== X-Proofpoint-ORIG-GUID: k34ZvrDbuhraArNsxmKAMFQSxDpGML-- X-Proofpoint-Spam-Info: AW1haW4tMjYwODMwMDE1MyBTYWx0ZWRfX3rh+wUP47SWg 6VP3wHYV1LaN508xJk4jIx1VnUzrbWdACS4OMKGbujT9/xZxDFwfXoqNVb9izDtf/EPJvuUuHfz c7oSGsovxDiulE7k6K+PM+eLiLYaBy8= X-Authority-Analysis: v=2.4 cv=B92JFutM c=1 sm=1 tr=0 ts=6a946dca cx=c_pps a=aDMHemPKRhS1OARIsFnwRA==:117 a=aDMHemPKRhS1OARIsFnwRA==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=V8glGbnc2Ofi9Qvn3v5h:22 a=NEAV23lmAAAA:8 a=VnNF1IyMAAAA:8 a=I-Z7AQhl-F28tbCi2EkA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=O8hF6Hzn-FEA:10 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-30_05,2026-08-27_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 clxscore=1015 suspectscore=0 phishscore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608300153 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=lists1p.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=asahu1x@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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: qemu development 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 @ibm.com) X-ZM-MESSAGEID: 1788112377487158500 Add two new groups of functional tests that cover scenarios currently missing from the ppc64 test suite: 1. pseries live migration (pseries machine type) =C2=A0 =C2=A0- Extends the quick migration suite (already covering mac99) = with =C2=A0 =C2=A0 =C2=A0tcp-localhost, UNIX socket, and exec (socat) migration= tests for =C2=A0 =C2=A0 =C2=A0the pseries machine type.=C2=A0 This complements the e= xisting =C2=A0 =C2=A0 =C2=A0test_ppc64_linux_migration test in test_pseries.py (wh= ich boots a =C2=A0 =C2=A0 =C2=A0full kernel) by providing lightweight no-boot migratio= n smoke tests =C2=A0 =C2=A0 =C2=A0that run quickly. 2. PowerNV NVMe + network device boot (powernv machine type) =C2=A0 =C2=A0- The existing do_test_ppc64_powernv() helper in test_powernv= .py =C2=A0 =C2=A0 =C2=A0already boots a rootfs from NVMe for P8/P9/P10/P11.=C2= =A0 This patch =C2=A0 =C2=A0 =C2=A0adds a complementary test that also verifies the e1000= e network =C2=A0 =C2=A0 =C2=A0adapter and USB xHCI controller are probed successfull= y by Linux - =C2=A0 =C2=A0 =C2=A0previously these were present in the device args but n= o console =C2=A0 =C2=A0 =C2=A0check was made for them. =C2=A0 =C2=A0- Adds test_powernv10_rainier() for the powernv10-rainier var= iant =C2=A0 =C2=A0 =C2=A0that models the IBM Rainier system board. Signed-off-by: Aniket Sahu diff --git a/tests/functional/ppc64/meson.build=20 b/tests/functional/ppc64/meson.build index cb3c745624..19c32c8b67 100644 --- a/tests/functional/ppc64/meson.build +++ b/tests/functional/ppc64/meson.build @@ -1,6 +1,8 @@ =C2=A0# SPDX-License-Identifier: GPL-2.0-or-later =C2=A0test_ppc64_timeouts =3D { +=C2=A0 'pseries_migrate' : 60, +=C2=A0 'powernv_devices' : 480, =C2=A0 =C2=A0'fadump' : 480, =C2=A0 =C2=A0'hv' : 1000, =C2=A0 =C2=A0'mac99' : 120, @@ -14,12 +16,14 @@ test_ppc64_timeouts =3D { =C2=A0tests_ppc64_system_quick =3D [ =C2=A0 =C2=A0'migration', =C2=A0 =C2=A0'vmstate', +=C2=A0 'pseries_migrate', =C2=A0] =C2=A0tests_ppc64_system_thorough =3D [ =C2=A0 =C2=A0'e500', =C2=A0 =C2=A0'fadump', =C2=A0 =C2=A0'hv', +=C2=A0 'powernv_devices', =C2=A0 =C2=A0'mac99', =C2=A0 =C2=A0'openbsd', =C2=A0 =C2=A0'powernv', diff --git a/tests/functional/ppc64/test_powernv_devices.py=20 b/tests/functional/ppc64/test_powernv_devices.py new file mode 100644 index 0000000000..6135855612 --- /dev/null +++ b/tests/functional/ppc64/test_powernv_devices.py @@ -0,0 +1,151 @@ +#!/usr/bin/env python3 +# +# Functional tests that boot Linux on powernv machines and explicitly +# verify that PCIe-attached devices (NVMe, e1000e, xHCI USB) are +# detected by the guest kernel.=C2=A0 Also covers the powernv10-rainier +# board variant. +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import LinuxKernelTest, Asset + + +class PowerNVDevicesTest(LinuxKernelTest): +=C2=A0 =C2=A0 """ +=C2=A0 =C2=A0 Boot Linux on powernv variants and verify that PCIe devices = are +=C2=A0 =C2=A0 detected by the guest. + +=C2=A0 =C2=A0 The existing test_powernv.py::do_test_ppc64_powernv() attach= es an +=C2=A0 =C2=A0 NVMe drive, an e1000e NIC, and an xHCI USB controller, but o= nly +=C2=A0 =C2=A0 waits for the CPU-generation string and the init process. Th= is +=C2=A0 =C2=A0 test adds explicit console pattern checks for each device so= that +=C2=A0 =C2=A0 regressions in device enumeration or PCI/PCIe topology are c= aught. + +=C2=A0 =C2=A0 An additional test covers powernv10-rainier (the IBM Rainier= system +=C2=A0 =C2=A0 board variant) which has a slightly different PHB topology. +=C2=A0 =C2=A0 """ + +=C2=A0 =C2=A0 timeout =3D 480 + +=C2=A0 =C2=A0 ASSET_KERNEL =3D Asset( + ('https://github.com/legoater/qemu-ppc-boot/raw/refs/heads/main/' +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0'buildroot/qemu_ppc64le_powernv8-2025.02= /vmlinux'), + '6fd29aff9ad4362511ea5d0acbb510667c7031928e97d64ec15bbc5daf4b8151') + +=C2=A0 =C2=A0 ASSET_INITRD =3D Asset( + ('https://github.com/legoater/qemu-ppc-boot/raw/refs/heads/main/' +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0'buildroot/qemu_ppc64le_powernv8-2025.02= /rootfs.ext2'), + 'aee2192b692077c4bde31cb56ce474424b358f17cec323d5c94af3970c9aada2') + +=C2=A0 =C2=A0 def setUp(self): +=C2=A0 =C2=A0 =C2=A0 =C2=A0 super().setUp() +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.require_accelerator('tcg') + +=C2=A0 =C2=A0 def _do_test_powernv_pcie_devices(self, machine): +=C2=A0 =C2=A0 =C2=A0 =C2=A0 """ +=C2=A0 =C2=A0 =C2=A0 =C2=A0 Boot *machine* and verify NVMe, e1000e, and xH= CI are detected. + +=C2=A0 =C2=A0 =C2=A0 =C2=A0 Device topology (matches the existing do_test_= ppc64_powernv=20 helper): +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pcie.2=C2=A0 =E2=86=92 NVMe drive (boot= device, rootfs) +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 bridge1 =E2=86=92 e1000e NIC (addr 0x3) +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 bridge1 =E2=86=92 nec-usb-xhci (addr 0x= 2) + +=C2=A0 =C2=A0 =C2=A0 =C2=A0 Expected kernel log patterns checked: +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * "nvme nvme0" =E2=80=94 NVMe controlle= r probe +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * "e1000e"=C2=A0 =C2=A0 =C2=A0=E2=80=94= Intel e1000e NIC probe +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * "xhci_hcd"=C2=A0 =C2=A0=E2=80=94 USB = xHCI host controller probe +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * "Run /sbin/init as init process" =E2= =80=94 reached userland +=C2=A0 =C2=A0 =C2=A0 =C2=A0 """ +=C2=A0 =C2=A0 =C2=A0 =C2=A0 kernel_path =3D self.ASSET_KERNEL.fetch() +=C2=A0 =C2=A0 =C2=A0 =C2=A0 initrd_path =3D self.ASSET_INITRD.fetch() + +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.set_machine(machine) +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.vm.set_console() +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.vm.add_args( +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '-kernel', kernel_path, +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '-drive', + f'file=3D{initrd_path},format=3Draw,if=3Dnone,id=3Ddrive0,readonly=3Don', +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '-append', 'root=3D/dev/nvme0n1 = console=3Dtty0 console=3Dhvc0', +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '-device', 'pcie-pci-bridge,id= =3Dbridge1,bus=3Dpcie.1,addr=3D0x0', +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '-device', 'nvme,drive=3Ddrive0,= bus=3Dpcie.2,addr=3D0x0,serial=3D1234', +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '-device', 'e1000e,bus=3Dbridge1= ,addr=3D0x3', +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '-device', 'nec-usb-xhci,bus=3Db= ridge1,addr=3D0x2', +=C2=A0 =C2=A0 =C2=A0 =C2=A0 ) +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.vm.launch() + +=C2=A0 =C2=A0 =C2=A0 =C2=A0 # NVMe controller should be detected first (it= is the boot disk). +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.wait_for_console_pattern('nvme nvme0') + +=C2=A0 =C2=A0 =C2=A0 =C2=A0 # e1000e NIC detection. +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.wait_for_console_pattern('e1000e') + +=C2=A0 =C2=A0 =C2=A0 =C2=A0 # USB xHCI host controller detection. +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.wait_for_console_pattern('xhci_hcd') + +=C2=A0 =C2=A0 =C2=A0 =C2=A0 # System reached userland =E2=80=94 final sani= ty check. +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.wait_for_console_pattern('Run /sbin/init = as init process') + +=C2=A0 =C2=A0 def test_powernv8_pcie_devices(self): +=C2=A0 =C2=A0 =C2=A0 =C2=A0 """powernv8 (P8): NVMe + e1000e + xHCI detecte= d.""" +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self._do_test_powernv_pcie_devices('powernv8') + +=C2=A0 =C2=A0 def test_powernv9_pcie_devices(self): +=C2=A0 =C2=A0 =C2=A0 =C2=A0 """powernv9 (P9): NVMe + e1000e + xHCI detecte= d.""" +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self._do_test_powernv_pcie_devices('powernv9') + +=C2=A0 =C2=A0 def test_powernv10_pcie_devices(self): +=C2=A0 =C2=A0 =C2=A0 =C2=A0 """powernv10 (P10): NVMe + e1000e + xHCI detec= ted.""" +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self._do_test_powernv_pcie_devices('powernv10') + +=C2=A0 =C2=A0 def test_powernv11_pcie_devices(self): +=C2=A0 =C2=A0 =C2=A0 =C2=A0 """powernv11 (P11): NVMe + e1000e + xHCI detec= ted.""" +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self._do_test_powernv_pcie_devices('powernv11') + +=C2=A0 =C2=A0 def test_powernv10_rainier_pcie_devices(self): +=C2=A0 =C2=A0 =C2=A0 =C2=A0 """ +=C2=A0 =C2=A0 =C2=A0 =C2=A0 powernv10-rainier: NVMe + e1000e + xHCI detect= ed. + +=C2=A0 =C2=A0 =C2=A0 =C2=A0 The Rainier board variant maps PCIe root ports= slightly +=C2=A0 =C2=A0 =C2=A0 =C2=A0 differently from the default powernv10 topolog= y.=C2=A0 Verify that +=C2=A0 =C2=A0 =C2=A0 =C2=A0 the same device set is enumerated successfully. +=C2=A0 =C2=A0 =C2=A0 =C2=A0 """ +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self._do_test_powernv_pcie_devices('powernv10-= rainier') + +=C2=A0 =C2=A0 def test_powernv9_hpt_pcie_devices(self): +=C2=A0 =C2=A0 =C2=A0 =C2=A0 """ +=C2=A0 =C2=A0 =C2=A0 =C2=A0 powernv9 booted with disable_radix (HPT mode):= verify devices. + +=C2=A0 =C2=A0 =C2=A0 =C2=A0 Radix MMU is the default on P9.=C2=A0 Force th= e HPT (Hash Page Table) +=C2=A0 =C2=A0 =C2=A0 =C2=A0 MMU path to exercise an alternative translatio= n code path while +=C2=A0 =C2=A0 =C2=A0 =C2=A0 still ensuring PCI devices are enumerated corr= ectly. +=C2=A0 =C2=A0 =C2=A0 =C2=A0 """ +=C2=A0 =C2=A0 =C2=A0 =C2=A0 kernel_path =3D self.ASSET_KERNEL.fetch() +=C2=A0 =C2=A0 =C2=A0 =C2=A0 initrd_path =3D self.ASSET_INITRD.fetch() + +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.set_machine('powernv9') +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.vm.set_console() +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.vm.add_args( +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '-kernel', kernel_path, +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '-drive', + f'file=3D{initrd_path},format=3Draw,if=3Dnone,id=3Ddrive0,readonly=3Don', +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '-append', +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'root=3D/dev/nvme0n1 console=3Dt= ty0 console=3Dhvc0 disable_radix', +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '-device', 'pcie-pci-bridge,id= =3Dbridge1,bus=3Dpcie.1,addr=3D0x0', +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '-device', 'nvme,drive=3Ddrive0,= bus=3Dpcie.2,addr=3D0x0,serial=3D1234', +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '-device', 'e1000e,bus=3Dbridge1= ,addr=3D0x3', +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '-device', 'nec-usb-xhci,bus=3Db= ridge1,addr=3D0x2', +=C2=A0 =C2=A0 =C2=A0 =C2=A0 ) +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.vm.launch() + +=C2=A0 =C2=A0 =C2=A0 =C2=A0 # HPT-specific boot message. +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.wait_for_console_pattern('hash-mmu: Initi= alizing hash mmu') + +=C2=A0 =C2=A0 =C2=A0 =C2=A0 # Device checks same as the radix path. +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.wait_for_console_pattern('nvme nvme0') +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.wait_for_console_pattern('e1000e') +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.wait_for_console_pattern('xhci_hcd') +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.wait_for_console_pattern('Run /sbin/init = as init process') + + +if __name__ =3D=3D '__main__': +=C2=A0 =C2=A0 PowerNVDevicesTest.main() diff --git a/tests/functional/ppc64/test_pseries_migrate.py=20 b/tests/functional/ppc64/test_pseries_migrate.py new file mode 100644 index 0000000000..0cb929e35f --- /dev/null +++ b/tests/functional/ppc64/test_pseries_migrate.py @@ -0,0 +1,57 @@ +#!/usr/bin/env python3 +# +# Lightweight (no-boot) migration smoke tests for the pseries machine type. +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from migration import MigrationTest + + +class PseriesMigrationTest(MigrationTest): +=C2=A0 =C2=A0 """ +=C2=A0 =C2=A0 Lightweight migration smoke tests for pseries. + +=C2=A0 =C2=A0 No kernel is booted =E2=80=94 QEMU is launched with -nodefau= lts and +=C2=A0 =C2=A0 immediately migrated so the tests run in a few seconds.=C2= =A0 This +=C2=A0 =C2=A0 catches regressions in the pseries vmstate save/restore path +=C2=A0 =C2=A0 without the overhead of a full kernel boot. + +=C2=A0 =C2=A0 These complement the existing test_ppc64_linux_migration tes= t in +=C2=A0 =C2=A0 test_pseries.py which exercises migration mid-boot. +=C2=A0 =C2=A0 """ + +=C2=A0 =C2=A0 timeout =3D 60 + +=C2=A0 =C2=A0 def test_pseries_migration_with_tcp_localhost(self): +=C2=A0 =C2=A0 =C2=A0 =C2=A0 """Basic TCP-localhost migration for pseries."= "" +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.set_machine('pseries') +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.migration_with_tcp_localhost() + +=C2=A0 =C2=A0 def test_pseries_migration_with_unix(self): +=C2=A0 =C2=A0 =C2=A0 =C2=A0 """UNIX socket migration for pseries.""" +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.set_machine('pseries') +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.migration_with_unix() + +=C2=A0 =C2=A0 def test_pseries_migration_with_exec(self): +=C2=A0 =C2=A0 =C2=A0 =C2=A0 """exec (socat) migration for pseries.""" +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.set_machine('pseries') +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.migration_with_exec() + +=C2=A0 =C2=A0 def test_powernv_migration_with_tcp_localhost(self): +=C2=A0 =C2=A0 =C2=A0 =C2=A0 """Basic TCP-localhost migration for powernv."= "" +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.set_machine('powernv') +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.migration_with_tcp_localhost() + +=C2=A0 =C2=A0 def test_powernv_migration_with_unix(self): +=C2=A0 =C2=A0 =C2=A0 =C2=A0 """UNIX socket migration for powernv.""" +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.set_machine('powernv') +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.migration_with_unix() + +=C2=A0 =C2=A0 def test_powernv_migration_with_exec(self): +=C2=A0 =C2=A0 =C2=A0 =C2=A0 """exec (socat) migration for powernv.""" +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.set_machine('powernv') +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.migration_with_exec() + + +if __name__ =3D=3D '__main__': +=C2=A0 =C2=A0 MigrationTest.main() -- 2.53.0