From nobody Sat Sep 26 19:14:28 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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; arc=fail (Bad Signature); dmarc=fail(p=none dis=none) header.from=korins.ky Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1790204781663116.41607175916931; Wed, 23 Sep 2026 16:06:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1x9W1c-0000HL-GL; Wed, 23 Sep 2026 19:05:16 -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 1x9W1a-0000FG-9U; Wed, 23 Sep 2026 19:05:14 -0400 Received: from mx2.catap.net ([2a01:4f9:3b:5410::2]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1x9W1X-0002Uj-6c; Wed, 23 Sep 2026 19:05:13 -0400 Received: by mx2.catap.net (OpenSMTPD) with ESMTPSA id 339829b8 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 24 Sep 2026 01:05:06 +0200 (CEST) Received: from localhost (matebook.home.arpa [local]) by matebook.home.arpa (OpenSMTPD) with ESMTPA id da2a7629; Thu, 24 Sep 2026 01:05:03 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=20240125rsa; cv=none; d=mx.catap.net; b=WjW/ToS /XSOJkO/LdpmjueEfc7A0P9Klen3W18ZFFRVfN7leJ6LSiEgA2FzlROBoDjaQ7LKXN+OPz NXTFHWly97K0gRw2xaS9VNSG+0UxRhN6yddes6IwGKGCt9vTR6YoxDuC/z0EXDS5UXeh1r shuN1+1CesINjUI/f1ZGYPb7RTAf1ejZX/PSa6s7iIIGBwSKTHRiVs02EkXoqtYDWgX7LG ye/+9zAnJnUDlwtultv39b3UafAKxRKsDpvRg9/YnZ4pnh57czjrjE+mf9NnQD6dDmLOdX k5stA+3laDQiRATKZ0EwI+vjltcHJb2kWtvEE+pQ2XkR08JNj4fgIGQ== ARC-Message-Signature: i=1; a=rsa-sha256; s=20240125rsa; c=simple/simple; bh=0 ERyRb6mMZLjjAVoNWZHwoNrm9+FPGn+a7XsywChKAY=; h=references:in-reply-to: date:subject:cc:to:from:dkim-signature:dkim-signature; d=mx.catap.net; b=kT+0Hsi5/tVc4zG0VELiYPbvXjh296I8AiP7ImoQoislC9z3RLyATN73Ra8HrYumjfiT Lu53hXoaUxjSn28s/sS958227vrP/iQaYtbxZOKJjmnwParE8lJlCM2I6VDZ9jHJZp2yxx E8RQU8xoTTg1bkarQfhhPj2wKZsu14xXgYsaNCmrFdVtOXyPgJ7gEuVHQF0JLUgTh1tbtR ii16QcRJ25oq1C6KElCxL5iJm1q85Jsm6LRLFZ4jhWiAqF8Bbbvc6UGJP4GlNGywaKpC/G Lpteye32tuoUlicNDxF8lqUnJoL+ZQ/25IPUU2/ojGiGdZJKVqi2Vd/JTmsRrUJQ== ARC-Authentication-Results: i=1; mx.catap.net; dkim=pass header.s=20240125rsa header.d=korins.ky header.a=rsa-sha256 header.b=V7N5z46L; dkim=pass header.s=20240125ed25519 header.d=korins.ky header.a=ed25519-sha256 header.b=siHZmRGE; arc=none; iprev=pass; spf=none smtp.helo=postmaster@matebook.home.arpa; spf=softfail smtp.mailfrom=kirill@korins.ky DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=20240125rsa; bh=0ERyRb6m MZLjjAVoNWZHwoNrm9+FPGn+a7XsywChKAY=; h=references:in-reply-to:date: subject:cc:to:from; d=korins.ky; b=V7N5z46Lsxg+6D1v7aK/PTW4J4vqUWHA423 KHE6/Zxag2gCQL/dO9c1sERMS3eQL9vRUCF1ad3Sgn0Y68/If8094Q5dhIRGbCco8HCSXm m4IANO3iqAgzjpfQzfUK7g1g++PKmo0+pqnO51nH1STkPHohMh+C3G1M4GuoMuIKqbIi+z zmT6kCwyeUWs2qgCvyVwA00Z2E46nJ2z766DRk1pWBuxI4bvkr+9wRWddILLCy3tw8qeQv KJGLKNbZamHT9cG3BgEXvTd1NgDI/IISO/++7q2t+eolU+CJx0GJ0K4E8qvEtI4LjyrVT1 zkUqpKCEDnPVpPQLPKo/2zVHsGQ== DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=20240125ed25519; bh=0ERyRb6mMZLjjAVoNWZHwoNrm9+FPGn+a7XsywChKAY=; h=references: in-reply-to:date:subject:cc:to:from; d=korins.ky; b=siHZmRGE1IoS0d8/oY DwOAecNZoLdhIjedOfBBbAUNT9ozerdXxGAj5fLq3UVwLZWW19P63YeEzCa5koZ1y0DQ== From: Kirill A. Korinsky To: Mark Cave-Ayland , Chinmay Rath , Nicholas Piggin , Glenn Miles , Harsh Prateek Bora , qemu-devel@nongnu.org, qemu-ppc@nongnu.org Cc: "Kirill A . Korinsky" , Anushree Mathur , Amit Machhiwal Subject: [PATCH v2 1/5] openpic: Preserve IRQs masked by CTPR Date: Thu, 24 Sep 2026 01:03:07 +0200 Message-ID: <20260923230452.3765-2-kirill@korins.ky> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260923230452.3765-1-kirill@korins.ky> References: <20260923230452.3765-1-kirill@korins.ky> 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a01:4f9:3b:5410::2; envelope-from=kirill@korins.ky; helo=mx2.catap.net 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=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: fail (found 2 invalid signatures) X-ZM-MESSAGEID: 1790204785104158500 Content-Type: text/plain; charset="utf-8" From: "Kirill A. Korinsky" OpenBSD exposes this by raising CTPR while handling interrupts. If an edge remains pending when EOI lowers the servicing priority, QEMU reasserts INT without checking CTPR; IACK then returns the spurious vector and consumes the masked edge before CTPR permits delivery. Signed-off-by: Kirill A. Korinsky Tested-by: Anushree Mathur Tested-by: Mark Cave-Ayland Reviewed-by: Amit Machhiwal Reviewed-by: Mark Cave-Ayland --- hw/intc/openpic.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c index 99d2a1e65e..6f9a562163 100644 --- a/hw/intc/openpic.c +++ b/hw/intc/openpic.c @@ -1033,8 +1033,9 @@ static void openpic_cpu_write_internal(void *opaque, = hwaddr addr, n_IRQ =3D IRQ_get_next(opp, &dst->raised); if (n_IRQ !=3D -1) { src =3D &opp->src[n_IRQ]; - if (s_IRQ =3D=3D -1 || - IVPR_PRIORITY(src->ivpr) > dst->servicing.priority) { + if (IVPR_PRIORITY(src->ivpr) > dst->ctpr && + (s_IRQ =3D=3D -1 || + IVPR_PRIORITY(src->ivpr) > dst->servicing.priority)) { DPRINTF("Raise OpenPIC INT output cpu %d irq %d", idx, n_IRQ); qemu_irq_raise(opp->dst[idx].irqs[OPENPIC_OUTPUT_INT]); @@ -1070,12 +1071,13 @@ static uint32_t openpic_iack(OpenPICState *opp, IRQ= Dest *dst, int cpu) } =20 src =3D &opp->src[irq]; - if (!(src->ivpr & IVPR_ACTIVITY_MASK) || - !(IVPR_PRIORITY(src->ivpr) > dst->ctpr)) { + if (!(src->ivpr & IVPR_ACTIVITY_MASK)) { error_report("%s: bad raised IRQ %d ctpr %d ivpr 0x%08x", __func__, irq, dst->ctpr, src->ivpr); openpic_update_irq(opp, irq); retval =3D opp->spve; + } else if (IVPR_PRIORITY(src->ivpr) <=3D dst->ctpr) { + return opp->spve; } else { /* IRQ enter servicing state */ IRQ_setbit(&dst->servicing, irq); --=20 2.55.0 From nobody Sat Sep 26 19:14:28 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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; arc=fail (Bad Signature); dmarc=fail(p=none dis=none) header.from=korins.ky Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1790204781154216.95800142876533; Wed, 23 Sep 2026 16:06:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1x9W1e-0000IR-W7; Wed, 23 Sep 2026 19:05: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 1x9W1b-0000Gf-Hg; Wed, 23 Sep 2026 19:05:15 -0400 Received: from mx2.catap.net ([65.21.79.163]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1x9W1Z-0002UK-NT; Wed, 23 Sep 2026 19:05:15 -0400 Received: by mx2.catap.net (OpenSMTPD) with ESMTPSA id 5d7766f5 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 24 Sep 2026 01:05:07 +0200 (CEST) Received: from localhost (matebook.home.arpa [local]) by matebook.home.arpa (OpenSMTPD) with ESMTPA id d3af0043; Thu, 24 Sep 2026 01:05:04 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=20240125rsa; cv=none; d=mx.catap.net; b=I3f3aSh 0MfeZIbWNSLSO1naWWxgLHNqSA0KP3ooldU33qbyYdecfr4l22EtRxK/xNjFramK68YQFA k+Wm56UHABgKktZEbGe2cpRQEZBPNhqTGiVwRWAnemF6AB6d7RQz7JHv/tacNJoZccjpKC wyYJFiNLfNkrH0ztjnoUCocim1wmjF+cGtfHKCzd+gOiK1SHypBZd7pA79WfW4OpyhMXrh +DgVtLyglh6ulHUliHJajc0YU8W1x5dP6uiPWSArjP5thK02dEopFD5TDRq95+T7ctDBHe QcQTPb5jWBRI7nTqn4IvVrbTVs98zJGnKYbMfzEuhBbqINg5kUoO9vA== ARC-Message-Signature: i=1; a=rsa-sha256; s=20240125rsa; c=simple/simple; bh=S 0NTA0YEh0iySGAAs7Db5F2ShRlK5P+pRPEHwRHbeDo=; h=references:in-reply-to: date:subject:cc:to:from:dkim-signature:dkim-signature; d=mx.catap.net; b=yHsTUM+tHW4umvSdCtRbKsRWVPkhI/p7agrqYqI1EkP5KP+Sym+t3Ol4EsFh/TXW2JKW Xe6cRtje1E/enZe81R2w1G3EtgSVnU1tfcFvvGHqBeVnMBaQ2AWABbjel+iVZcyTOs/b/d /EgSWqanJc55pKqgmcLWtE/BMCG3kaANQMJWS2QNN6ebp4GpepXN180ASyAtl87fzNgfsj 2RGOUyN9uW4neIsOgsxAQa/Wet+tMxezWlvSMrfvWwA7Blz9aEp7WaHEd2AyXAnK7sKHB2 bp3ZefMSahNgHuIvaJ7i/GOFkWpIoB7pFBPA0H0j3jK7RYRZRibg6NHEcoNgZrEg== ARC-Authentication-Results: i=1; mx.catap.net; dkim=pass header.s=20240125rsa header.d=korins.ky header.a=rsa-sha256 header.b=QTzqXLa/; dkim=pass header.s=20240125ed25519 header.d=korins.ky header.a=ed25519-sha256 header.b=nI4hTMTv; arc=none; iprev=pass; spf=none smtp.helo=postmaster@matebook.home.arpa; spf=softfail smtp.mailfrom=kirill@korins.ky DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=20240125rsa; bh=S0NTA0YE h0iySGAAs7Db5F2ShRlK5P+pRPEHwRHbeDo=; h=references:in-reply-to:date: subject:cc:to:from; d=korins.ky; b=QTzqXLa/VsTWy6hKbu5qzTaE8fSrCkbmonz rMZn2GZpAxUuBhdC1JmLkqfCjCfTdFen4HhF2kjLm3gavwi/HHZGFhMpvKV679qEI00Qwl w+La/KM3WKiKOER+VqqQhfCnUZY8aZYyw9e5Gw4BF/ZueVD4EVRCqshXv3VnutQ55GNgff irxlfR+EX0mKzj2mCryBTJEIyDsihkMrbHbhynHBC1mtxmLsilXv0s+eq/ZxHaX/Zcnu4O D5pj402+HEeQgHRaReMgOFP1ikZof2YZYEMoAe2xlhzWmBQlYEwL01QggkTa21nnvxJXha 461otUaHvm6bdjUCHvimB4rQgwA== DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=20240125ed25519; bh=S0NTA0YEh0iySGAAs7Db5F2ShRlK5P+pRPEHwRHbeDo=; h=references: in-reply-to:date:subject:cc:to:from; d=korins.ky; b=nI4hTMTvffv7PULEhE rOhCILn+PoQb4/nEBQ4hElGcl32gGVqMhs9UlnSPe0Hg94mpWubegjun3Xj+gX0vOnAg== From: Kirill A. Korinsky To: Mark Cave-Ayland , Chinmay Rath , Nicholas Piggin , Glenn Miles , Harsh Prateek Bora , qemu-devel@nongnu.org, qemu-ppc@nongnu.org Cc: "Kirill A . Korinsky" , Anushree Mathur , Amit Machhiwal Subject: [PATCH v2 2/5] ppc: Raise decrementer IRQ on zero write Date: Thu, 24 Sep 2026 01:03:08 +0200 Message-ID: <20260923230452.3765-3-kirill@korins.ky> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260923230452.3765-1-kirill@korins.ky> References: <20260923230452.3765-1-kirill@korins.ky> 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=lists1p.gnu.org; Received-SPF: pass client-ip=65.21.79.163; envelope-from=kirill@korins.ky; helo=mx2.catap.net X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=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: fail (found 2 invalid signatures) X-ZM-MESSAGEID: 1790204783543158500 Content-Type: text/plain; charset="utf-8" From: "Kirill A. Korinsky" OpenBSD writes zero to an edge triggered decrementer, then enters idle expecting its interrupt. QEMU defers the already due edge to a timer at the current virtual time, leaving the guest stalled. Signed-off-by: Kirill A. Korinsky Tested-by: Anushree Mathur Tested-by: Mark Cave-Ayland Suggested-by: Amit Machhiwal --- hw/ppc/ppc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c index b123b4cc1c..736a37d32b 100644 --- a/hw/ppc/ppc.c +++ b/hw/ppc/ppc.c @@ -885,10 +885,17 @@ static void __cpu_ppc_store_decr(PowerPCCPU *cpu, int= 64_t now, uint64_t *nextp, * an edge interrupt, so raise it here too. */ if (((flags & PPC_DECR_UNDERFLOW_LEVEL) && signed_value < 0) || + ((flags & PPC_DECR_ZERO_TRIGGERED) && value =3D=3D 0) || ((flags & PPC_DECR_UNDERFLOW_TRIGGERED) && signed_value < 0 && signed_decr >=3D 0)) { (*raise_excp)(cpu); return; + } else { + /* + * Classic 32-bit edge-triggered decrementer: zero write fires + * immediately + */ + tb_env->flags |=3D PPC_DECR_ZERO_TRIGGERED; } =20 /* On MSB level based systems a 0 for the MSB stops interrupt delivery= */ --=20 2.55.0 From nobody Sat Sep 26 19:14:28 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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; arc=fail (Bad Signature); dmarc=fail(p=none dis=none) header.from=korins.ky Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1790204781156120.19281182095858; Wed, 23 Sep 2026 16:06:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1x9W1a-0000FH-Dy; Wed, 23 Sep 2026 19:05:14 -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 1x9W1Y-0000Ee-Rf; Wed, 23 Sep 2026 19:05:12 -0400 Received: from mx1.catap.net ([162.55.82.72]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1x9W1X-0002UZ-1j; Wed, 23 Sep 2026 19:05:12 -0400 Received: by mx1.catap.net (OpenSMTPD) id 5777cc3d; Thu, 24 Sep 2026 01:05:07 +0200 (CEST) Received: from localhost (matebook.home.arpa [local]) by matebook.home.arpa (OpenSMTPD) with ESMTPA id 3cd5539d; Thu, 24 Sep 2026 01:05:04 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=20240125rsa; cv=none; d=mx.catap.net; b=W2siyaP QgpQZmNRQFOReEaIGYbxclUMqMyBPgtVydBl5qOHL5T+ifWAcTgCcQaC6yWub0Tgjmcfyi ORfAlytzeuNbHDP///XrGj42MkCml4YU9gLvJP/2JW+trFWlpV64TW7fjR/uGIXaSCl28Z V8zPKXw0+UNr2CpyoFu2FZLYk1BZMUstJiL+9fRP4RIjl5yVBOxf5IJDz8f1hRD9LsIq23 mzxyGSyd+aHc9gWhrvBLCEH4E4+0m4HGO7yunfCsw2Alx7qMrH/wLHqmFH/PxkrJ3xDR9E GP/sk6tWy7/IoL6Znhc/C1Dm77+Z+YUzST4p1ApOuzJ7+5WydY+TcOA== ARC-Message-Signature: i=1; a=rsa-sha256; s=20240125rsa; c=simple/simple; bh=0 VvGzzvtw6mkJpUk2FBAT6jJyveAIEvnR/DUkN/2r+c=; h=references:in-reply-to: date:subject:cc:to:from:dkim-signature:dkim-signature; d=mx.catap.net; b=t3b3KdKY8PWrLrlG1Npf7OeKYReYG00Sy3tjiZtGu829vVjGOd6bsAhgt97YpvRVuR5C skMZCWfInFY4JQG7WIMks5pbhf7XTzzTgBgOIDDWEurLWt8/Z/B5b6Nq9vsfmHlg7rFV2l TKHCczdDBVU0aPVNX0jC8XUphqxVH8DJHdqE8s9uhSXc4NNbUwJ55rDyH03RXwTvfJWUnY rngoEsLI+RPWt2Lms8zqGuUQxhQG9O1nPkBtAxlsdRP7Efx1rqMcqEV7najGlPrJiWJghA pN+n0p3tORfj6VFCBt3zvS+b9B9GQI6rGAd7H0w5nzPL+3RREW7JUKeO5QncDpag== ARC-Authentication-Results: i=1; mx.catap.net; dkim=pass header.s=20240125rsa header.d=korins.ky header.a=rsa-sha256 header.b=d0vZaptq; dkim=pass header.s=20240125ed25519 header.d=korins.ky header.a=ed25519-sha256 header.b=oRN9xfsR; arc=none; iprev=pass; spf=none smtp.helo=postmaster@matebook.home.arpa; spf=softfail smtp.mailfrom=kirill@korins.ky DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=20240125rsa; bh=0VvGzzvt w6mkJpUk2FBAT6jJyveAIEvnR/DUkN/2r+c=; h=references:in-reply-to:date: subject:cc:to:from; d=korins.ky; b=d0vZaptqy/A+dSV5L3GrvKATDFQw083RccT RuKsme2h5REa/c656NwEXI/HWYPKQV73ZeAWqF3fmggJdRtgmHaTDghHqOOGVHe4G/vZN3 3QpgKRqDJy1p9K44bQcafmIr4hmGfemB3E5zraG5mbp5kfZ+cfMSW+png3EqeFyt/p2Hg9 u+tgv0V8YJf5Tzxcye6Y9MtM6fNKdntji6jH0FrwITkjVnFxIyojQdFUhCMQ5XYNiItVNo 3hWtmz2L6n9gpMmnpBJZZbzKb25Ap9lm3w9MKMwsbEsLBB49tVlVKRy/eNYV07z2jdTBZV sIoP/VgWiGkmgSwTw4cu+ilvUjg== DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=20240125ed25519; bh=0VvGzzvtw6mkJpUk2FBAT6jJyveAIEvnR/DUkN/2r+c=; h=references: in-reply-to:date:subject:cc:to:from; d=korins.ky; b=oRN9xfsRgE/4i1Vn1w nc1ryNCNQcoqDB4STPGSdmXRLSY076mjMzg+3aTvZ2nP6B1MTOrXtpgQXFiTiUfhc/AQ== From: Kirill A. Korinsky To: Mark Cave-Ayland , Chinmay Rath , Nicholas Piggin , Glenn Miles , Harsh Prateek Bora , qemu-devel@nongnu.org, qemu-ppc@nongnu.org Cc: "Kirill A . Korinsky" , Anushree Mathur Subject: [PATCH v2 3/5] cuda: Include command in successful ADB replies Date: Thu, 24 Sep 2026 01:03:09 +0200 Message-ID: <20260923230452.3765-4-kirill@korins.ky> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260923230452.3765-1-kirill@korins.ky> References: <20260923230452.3765-1-kirill@korins.ky> 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=lists1p.gnu.org; Received-SPF: pass client-ip=162.55.82.72; envelope-from=kirill@korins.ky; helo=mx1.catap.net X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=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: fail (found 2 invalid signatures) X-ZM-MESSAGEID: 1790204783538158500 Content-Type: text/plain; charset="utf-8" From: "Kirill A. Korinsky" OpenBSD and Linux expect the ADB command between the CUDA status and reply data. QEMU omits it on success, so guests consume the first data byte as the command and lose it from the reply. Signed-off-by: Kirill A. Korinsky Tested-by: Anushree Mathur Tested-by: Mark Cave-Ayland Reviewed-by: Mark Cave-Ayland --- hw/misc/macio/cuda.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c index 312dde242b..ccb3e1d74b 100644 --- a/hw/misc/macio/cuda.c +++ b/hw/misc/macio/cuda.c @@ -431,11 +431,12 @@ static void cuda_receive_packet_from_host(CUDAState *= s, { uint8_t obuf[ADB_MAX_OUT_LEN + 3]; int olen; - olen =3D adb_request(&s->adb_bus, obuf + 2, data + 1, len - 1); + olen =3D adb_request(&s->adb_bus, obuf + 3, data + 1, len - 1); if (olen > 0) { obuf[0] =3D ADB_PACKET; obuf[1] =3D 0x00; - cuda_send_packet_to_host(s, obuf, olen + 2); + obuf[2] =3D data[1]; + cuda_send_packet_to_host(s, obuf, olen + 3); } else { /* error */ obuf[0] =3D ADB_PACKET; --=20 2.55.0 From nobody Sat Sep 26 19:14:28 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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; arc=fail (Bad Signature); dmarc=fail(p=none dis=none) header.from=korins.ky Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1790204781152750.7535413748109; Wed, 23 Sep 2026 16:06:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1x9W1h-0000J4-3G; Wed, 23 Sep 2026 19:05:21 -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 1x9W1c-0000Ht-SW; Wed, 23 Sep 2026 19:05:16 -0400 Received: from mx2.catap.net ([2a01:4f9:3b:5410::2]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1x9W1b-0002Uj-4r; Wed, 23 Sep 2026 19:05:16 -0400 Received: by mx2.catap.net (OpenSMTPD) with ESMTPSA id 14b57557 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 24 Sep 2026 01:05:07 +0200 (CEST) Received: from localhost (matebook.home.arpa [local]) by matebook.home.arpa (OpenSMTPD) with ESMTPA id 9395963f; Thu, 24 Sep 2026 01:05:04 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=20240125rsa; cv=none; d=mx.catap.net; b=ks7wy88 9ZzVOpVTZoF2kRIDukXOej0Qa5GFZ0aR+X6X+5X7kaRedU8dgpuxBqQ3pF82ClTBMeQxMZ k88tDpv0mtKZ6WxJwPNRxS3weiFhW/11TBPcR+G5oD7PL92MVOAWb+/vC4HHH8LuFy61O2 xZqktT9ltsmKQkNo9fvDMl92APzKLmzBMjhvUow/9NERE82nDNugXq0JkRdc7uChfRz8qx svvLZTnkrjaEHBUEM8qpZRL2+MxnqX/Kh6M9AggPvHuYVw37yubXABCAL4XKpo6a70638j hXbhx/ICeBzVwyH3pF0YNWb05tbr18LO6up9oSMcP/9xtiysvtQoi8A== ARC-Message-Signature: i=1; a=rsa-sha256; s=20240125rsa; c=simple/simple; bh=j mhdMfhDq60vgJ+jMlgvi0rNRY/D0fggYG4fvks+BTc=; h=references:in-reply-to: date:subject:cc:to:from:dkim-signature:dkim-signature; d=mx.catap.net; b=N/+UvV/B6WyysgIUpkftRIOtIXf+EBayiUZs1NU0eR1gggB0C0ixWrG3WSrGiCBh8FDB iKo8nLI8sqTcIQ2+RtbZ2E8pyAxWEp1B8dZmUkE8jKOAx6nfatytMiZ0JNhAmL3kI8rs7h 26laOpv4aTyImrzLdwDw9IAL8F2Wn2g+2rCkFEzJAgneWJhn5cR+89idQ/poQkKaVIzVtM oWVHY7EM6k/+tJB1Gw14Fv1aLC74Pe2Fc2rsHJiMxj4QvJgAYVq1jRcGKcLdtj1iUN+02L xdO8Kzpp60epincYXNoEincX35DY73KS+NzRDA2suP5nrqMe0UkNvKXTGmEWSgIw== ARC-Authentication-Results: i=1; mx.catap.net; dkim=pass header.s=20240125rsa header.d=korins.ky header.a=rsa-sha256 header.b=baI4sjaT; dkim=pass header.s=20240125ed25519 header.d=korins.ky header.a=ed25519-sha256 header.b=3916D7o7; arc=none; iprev=pass; spf=none smtp.helo=postmaster@matebook.home.arpa; spf=softfail smtp.mailfrom=kirill@korins.ky DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=20240125rsa; bh=jmhdMfhD q60vgJ+jMlgvi0rNRY/D0fggYG4fvks+BTc=; h=references:in-reply-to:date: subject:cc:to:from; d=korins.ky; b=baI4sjaTtnQe9LH9cfqWZZb1oF+Z/0y1Zsc D9il1MHS6zkgBSIll5GGVdzxh7M0Wf4qSlB52R9+RtsFm37lBJAt5NtwmWjmYD3KUSbfvz QeSZ3ebd7R0gox8Vs8AHayxBk1FKpyTseXTC4kzqv8sMV7UuT8agPdIoYDuJ1q3GDmaPBN XFVYGVtAXC5WyEGFJOP38upg53aHLhXk+j8rIxYS69auHjIr09g9rnmalFL4XcokF0HA2z oWZhq2WznqmBCsvLh6kQXqkKMRPxeH/6j7Rcy/6Il3aA1ssS4z1cGU2IpvrS+CKPLhQ17Q S2NNIhcSipOdO8tilvD/evVU6Ww== DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=20240125ed25519; bh=jmhdMfhDq60vgJ+jMlgvi0rNRY/D0fggYG4fvks+BTc=; h=references: in-reply-to:date:subject:cc:to:from; d=korins.ky; b=3916D7o75d3MOFVj7n IS6Bp1KIQo4s+AXTfR8eMvwhRwqXiD+WAQBzKRjLn7Tc4thGDV77zHJ3Zpqqp4IzAgBQ== From: Kirill A. Korinsky To: Mark Cave-Ayland , Chinmay Rath , Nicholas Piggin , Glenn Miles , Harsh Prateek Bora , qemu-devel@nongnu.org, qemu-ppc@nongnu.org Cc: "Kirill A . Korinsky" , Anushree Mathur Subject: [PATCH v2 4/5] cuda: Make shift register delay configurable Date: Thu, 24 Sep 2026 01:03:10 +0200 Message-ID: <20260923230452.3765-5-kirill@korins.ky> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260923230452.3765-1-kirill@korins.ky> References: <20260923230452.3765-1-kirill@korins.ky> 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a01:4f9:3b:5410::2; envelope-from=kirill@korins.ky; helo=mx2.catap.net 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=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: fail (found 2 invalid signatures) X-ZM-MESSAGEID: 1790204783464158500 Content-Type: text/plain; charset="utf-8" From: "Kirill A. Korinsky" The CUDA model assumes a 20 microsecond delay before each shift register interrupt. OpenBSD times out during device discovery with that timing, so retain the existing default but allow an override. Signed-off-by: Kirill A. Korinsky Tested-by: Anushree Mathur Tested-by: Mark Cave-Ayland Reviewed-by: Mark Cave-Ayland --- hw/misc/macio/cuda.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c index ccb3e1d74b..f06583377a 100644 --- a/hw/misc/macio/cuda.c +++ b/hw/misc/macio/cuda.c @@ -535,7 +535,6 @@ static void cuda_realize(DeviceState *dev, Error **errp) s->tick_offset =3D (uint32_t)mktimegm(&tm) + RTC_OFFSET; =20 s->sr_delay_timer =3D timer_new_ns(QEMU_CLOCK_VIRTUAL, cuda_set_sr_int= , s); - s->sr_delay_ns =3D 20 * SCALE_US; =20 adb_register_autopoll_callback(adb_bus, cuda_adb_poll, s); } @@ -557,6 +556,8 @@ static void cuda_init(Object *obj) =20 static const Property cuda_properties[] =3D { DEFINE_PROP_UINT64("timebase-frequency", CUDAState, tb_frequency, 0), + DEFINE_PROP_UINT64("x-sr-delay-ns", CUDAState, sr_delay_ns, + 20 * SCALE_US), }; =20 static void cuda_class_init(ObjectClass *oc, const void *data) --=20 2.55.0 From nobody Sat Sep 26 19:14:28 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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; arc=fail (Bad Signature); dmarc=fail(p=none dis=none) header.from=korins.ky Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1790204789323470.9593702469149; Wed, 23 Sep 2026 16:06:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1x9W1d-0000Hu-2J; Wed, 23 Sep 2026 19:05:17 -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 1x9W1a-0000Fr-Np; Wed, 23 Sep 2026 19:05:14 -0400 Received: from mx1.catap.net ([2a01:4f8:271:125e::2]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1x9W1X-0002Uq-K2; Wed, 23 Sep 2026 19:05:14 -0400 Received: by mx1.catap.net (OpenSMTPD) id 782ab56b; Thu, 24 Sep 2026 01:05:07 +0200 (CEST) Received: from localhost (matebook.home.arpa [local]) by matebook.home.arpa (OpenSMTPD) with ESMTPA id 442dd515; Thu, 24 Sep 2026 01:05:04 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=20240125rsa; cv=none; d=mx.catap.net; b=XknedKP +ZDcNu1XdNmFEZuJ9SshEnoDcTnhw3h2IJjTdkdjyOBSeQNZ3uOJ1kYIA1DfJfdMDYMQHG 9UnbhISX1na2wMVDOWDDcVUOC+2ohK9RRIlJD7ch7N+i/Z6uvqdg5tml/OR5yD6pCOJZkG L7vzmAXh80CrafQlj/Sca4TgvjwyXOX5HGoT/DUKDxfh/uDZBxxQzUxEuc1ZHyhWQ74aV0 y805KgqyETGsTbifVkc+khnzAqoehPWUx4hKgcM0AxZ7P1OcB5b9bQRzZ/eT+oOFHXyqOu uU/R7HzXoZjWtsxPKjxiol+fQ/d2rA1w5BPqCbOpE870FY4Kd76LMOQ== ARC-Message-Signature: i=1; a=rsa-sha256; s=20240125rsa; c=simple/simple; bh=g kKTvn9s/lYw1zAlj9kSBjShEkdgZBP1EPjl78qjmB8=; h=references:in-reply-to: date:subject:cc:to:from:dkim-signature:dkim-signature; d=mx.catap.net; b=mmYN1FimcSyRuE+k1kMKDD5dxDm3+KNiowO7OE344HKaYFyTv4kdEC9NejAJyqrGF8Tz xx59D2DBLIaf/U0g2XSsRm/CYGux/sbMikvfPPsh3u7RZB9HGkrfgF/CNcV0oM1LFHk+yD dZXukDYxvoAlOSPr8jpt3UWCQ0lm7BdYm2O/zENHJqaAzIEx7z/8Rv8pMZKXTlStfz7erI wgvhr5j1tk2mHGiD3ZL3OqKh96JrmoHPvtphoadM/hpzhCsfM8T37d0/Va1u/I1HEQGnuP 7Lfs+tiEDgtr812CbAwAs/EaObFGlgVOC/0gJTvK+NM7LNAFPKZU1oGkkKDa5Hnw== ARC-Authentication-Results: i=1; mx.catap.net; dkim=pass header.s=20240125rsa header.d=korins.ky header.a=rsa-sha256 header.b=LOHDpmp6; dkim=pass header.s=20240125ed25519 header.d=korins.ky header.a=ed25519-sha256 header.b=jwEB0StE; arc=none; iprev=pass; spf=none smtp.helo=postmaster@matebook.home.arpa; spf=softfail smtp.mailfrom=kirill@korins.ky DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=20240125rsa; bh=gkKTvn9s /lYw1zAlj9kSBjShEkdgZBP1EPjl78qjmB8=; h=references:in-reply-to:date: subject:cc:to:from; d=korins.ky; b=LOHDpmp6jbTLJnPMAc2IZUfTMgKGhnlWEBK feJ1iTz7p56OqbslxrkGVUQKwxMVY7yVWGaWEPxP8wqMzhWzXjQTtgacHy9pRM6/kMpI44 nKCuhnaGhPgDec/23iPMeFUeMzMY93RqL1Tr6bG9E2hsqMecuqXfYCi6OEif9hcPSsEK9U aVVhTPyWzNZAv2FjPdMd/gnQVvUUyH0slWfZrRDrtTmbi0uoPyuAnfhIARjgxryAmH7Rjq aP1G0ZZ5BjGjIUmB36AJbSUTzAyzodZDWa8jb/7QokGSYDOWaSlXjulNIq8OQLq7sK3iJ+ hybUH40+BujbNeplqiBaNI45PzA== DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=20240125ed25519; bh=gkKTvn9s/lYw1zAlj9kSBjShEkdgZBP1EPjl78qjmB8=; h=references: in-reply-to:date:subject:cc:to:from; d=korins.ky; b=jwEB0StEeMeSQD37bz taucNx9pcMei/67cxD1DgogswTFWQ7jsFwLOd9hg0EPjMNZhG7kVz6lptHTzdTywMOAw== From: Kirill A. Korinsky To: Mark Cave-Ayland , Chinmay Rath , Nicholas Piggin , Glenn Miles , Harsh Prateek Bora , qemu-devel@nongnu.org, qemu-ppc@nongnu.org Cc: "Kirill A . Korinsky" , Anushree Mathur Subject: [PATCH v2 5/5] tests/functional: Boot OpenBSD on mac99 Date: Thu, 24 Sep 2026 01:03:11 +0200 Message-ID: <20260923230452.3765-6-kirill@korins.ky> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260923230452.3765-1-kirill@korins.ky> References: <20260923230452.3765-1-kirill@korins.ky> 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a01:4f8:271:125e::2; envelope-from=kirill@korins.ky; helo=mx1.catap.net 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=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: fail (found 2 invalid signatures) X-ZM-MESSAGEID: 1790204791233158500 Content-Type: text/plain; charset="utf-8" From: "Kirill A. Korinsky" OpenBSD device discovery exercises CTPR masking, zero decrementer writes, and CUDA reply timing and layout; regressions in any of these paths stall the guest before the installer starts. Signed-off-by: Kirill A. Korinsky Tested-by: Anushree Mathur Tested-by: Mark Cave-Ayland --- tests/functional/ppc/meson.build | 2 ++ tests/functional/ppc/test_openbsd.py | 46 ++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100755 tests/functional/ppc/test_openbsd.py diff --git a/tests/functional/ppc/meson.build b/tests/functional/ppc/meson.= build index ae061fe5a6..1055cdaa17 100644 --- a/tests/functional/ppc/meson.build +++ b/tests/functional/ppc/meson.build @@ -2,6 +2,7 @@ =20 test_ppc_timeouts =3D { '40p' : 240, + 'openbsd' : 240, } =20 tests_ppc_system_quick =3D [ @@ -15,6 +16,7 @@ tests_ppc_system_thorough =3D [ 'bamboo', 'mac', 'mpc8544ds', + 'openbsd', 'ppe42', 'replay', 'sam460ex', diff --git a/tests/functional/ppc/test_openbsd.py b/tests/functional/ppc/te= st_openbsd.py new file mode 100755 index 0000000000..73fa328b1f --- /dev/null +++ b/tests/functional/ppc/test_openbsd.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python3 +# +# Test that OpenBSD boots on mac99 and reaches the installer. +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import QemuSystemTest, Asset +from qemu_test import wait_for_console_pattern + + +class OpenBSDMac99(QemuSystemTest): + + ASSET_CD =3D Asset( + 'https://ftp.eu.openbsd.org/pub/OpenBSD/7.9/macppc/cd79.iso', + '227fef3d5089d56ce8376d8bfa28181ce5b19f0eceef0a6d82d58d8e52832b24') + + def test_openbsd_79_installer(self): + self.set_machine('mac99') + self.require_accelerator('tcg') + cdrom_path =3D self.ASSET_CD.fetch() + + self.vm.set_console() + self.vm.add_args('-M', 'via=3Dcuda,graphics=3Doff,usb=3Doff', + '-cpu', '7400', + '-accel', 'tcg,thread=3Dsingle', + '-smp', '1', + '-m', '2g', + '-nic', 'none', + '-device', 'VGA', + '-global', 'cuda.x-sr-delay-ns=3D0', + '-prom-env', 'input-device=3Dttya', + '-prom-env', 'output-device=3Dttya', + '-cdrom', cdrom_path, + '-boot', 'd', + '-no-reboot') + self.vm.launch() + + wait_for_console_pattern(self, 'OpenBSD 7.9 (RAMDISK)', 'panic:') + wait_for_console_pattern( + self, + '(I)nstall, (U)pgrade, (A)utoinstall or (S)hell?', + 'panic:') + + +if __name__ =3D=3D '__main__': + QemuSystemTest.main() --=20 2.55.0