From nobody Mon Feb 9 07:22:49 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=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1768366329; cv=none; d=zohomail.com; s=zohoarc; b=fiyJqCdcCDiAiaTIUAWwVxNrenKIicOHBx7FedFF+C0g8cyjrOmthldE5LhuxG8cYdf/xGfcIvVLtkmaIRMyCoY9tWS6Zksrhw2R+A0quMVvzI5tPsJZ3Lgh8RK1Cg3XRJrqOTPtefV91ZGP2FxK+APDTJHvxE8KaCtv3tbikwc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768366329; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=3luBxTCpa8sPpFQ5gO3pZBPxYpvr96ETycK7Q9rpUQ4=; b=RiFt4W2HunxYOFoNBbfVW3u8ncEJSnycHIJMv08qr4hD0Y37/k5MLIINIuqIPTNnv4BWPqOx5kyYAJMSJQJZXFCuSHzHp2i90pLBxsKHmyCgDPTzdwcTl0/YiAR3dfRysr7ZPZpBxpvq4HAx/we39mAqXpKJ9aoMPnqvvrNQsdA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768366329221313.08263253848554; Tue, 13 Jan 2026 20:52:09 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vfso2-0004bX-J3; Tue, 13 Jan 2026 23:48:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vfsnj-0004MH-Sa for qemu-devel@nongnu.org; Tue, 13 Jan 2026 23:48:12 -0500 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vfsnh-0003ow-0n for qemu-devel@nongnu.org; Tue, 13 Jan 2026 23:48:10 -0500 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-2a07fac8aa1so62234615ad.1 for ; Tue, 13 Jan 2026 20:48:08 -0800 (PST) Received: from lima-default (123.253.188.110.qld.leaptel.network. [123.253.188.110]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a3e3c49037sm216111905ad.36.2026.01.13.20.48.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jan 2026 20:48:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768366088; x=1768970888; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3luBxTCpa8sPpFQ5gO3pZBPxYpvr96ETycK7Q9rpUQ4=; b=htVNtMFnJuczslD+dGzRsJDkTDc23l8OVJi/0Kc4hs9qMyI0iAJI93UWu5DYZL304M HADf8GiQ9wAQG88tMG0dhTGwKtMeGNhl/bfKL82l4BZDGznxNbuCzQ77vh1Z4DUIFTrb oji2Hq7soP1GQj/LM2B4gMHU96Un5X1j022B9vEjAmRkbYdN76YcXZ1X3DswhFaInc2j SBFVpvwcHRcgLUe/0sMDD2Ma6Ngghug9Tj9C7wC+aWiCBLK+HPoBSGvVNf0Mf7x5vqYM zjHDqXd+sn8RC91vw5DXYaBz1cKQtYmaHluE8C5/BCY93OFR68FhZdgpA8z7nbu+4s1R 0Pjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768366088; x=1768970888; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=3luBxTCpa8sPpFQ5gO3pZBPxYpvr96ETycK7Q9rpUQ4=; b=EsFR00p+lKBxU7LPfV59WWa+PB1ZkOiiS87f689llJtjhDZMwP3P9+KTomMKk07nnM 4s0ewqCGR6l5GQMHgBkpaif3dMFCXgsHBtKC05oRy26dB956tvTZs7slgK26hBAc5km9 xvNBZR24I1t8dLWB93sDZjoDeGVpABjobZgij/KsPO3IpDefk7pdTguodV+I5nPeEKfC eY7hZw3ozqmMsH1QpIdKJS08se8CQLC6KDg8qmQVL76mqSARI9ldQQ6rRxGt3Tdrxg5a um/nsqMdCG+d+ZiL28udzeCeU1tl0uHAlwAXxfuOg3wlHfbDPQKtBE3p8uZnc7tXAxVn NBLg== X-Forwarded-Encrypted: i=1; AJvYcCV1DC4GI9Ckd+ys94oIJJeL0urouuTLhh74fwmGPbhM97Jb7eNuyhkMSWNW9lyTiOiBT8Nf6TH/Eevy@nongnu.org X-Gm-Message-State: AOJu0YxeVDMpyJfeflwF+ZjxaTDOuxZKnZ9Lah2thKnRnjPSvg/sM6WV UAzNK74u2DIbD/BDuG0pTY1BJFbuEtQPYczg0d3muUnAjuIAHjIhTZ1O X-Gm-Gg: AY/fxX4x35uJ0sfkakC0x8C7yhG0SroUdd0yPi1PtAHi0DHpZoJ8+JZxmFgO5JSegaR 7UZJAGC5MQKj/wg+dC+/5K7tbFge2XYXhqgV8Wwx0OQLeeLprcrF8sQQQzqBljdhS5BsIxycZyU PWLhfrnlrmDGXJj1Jnoobb2018d6Fly+GauJ/7VTeZCeSSZeVr93fwk0rAkzM8+gMVs7JQVR76q O5pyh/+nFYVBGzbN3cNQJ79JIL9UNNPU55NJ3aUST8beJOyfso7bycKG9oUG/pK9n7LfgjfoH2u JYr8cGJYOtz2jU5rqJbbB37kzik6zEIv4N27F0sd/PjZWku9fQe+1a9obKtiCayiKcDrP9ojKF0 orTtIfHuUsK6WL7J/u1YsaEEUlMqCkEFoLvUOU7IYqgZWHjDKKzGorLFOSRCCX+Ku1j2KF3aMZg FKaiJMg6hajrHRfjif0QoDedr7Ncyct2W3hCbGHOCaJ/zD2MAP0wBVak0tyOo= X-Received: by 2002:a17:902:ea09:b0:2a1:e19:ff0 with SMTP id d9443c01a7336-2a599e76d50mr16007985ad.39.1768366087731; Tue, 13 Jan 2026 20:48:07 -0800 (PST) From: Nicholas Piggin To: qemu-riscv@nongnu.org, qemu-devel@nongnu.org Cc: Nicholas Piggin , Palmer Dabbelt , Alistair Francis , Weiwei Li , Daniel Henrique Barboza , Liu Zhiwei , bin.meng@windriver.com, vivahavey@gmail.com, Alvin Chang , Yu-Ming Chang , Joel Stanley Subject: [RFC PATCH 09/25] target/riscv/debug: Implement icount trigger textra matching Date: Wed, 14 Jan 2026 14:46:42 +1000 Message-ID: <20260114044701.1173347-10-npiggin@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260114044701.1173347-1-npiggin@gmail.com> References: <20260114044701.1173347-1-npiggin@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=npiggin@gmail.com; helo=mail-pl1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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 @gmail.com) X-ZM-MESSAGEID: 1768366332191158500 Content-Type: text/plain; charset="utf-8" icount triggers are subject to textra checks, per spec. Signed-off-by: Nicholas Piggin --- target/riscv/debug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/riscv/debug.c b/target/riscv/debug.c index ecedffd3b9..d835c0e79a 100644 --- a/target/riscv/debug.c +++ b/target/riscv/debug.c @@ -675,11 +675,12 @@ static bool check_itrigger_priv(CPURISCVState *env, i= nt index) bool riscv_itrigger_enabled(CPURISCVState *env) { int count; + for (int i =3D 0; i < RV_MAX_TRIGGERS; i++) { if (get_trigger_type(env, i) !=3D TRIGGER_TYPE_INST_CNT) { continue; } - if (!check_itrigger_priv(env, i)) { + if (!trigger_common_match(env, TRIGGER_TYPE_INST_CNT, i)) { continue; } count =3D itrigger_get_count(env, i); --=20 2.51.0