From nobody Thu Oct 22 07:58:01 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 1790895748559667.8106129305236; Thu, 1 Oct 2026 16:02:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xCPmN-0004PG-TN; Thu, 01 Oct 2026 19:01:33 -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 1xCPmE-0004Nq-4K; Thu, 01 Oct 2026 19:01:23 -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 1xCPmB-0007j7-Fy; Thu, 01 Oct 2026 19:01:21 -0400 Received: by mx2.catap.net (OpenSMTPD) with ESMTPSA id b54f8166 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 2 Oct 2026 01:01:09 +0200 (CEST) Received: from localhost (matebook.home.arpa [local]) by matebook.home.arpa (OpenSMTPD) with ESMTPA id f9549012; Fri, 2 Oct 2026 01:01:07 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=20240125rsa; cv=none; d=mx.catap.net; b=iZ7GWYf 3GROlueYizIhf8Y29oTAlP/ZeDsNsPUuB1hyRHCzArRIthB/fT6WdWP1knS9TrPZxdhULq RTtyXqHf4ZavVltv4p+bWUX4yizVcPg97V3nH8sThmiKycZlaqJR7v1ThBfTmg65uiujBq QTOdKysDvjNFpEiXQoPvfOOYz95EbBJ29D4yX/PtBYd3glmh/C/M2AkgrZUzdrTiCod5JR 8SMoPeQdminFXvb2LAbKFQAwTTqq0OsMnEdl7fqFURvOl0rxlH4s+NU9AbeXmRWuCRH7H+ cESr+cpLitnESyjRuy+yEkG1jzHepZ3uFadWYgITEdnDV1ryuevLYEQ== 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=Q0V3jbPb4fVL4A3QoyJYOT3lZZMAEtl1v4unRhVxDQ2GlKJcgMrTlx/mMOZwa5KxCpoF REbOgALauW5F0XZLI416ekZLqRG/FPQQ94Xj6tnvzrdKZr9Exx0FUXPDBLm5PYw/njznjn xud8qV55l3aOQC/W6kAmJvx+KUh3AC8oXCmFq+axc0Yut3h8JhQ7We8fcsSvIazXmjl0yI x95ZkHrsQo9WnUX36rY25KFeRv+xs7V4FdyBG8erNJezrQFksgN5nvPjiCVM0DnO9LFzAb e4uQCAD9WFonWTEWU72f4o33//bXK1I91jB5HICZsxDCS0gG9A9JDhlAWXWQJHkw== ARC-Authentication-Results: i=1; mx.catap.net; dkim=pass header.s=20240125rsa header.d=korins.ky header.a=rsa-sha256 header.b=eoGaH565; dkim=pass header.s=20240125ed25519 header.d=korins.ky header.a=ed25519-sha256 header.b=j+/NCJuL; 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=eoGaH5653LUrUFvcKOiz8XPytgqIbnBp//7 f6lT5lPhZ+DhtskTliH07ePqoPnc3CCW8u3CdkM3XTqmw3C36Az0IlowRrgwD0AiT448N5 I97uiCW3+dfuF8zbO3dOkPEZuOcu1tBf5w1gpL4zj0QJZFwPYxJ6mobRLB8iCcMlburpN0 6/id6YTHNVEsH4LlcOTAo62mw4jf5XZzraPNUEvj+x7hMau7/xzQmRg28rN+nd8Ag1N2kC ycaCwY1+jmow0JoSZqlfrGur/IrtYEBGP2ikxAxz6HHwhz45JDOZJu/SXPExGNAqbn4KLp zuk8BG+AtO4Qc4wmPq/TouiG8CQ== 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=j+/NCJuLoE4sAb2kXS qK4MMSkFbOLI1uxp/jc+ZT+WfyZFJUFy6EOhJnNBF+94HrP2bEu5YAmAjVbdpMGHELAw== From: Kirill A. Korinsky To: Harsh Prateek Bora , "Kirill A. Korinsky" , Mark Cave-Ayland , Chinmay Rath , Nicholas Piggin , qemu-devel@nongnu.org, qemu-ppc@nongnu.org, Anushree Mathur , BALATON Zoltan , Miles Glenn Cc: Amit Machhiwal Subject: [PATCH v3 1/5] openpic: Preserve IRQs masked by CTPR Date: Fri, 2 Oct 2026 00:59:00 +0200 Message-ID: <20261001230058.11465-2-kirill@korins.ky> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261001230058.11465-1-kirill@korins.ky> References: <20261001230058.11465-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: 1790895751542158500 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 Thu Oct 22 07:58:01 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 1790895749021603.5870062584364; Thu, 1 Oct 2026 16:02:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xCPmL-0004Op-LR; Thu, 01 Oct 2026 19:01:29 -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 1xCPmD-0004Nn-Tl; Thu, 01 Oct 2026 19:01:23 -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 1xCPmB-0007j5-5h; Thu, 01 Oct 2026 19:01:21 -0400 Received: by mx1.catap.net (OpenSMTPD) with ESMTPSA id a7eb329b (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 2 Oct 2026 01:01:10 +0200 (CEST) Received: from localhost (matebook.home.arpa [local]) by matebook.home.arpa (OpenSMTPD) with ESMTPA id 6f518043; Fri, 2 Oct 2026 01:01:07 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=20240125rsa; cv=none; d=mx.catap.net; b=Al8KiRi pNsCFc8DcWuF57vTe8RO9ciEYc2EDYhUZNpoo2aUc+oIU/JCIYxBxbr9xAkpdZo9BBnXz+ yEp4VvypPRh1oRRswjjSVGuhHPZ3iQUU1s6btJYYAfGvcctSLCMSFwt5TSevYcdcGItcYK EBaRcyplOkYAKSMHHDJ8P7DJm2wSsYGiXuc3L3UCGUXk4L+9BFlvgRwna7xkpG6u7AtCbi 8XyBj9qgCQZNnoi0O3aYztUWwhEyCWUtKa/Me3lPCR9M9zWnXOEyq/6uOXHByMr6EdfTEg V0oknhHHzIXH61cZO5/5AR367As1LLACRXXHh4port3lLNiDIbOGZGA== ARC-Message-Signature: i=1; a=rsa-sha256; s=20240125rsa; c=simple/simple; bh=R rND9HDXtGM7Fq5gbWj7QVWsA02TIkIilgSin+ESmpQ=; h=references:in-reply-to: date:subject:cc:to:from:dkim-signature:dkim-signature; d=mx.catap.net; b=w75p3y/f4M9P0NhBPdzMMWWILxLF7847DVitgMH+ahc55omnudOtan7Cdu79yao3KOSF m318r8UROf+wEQhpyiK+g0dSDtFVjqpztIGn7j6OztcW009x9LJndHk4WYomwVJvaT69Fz F0ZCEpH0BnPdja/i3Gm/te9y88MLb8bh9lV5v8lLUxutc0rk6pK1LAAWsd5/2C8nsqTM11 9ueNx2x/VFMKCYwDrZogzN0s/xdHd3QZXPlKTyK+WFOLCulGx6Iphjjpf3Y/fcUEDEgt23 NMQzxIRLowD9QAdRy38Zkw0v4+7peGhx95uYE0zLBPM8cu4qdxHvU9NDNgLBedYw== ARC-Authentication-Results: i=1; mx.catap.net; dkim=pass header.s=20240125rsa header.d=korins.ky header.a=rsa-sha256 header.b=Q44ljrQA; dkim=pass header.s=20240125ed25519 header.d=korins.ky header.a=ed25519-sha256 header.b=mpCY6uAl; 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=RrND9HDX tGM7Fq5gbWj7QVWsA02TIkIilgSin+ESmpQ=; h=references:in-reply-to:date: subject:cc:to:from; d=korins.ky; b=Q44ljrQArDEKDlIfN85wNTRWqsDGxqSfXSK KmLCL6j88ANpGSexWrM2gBtuyb+pP9L1DlUkmkTp4RRlKOScN23Kc04UvBf4pNfkGimr48 yL/kKQimW+iHXvaBMGaK9wGLUrWU+zMyHp390MoiF4i8q26GpNNPQcbVF9yM53UNfP1kWs YBpiXdSglq6jGuAdfOyV36SzJdp88GH610Iu8mt743mPgkolxxKHifcivGyCM1aG1Zjqya lx94At8sNlgnZ4BofckJ38hInJLS8EvXddlDym5fmk7iZqN7fFU3G6RNCjWwA3FpIlXCum NG76217ktsamtusHxpfVJZnULEA== DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=20240125ed25519; bh=RrND9HDXtGM7Fq5gbWj7QVWsA02TIkIilgSin+ESmpQ=; h=references: in-reply-to:date:subject:cc:to:from; d=korins.ky; b=mpCY6uAl3UlDd76t1H P9ZZUJi0254vdgJoI1eWBWhzbxpvTtKP957yu1AoMNEVAy1SV/zcENayoPzRBt5vUcCg== From: Kirill A. Korinsky To: Harsh Prateek Bora , "Kirill A. Korinsky" , Mark Cave-Ayland , Chinmay Rath , Nicholas Piggin , qemu-devel@nongnu.org, qemu-ppc@nongnu.org, Anushree Mathur , BALATON Zoltan , Miles Glenn Cc: Amit Machhiwal Subject: [PATCH v3 2/5] ppc: Raise decrementer IRQ on zero write Date: Fri, 2 Oct 2026 00:59:01 +0200 Message-ID: <20261001230058.11465-3-kirill@korins.ky> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261001230058.11465-1-kirill@korins.ky> References: <20261001230058.11465-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: 1790895751527158500 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 Reviewed-by: Amit Machhiwal Reviewed-by: Glenn Miles --- hw/ppc/ppc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c index b123b4cc1c..6f99b61a28 100644 --- a/hw/ppc/ppc.c +++ b/hw/ppc/ppc.c @@ -885,6 +885,7 @@ static void __cpu_ppc_store_decr(PowerPCCPU *cpu, int64= _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); @@ -1104,6 +1105,12 @@ void cpu_ppc_tb_init(CPUPPCState *env, uint32_t freq) if (is_book3s_arch2x(env)) { /* All Book3S 64bit CPUs implement level based DEC logic */ tb_env->flags |=3D PPC_DECR_UNDERFLOW_LEVEL; + } else { + /* + * Classic 32-bit edge-triggered decrementer: zero write fires + * immediately + */ + tb_env->flags |=3D PPC_DECR_ZERO_TRIGGERED; } /* Create new timer */ tb_env->decr_timer =3D timer_new_ns(QEMU_CLOCK_VIRTUAL, --=20 2.55.0 From nobody Thu Oct 22 07:58:01 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 179089576874795.51265737029348; Thu, 1 Oct 2026 16:02:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xCPmT-0004RF-GW; Thu, 01 Oct 2026 19:01:37 -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 1xCPmE-0004Np-0l; Thu, 01 Oct 2026 19:01:23 -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 1xCPmB-0007jM-Qz; Thu, 01 Oct 2026 19:01:21 -0400 Received: by mx1.catap.net (OpenSMTPD) with ESMTPSA id b8e0d167 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 2 Oct 2026 01:01:10 +0200 (CEST) Received: from localhost (matebook.home.arpa [local]) by matebook.home.arpa (OpenSMTPD) with ESMTPA id 0fcfc3c6; Fri, 2 Oct 2026 01:01:07 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=20240125rsa; cv=none; d=mx.catap.net; b=ftwxGnX N4MFJk9QaRk9gjcAgizFyBCUnNKypfgzy1yFFLXWRdFcgduI+4xjiguWWwWycZAInoT+po ntLPezLiGpN1X+gt5mnNz9oDkDTvwKquzOGAl+WMyIq/cURxNsph6L+53tKPpHABHRsuch ZI2xp2v3PD+grySI7F9GYP6rYNotWbs24WuZQ1q+5nUx5BgPYzLYMrAkPGgpnUv/SbrR2R csXF7ZOH+0MCk3YjNg313mpRfsuax+1NoucZshJkLMD0r18kxIC4nZHArKLogZUEiJQbkH tL8LFWRryCtQ1izyy24NtVpJ+0Z+jR2NrKvY6dsrT2livuKXWYGiILA== 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:to:from:dkim-signature:dkim-signature; d=mx.catap.net; b= lgi7mJGU0jXkdAoyHrUamLiWrHwHdfkdeSi85a4GlsqsKpWGWr1dpZH98RNnTSmgfcwuF4 UFyMD87czxLNmj4fEfLe3r8HSB/VcTj3UMUSLtrmCWYVx52VWY+y43U44chlAohTsWRXkE XHOx0hRZDTKOI/DpNPFhyMwrui/a7Ld+StY3aj2VOFnUZK0wrggutGTNI9X3fN2psFENOe 17EFnzX4gjA8bA05H9GnAM3vnhUS72LjGaSTwZ6xtMA3lUJCqINSSdOX/zXbvrbj1CsgI5 FAItm3vUnFXxL8H8bCP03KEmXuiIQkOF2uL1BUtlMUGvam71B7K+QTn6+pdyEQ== ARC-Authentication-Results: i=1; mx.catap.net; dkim=pass header.s=20240125rsa header.d=korins.ky header.a=rsa-sha256 header.b=Z4IwGeSD; dkim=pass header.s=20240125ed25519 header.d=korins.ky header.a=ed25519-sha256 header.b=mwZVB5KX; 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:to:from; d=korins.ky; b=Z4IwGeSD4uu0QIPf6R9xep8Rgn3eeLJTneBK54 QUyh7uLTVnaEfCq8D2Dd7PkycNL/3FVaAFch5eL9N7tnq9cz4Dbv0kiwz4anqnePyBJ31/ /uzH/pMfwpXnrcWiACqSjDK7e9Lws8ASP2poV8wAaWr5xlCTqUXN1GszAh04hilFbAooKe x1xUJHtPtGX5wq2Q976sL4hmyvkz5oUkYlTTCecUAjV6oKTkka48AXwH7p1sNzMJpW33In 7jWJZV/9Mlv+BoHoJrVAmoG9vVQsaDIsxtY9xi4YcvWywh9O4fwomg/72gJ7IRNkhu+dNS V5E57v428NJEScxhM67mexkQ== DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=20240125ed25519; bh=0VvGzzvtw6mkJpUk2FBAT6jJyveAIEvnR/DUkN/2r+c=; h=references: in-reply-to:date:subject:to:from; d=korins.ky; b=mwZVB5KXzHkpz9Z4pQp1B EOz91I5eH7f/qakemm+Dj3UUMLqHJqp+XtnVBi8dQGfyKsF95ILb4eA/jXqJo6BBg== From: Kirill A. Korinsky To: Harsh Prateek Bora , "Kirill A. Korinsky" , Mark Cave-Ayland , Chinmay Rath , Nicholas Piggin , qemu-devel@nongnu.org, qemu-ppc@nongnu.org, Anushree Mathur , BALATON Zoltan , Miles Glenn Subject: [PATCH v3 3/5] cuda: Include command in successful ADB replies Date: Fri, 2 Oct 2026 00:59:02 +0200 Message-ID: <20261001230058.11465-4-kirill@korins.ky> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261001230058.11465-1-kirill@korins.ky> References: <20261001230058.11465-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: 1790895769404158500 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 Thu Oct 22 07:58:01 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 1790895752567221.15571219874505; Thu, 1 Oct 2026 16:02:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xCPmV-0004S7-Vw; Thu, 01 Oct 2026 19:01:40 -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 1xCPmF-0004O5-U2; Thu, 01 Oct 2026 19:01:25 -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 1xCPmC-0007jJ-1U; Thu, 01 Oct 2026 19:01:22 -0400 Received: by mx2.catap.net (OpenSMTPD) with ESMTPSA id ad663969 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 2 Oct 2026 01:01:11 +0200 (CEST) Received: from localhost (matebook.home.arpa [local]) by matebook.home.arpa (OpenSMTPD) with ESMTPA id a9dabf87; Fri, 2 Oct 2026 01:01:07 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=20240125rsa; cv=none; d=mx.catap.net; b=C7kwGQU Js4dEHLCE6s0OP+dCEh/G3wPn4grDylO4+tU5LnOLanpwivURlaAlDGo0BiFQHVLWOm9iD TfYB3+8tQ3MoPakfMahGvtSmCd4L8FsULHP1dNjYB7IWZMxx+mmwTbok43qaFQtcwXTNsj yjm5d7QBkYUae9H87aAx7Z8jeaVDr/s56hRkYKTrxkHuRgOG3fkNE95jBVyDiGe4hml5lH 96JPO/7+Vy2gYpqligy9mMXw9qpY2ICyB4k+JPIfusSxQiw0nIYYO41ei3hMVpWsTlmr8l R1jRBSvQxHxUlh7IIaapIZmfEdxxN/sR0P3KZ+cXsgnkK1nYoUCO2FQ== ARC-Message-Signature: i=1; a=rsa-sha256; s=20240125rsa; c=simple/simple; bh=r 8RxrIuKF+SSKpGnXLnXksMXwzKdo+kIEVyUUZgk3/Q=; h=references:in-reply-to: date:subject:to:from:dkim-signature:dkim-signature; d=mx.catap.net; b= Hg5BJNA/bVEz8nFBgCkzmw5mZJsg6mCQSRC56YjeTnop1hB6kQXh0eP8qHjnFpPj+tXj3M KZQ/aBOxjiqQQdRN1oKcWsQfUlIeLhShhd/B8hGqxUkfi6yso6s9AJLJ62KKTSPQ3aGzve b4aARr+fulsyf9XHkDbU624cmZDpvm4t/fbtn4+bT6Q7jAmVv4Ep1sikJsDUP7cwd3Rizk tZFpkCej4VZfyihiVsZx2UyOfp13mFkLsghjY4/vscgWTtXcrJN4Qxmu2Y1sFW4RcFAfPq L2UhPAD54ARrDXDaYrsj5fAE4LrWcz8XGQJURmRw78d4ZohTVweVtJ1UEBzACA== ARC-Authentication-Results: i=1; mx.catap.net; dkim=pass header.s=20240125rsa header.d=korins.ky header.a=rsa-sha256 header.b=FMSkFWPK; dkim=pass header.s=20240125ed25519 header.d=korins.ky header.a=ed25519-sha256 header.b=ioLpxsBS; 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=r8RxrIuK F+SSKpGnXLnXksMXwzKdo+kIEVyUUZgk3/Q=; h=references:in-reply-to:date: subject:to:from; d=korins.ky; b=FMSkFWPK4PrLf6e6yK6jC1K7hktD7F3z2qbs6P USt35RcjirA8+xdxEm1QWs5Zhvlzv8SULpkb9Y85AEvb28Sq8NlaCea5oXMn7TlCBBdw1l 4DeTqT6t6JcZJkNPYtyz7GB4Sy8xmm8fUtqgJBLAKq0SQJkWe8Fs4W0JUSSk+DY86HOl+X eU1vwC655CfMLgNrhmtma8fYXrYVQ8Y6PSlGsibwDORCefInB+C5OvUkvFKttJYY2eWc80 FYjYTe+pB8NCngHGh2L3D5NTQryCW/hnpgLnKbLjfDBOdSEAUuCejDZu/PrAG7kem4u8py 3CcgLaCtgn70KLpWNW6Wisbw== DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=20240125ed25519; bh=r8RxrIuKF+SSKpGnXLnXksMXwzKdo+kIEVyUUZgk3/Q=; h=references: in-reply-to:date:subject:to:from; d=korins.ky; b=ioLpxsBSAebYdA71fhao7 g+qg5ccWmZbtSjCww71QiIZHx3cCqfALFmBaYdaFKYUGPwo3lP1zQWIOQdP1Uf9Ag== From: Kirill A. Korinsky To: Harsh Prateek Bora , "Kirill A. Korinsky" , Mark Cave-Ayland , Chinmay Rath , Nicholas Piggin , qemu-devel@nongnu.org, qemu-ppc@nongnu.org, Anushree Mathur , BALATON Zoltan , Miles Glenn Subject: [PATCH v3 4/5] cuda: Make shift register delay configurable Date: Fri, 2 Oct 2026 00:59:03 +0200 Message-ID: <20261001230058.11465-5-kirill@korins.ky> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261001230058.11465-1-kirill@korins.ky> References: <20261001230058.11465-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: 1790895755118158500 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 Thu Oct 22 07:58:01 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 1790895748559438.5839507743534; Thu, 1 Oct 2026 16:02:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xCPmP-0004PM-Ib; Thu, 01 Oct 2026 19:01:35 -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 1xCPmF-0004O6-Uu; Thu, 01 Oct 2026 19:01:25 -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 1xCPmD-0007jX-8l; Thu, 01 Oct 2026 19:01:23 -0400 Received: by mx1.catap.net (OpenSMTPD) with ESMTPSA id b4cc36f4 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 2 Oct 2026 01:01:11 +0200 (CEST) Received: from localhost (matebook.home.arpa [local]) by matebook.home.arpa (OpenSMTPD) with ESMTPA id 6bbfeb61; Fri, 2 Oct 2026 01:01:07 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=20240125rsa; cv=none; d=mx.catap.net; b=c/yI1a/ b+A+eA/Srk7Leuzs3Whw+U+hvJrCn5XmNosR3lTLhK4zERfowG69HPdyM+rt2Ydk8sgRL3 w1KbqritYEZ8o/0UA9VyZ+Ydcc7gxZ0miUnMaIWbAP6A7FyEo6Rv0TGgwkxhAQNBP+Pvx4 gx1O+f2tbxzFahyT3zDxAYsyojIhoDUvTEwNfX3l6eezeJCwIjhnAOp4aKrgnYkHXR2bn0 AU5cHd9KNkKSvv0/Ta4LmeEyf1RZpMIncloTABSbv6MIV3Ki5Fu/ZAkeVsGkbu7hb5x/xQ xTygJ90k9dpt6aMP14LTHByZWHXn4cD0JN5YT8DqJKuynT9yQArIY0Q== ARC-Message-Signature: i=1; a=rsa-sha256; s=20240125rsa; c=simple/simple; bh=g kKTvn9s/lYw1zAlj9kSBjShEkdgZBP1EPjl78qjmB8=; h=references:in-reply-to: date:subject:to:from:dkim-signature:dkim-signature; d=mx.catap.net; b= G4Sznj45LK7vM+49q7P5jIE9uGHfv+sE2F1vGCXC4pcf/H/fBFVj0qZPPEAN1kemSLXcy8 bJ22TZir6BU4wNR4efd4NTzOtFPMCVwYEB2b1lUrAS9yylzW+0n9k9HfE8rY6R46JY8NiD 34Y53g/ZkI4HBrvmW/jM4V5LV8Hgokhj9TpoiLUFUOFFWIB5oJPYoSKxfTenBIUrNNEDAV eAgUCWTgQeLN8fO5xhP7xCIlbukolSKKsZI4RxJefkNk4FWDep5krv+yyMWR9BoMPOGiLg ktTM/xrYbh7DdWUAQa3gF6SDJ0zYex7ctj8g/XH4btr+NPFTNgD6XHiPDjtWqw== ARC-Authentication-Results: i=1; mx.catap.net; dkim=pass header.s=20240125rsa header.d=korins.ky header.a=rsa-sha256 header.b=QJueQkSN; dkim=pass header.s=20240125ed25519 header.d=korins.ky header.a=ed25519-sha256 header.b=iZ1OWUra; 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:to:from; d=korins.ky; b=QJueQkSNHVp4mgQbLERMqfKlxWaMJOQNSHRY0c RMBH9YCytCOjpbXVWi5xdO2yRfveacp2eFaSLPeEX3m8cHiHEhvySso8g859aESuk5ZFj0 TDhUcLDQlgI5t5p77oyon0629ZEhZ14dhEaqbLRh6a0L8IM1q8ekbHJ0fSbrHT3CshuLX6 KWn4zDosE1z1rL1lr2wOWhxJQZhee4cwh8Yxhg91Y0hD7QrkMBWLFVth6x3roX6Z20pHXU Si8R+4QUs5bbTazYMCCv24KharEHzsIV1zl+iAmqV11b0t6J0oIh0PqE5qFWzHeOdL86K4 UAqV2+s8st3VEFpGC4khdAdw== DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=20240125ed25519; bh=gkKTvn9s/lYw1zAlj9kSBjShEkdgZBP1EPjl78qjmB8=; h=references: in-reply-to:date:subject:to:from; d=korins.ky; b=iZ1OWUra6ZRocLJWEmQgI wl47Y6iOQ3j9/nsCeSd7AKTdKOJZG0+h4KrCaqv4mkj37kxLJevuDKLbCCS211rBg== From: Kirill A. Korinsky To: Harsh Prateek Bora , "Kirill A. Korinsky" , Mark Cave-Ayland , Chinmay Rath , Nicholas Piggin , qemu-devel@nongnu.org, qemu-ppc@nongnu.org, Anushree Mathur , BALATON Zoltan , Miles Glenn Subject: [PATCH v3 5/5] tests/functional: Boot OpenBSD on mac99 Date: Fri, 2 Oct 2026 00:59:04 +0200 Message-ID: <20261001230058.11465-6-kirill@korins.ky> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261001230058.11465-1-kirill@korins.ky> References: <20261001230058.11465-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: 1790895751548158500 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 Reviewed-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