From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C97A938BF63 for ; Fri, 3 Jul 2026 09:00:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783069246; cv=none; b=mmZgYhXsPywc5nhadP/Ae9J3EhcuL6ya9B5OMp1yus/iTr/MW6zHm9Oh66+fFftRUEHjnZ7mLQpm+B7qI0+7jZDSEPVlbkXA+labpAkgk1yZhczcJj0/VZXdrkCV12ScARL0e6K64+eu26as+fCLUHS4pUvBPegwFUz44Cuzweo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783069246; c=relaxed/simple; bh=96UXEAvUlxlWxt4T2AaGkg/mJvU9BtkUzAJAILGMUl4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mVzRilV9FTY94LHbWwsfOkF2g0CEfrg1SUVRec000Uh7CNJ5g76327EWsz3AD5raafwVbCc8dM/TF1zsR05oj/IxT9aSMS4CS4qtyQodxFXm2gJotmY/27SJz73dj9cVoruqMcYU++V1uQpjQuLipM3jyoZJC19/kBcyIOjuECA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=gCTBlPFp; arc=none smtp.client-ip=148.163.156.1 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="gCTBlPFp" Received: from pps.filterd (m0360083.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6636IQBs1930912; Fri, 3 Jul 2026 09:00:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=7awpS8I8Wpu9VQAbt b2zTUi9Lkvf7k2wxmW6g0YPPXg=; b=gCTBlPFpTkH6uTPhMcKBomftJZwR2cWoM 7gzdbO+vv7o7Axxse5EriewmwF4vLlq4G9GOTZWTi/HkFoAjmvZoHaIGJzxvvcNh VvciUOoQUzATIFiS6XuPVSS/7IV2m4zCCeZc3vqkGPTKZ2m9qCUGfDFT/cqMa/zs C0ebc++12wLoDvidUtF93PMM3/yllGUWzx2culuxVyum0+t9nF43LkyQ2Q6kO53z rEnple5nNq2Rlop2AAiVcQfiRhQ1Wdjf/Wn63XhYeOQnKiDAqtERD7cRaWkA4Nyz TkhlP0TckWRLM8jEoX3VXT57OF8kiOxAwO1hm8uHyoTU8OVPZANLA== Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4f26peee9q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Jul 2026 09:00:27 +0000 (GMT) Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.18.1.7/8.18.1.7) with ESMTP id 6638o3fh013389; Fri, 3 Jul 2026 09:00:26 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4f2tbhqy2h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Jul 2026 09:00:25 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 66390Krg21693016 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 3 Jul 2026 09:00:22 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9D5BA2004B; Fri, 3 Jul 2026 09:00:20 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B69ED20040; Fri, 3 Jul 2026 09:00:13 +0000 (GMT) Received: from li-3c92a0cc-27cf-11b2-a85c-b804d9ca68fa.ibm.com (unknown [9.124.212.167]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Fri, 3 Jul 2026 09:00:13 +0000 (GMT) From: Aditya Gupta To: , , Harsh Prateek Bora Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Shivang Upadhyay , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Sourabh Jain , Hari Bathini , Nicholas Piggin , Miles Glenn , Fabiano Rosas , Laurent Vivier , Paolo Bonzini , devel@lists.libvirt.org, Misbah Anjum N , Anushree Mathur , Pierrick Bouvier , kvm@vger.kernel.org, Gautam Menghani , Chinmay Rath , BALATON Zoltan , Nikhil Kumar Singh Subject: [PATCH v4 RESEND 2/8] tests/qtest/pnv_spi: Test Power11 PNV_SPI Date: Fri, 3 Jul 2026 14:29:49 +0530 Message-ID: <20260703085955.2318600-3-adityag@linux.ibm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260703085955.2318600-1-adityag@linux.ibm.com> References: <20260703085955.2318600-1-adityag@linux.ibm.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Reinject: loops=2 maxloops=12 X-Proofpoint-GUID: UfUk4WdQehzVlkEbObR11EAq_P9cHQ4l X-Proofpoint-Spam-Info: AW1haW4tMjYwNzAzMDA4MyBTYWx0ZWRfXzCh+jNkkQJq+ pTMYLfchJhYbDmEzge+x+10VGakAw77xFV9AZ6RrWkCxA/Qhd1GpQF9J+Cgj34aXQbGB57nRbvU NhZRuiHULObx21mNXewpk9afcri03Es= X-Authority-Analysis: v=2.4 cv=edsNubEH c=1 sm=1 tr=0 ts=6a477a2b cx=c_pps a=3Bg1Hr4SwmMryq2xdFQyZA==:117 a=3Bg1Hr4SwmMryq2xdFQyZA==:17 a=RAioF0-LDSMA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=iQ6ETzBq9ecOQQE5vZCe:22 a=VnNF1IyMAAAA:8 a=gL735G7rtJRJJwX7cZEA:9 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzAzMDA4MyBTYWx0ZWRfX6XViacElcoZM AtM29/Ot1OU0Gj7Jd6fC1r6WPOSG7jCN/LdGZBrAw0ymTOB797KOjjvDn19G2NsAwCHL0hG9VOC fuLQi1wn+6inh1t/vTD6AKeeNTvXZouBKHqKaVc2Q9q1prd/l01O0ccZeC9wNMBt7i1DlQ0zZHn BbkoKxwUZdqvqkwgLNE7tNZFkW9fNvTifHvNk10Xavmo6CsbUMGS64DcFv1xBPIQd+zBQQ2mMUG WJnysEEXYBGZjGq/Lgepifvqql3r0SnlyGSqGcpehr3PxV0f45ceUkJN9Nbrnuod/Zf7htidKym tgoTr/7vlt08HxV3AjmCarsrEnfvxHDBziq4t4sdTB3DYe+7YI0umD6HZAMY6T3GQMRGoLRMwAY itsK7MQmhK1rUGnnWwVs8bqtbh1hLJAEAoPshEhaQnf4C0EhIiLAeXzpcRn1XVWgcFT5MSxMmm8 ABlRyFU6s65+emA15qw== X-Proofpoint-ORIG-GUID: ETaf7G7QsR1A_JDcI_KXOWt9XzeuFIW6 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-07-03_02,2026-06-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 adultscore=0 impostorscore=0 bulkscore=0 spamscore=0 suspectscore=0 clxscore=1015 lowpriorityscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607030083 Currently pnv-spi-seeprom-test was hardcoded to test the 4th chip in pnv_chips (power10 as of now). This requires ensuring to update the index when removing/adding entries in pnv_chips, such as when Power8E or Power11 gets removed/added in future commits. Iterate over all the chips instead, similar to other tests in pnv-xscom-test.c and pnv-host-i2c-test.c, but skip older chips, since TYPE_PNV_SPI only exists from Power10 onwards, hence skip older machines Tests all the pnv_chips similar to other qtests Tested-by: Misbah Anjum N Reviewed-by: Nikhil Kumar Singh Signed-off-by: Aditya Gupta --- tests/qtest/pnv-spi-seeprom-test.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/tests/qtest/pnv-spi-seeprom-test.c b/tests/qtest/pnv-spi-seeprom-test.c index 44e0b92730b4..1a78e8d966a5 100644 --- a/tests/qtest/pnv-spi-seeprom-test.c +++ b/tests/qtest/pnv-spi-seeprom-test.c @@ -77,6 +77,7 @@ static void test_spi_seeprom(const void *data) const PnvChip *chip = data; QTestState *qts = NULL; g_autofree char *tmp_path = NULL; + const char *machine = "powernv10"; int ret; int fd; @@ -87,11 +88,11 @@ static void test_spi_seeprom(const void *data) g_assert(ret == 0); close(fd); - qts = qtest_initf("-machine powernv10 -smp 2,cores=2," + qts = qtest_initf("-machine %s -smp 2,cores=2," "threads=1 -accel tcg,thread=single -nographic " "-blockdev node-name=pib_spic2,driver=file," "filename=%s -device 25csm04,bus=chip0.spi.2,cs=0," - "drive=pib_spic2", tmp_path); + "drive=pib_spic2", machine, tmp_path); spi_seeprom_transaction(qts, chip); qtest_quit(qts); unlink(tmp_path); @@ -100,9 +101,16 @@ static void test_spi_seeprom(const void *data) int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); - char *tname = g_strdup_printf("pnv-xscom/spi-seeprom/%s", - pnv_chips[3].cpu_model); - qtest_add_data_func(tname, &pnv_chips[3], test_spi_seeprom); - g_free(tname); + + for (int i = 0; i < ARRAY_SIZE(pnv_chips); i++) { + /* TYPE_PNV_SPI is not instantiated for older Power8/9 machines */ + if (pnv_chips[i].chip_type < PNV_CHIP_POWER10) { + continue; + } + + g_autofree char *tname = g_strdup_printf("pnv-xscom/spi-seeprom/%s", + pnv_chips[i].cpu_model); + qtest_add_data_func(tname, &pnv_chips[i], test_spi_seeprom); + } return g_test_run(); } -- 2.55.0