Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8949DCD98CC for ; Thu, 11 Jun 2026 07:12:32 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wXZa4-0005sJ-JH; Thu, 11 Jun 2026 03:12:00 -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 1wXZa1-0005rv-CP for qemu-riscv@nongnu.org; Thu, 11 Jun 2026 03:11:57 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wXZZz-00047d-RI for qemu-riscv@nongnu.org; Thu, 11 Jun 2026 03:11:57 -0400 Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65B5GQam3712084 for ; Thu, 11 Jun 2026 07:11:54 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= kPDQTWPZXD9meNkKHM237Ej4RJDreylbxJrul+rDyTw=; b=Igxs9ih4632u6NPP Rf2B4xUNpQHknrWPi8U7grfOw4l+jm75HMEEM7E/qkA6QW/MoC5F168ZT37VKoAg TPROqreqAD7NTM8a7JM8FbG4ME8Xqv0VbqC16kQrC4x7hpRrAZ+hGqtDNsnzeRmm 2lP/zCtFGCkHf5OBKIACw4zYfY/rZMfnOZJ01fnN9RjdwZVKdrixk+uxJWG+dTwI GbyNnsuBwDnR2YhyfTyeQO5t/Fsu4UvTUS/6bzPxE5dZSObdL5qkETHYsiKaPchF mwFhM6l/F3kMrBpww6FZSZfKVcfS20RX4BOxwNNcp9zSwsshA3Ls8sCy+m23ZCdg ny4sIw== Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eqe6ua4qk-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 11 Jun 2026 07:11:54 +0000 (GMT) Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-517b75c1ee3so76877931cf.3 for ; Thu, 11 Jun 2026 00:11:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781161914; x=1781766714; darn=nongnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=kPDQTWPZXD9meNkKHM237Ej4RJDreylbxJrul+rDyTw=; b=MWydQqdw3O3ZL6VXth2aeWIrWbWNEou3lw0efxIcSXHh5/u15U9mIjME6x8fwy8hgQ 97tM0wvFH4Hq/CQtQbXPrsRCcgiR23d4MuxkWzk+6ouiJya8iH95XxP170s9t3QVLmLC A3Gig5lgtpy3LXODoY5iZNXKBs3QTWf9KMRHztfV/BjMLKkZGOYBtzMxfa/53GXBD72x RzhzrLnO7/fJ3SpGijVvP8D13e8hHqU2Sytj9HfXtAObGuNxcN+0o1I9IXuKmj5DfbNu Jkcj1kiiJU9xmxujGnV97bAJtjegiz+wTdVKLhSFech3FUkLPHI33Qi/SHQ4dmPTymSI jGzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781161914; x=1781766714; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kPDQTWPZXD9meNkKHM237Ej4RJDreylbxJrul+rDyTw=; b=cqD7E4/Ndq2162NoAO3PuN3TT040uX41Q0v2uAxL72WeCqWNb/Qv1vuydajR02dUg5 CTwTH6+rLAHz8vuaVv3viTofFMu0ucknJNEo+1UynciTpgo1gur19zOT+r9y8ZE0T3mL KW/mhxZRCjzIQLKckXNuhYWogsUdmNSnsyTjBs4Vrwrd+SqSDx1fU74QWQlXQEC11xTX g4fjgm7yvu/Q597J1KJk6NpxNPFgeAp9TG65sG3Rpp2L6lcQEFzmr5TgaQDAZW3A/3+c Q3Knw7SlFdKdwZqS3aKCrG04UXHzdIZ7w91KVAoQskuWCjbA2MWj+C94LDCj66lh5Fb2 U4LQ== X-Gm-Message-State: AOJu0YznXIVTN3668KHtYKiwrhyIuaJQp89S2X1K2tYyDPrUirZPBrTA wbhvVx5EsgSF7g8e73bjnYG321TUo2WV2WdiDTNo4vJNgoN2bQLaRF109evLJIyCZRT+doY49NO qH7SwH+j0KndcGYLs2zM9E1EiVKrnIM7cUfiPEGq3EZQy7ntTTuKw3XYLiw== X-Gm-Gg: Acq92OGiUfEyAUUtDzG3BjoqC2mXjMr1DYb7GCcvVTUTMmHN95f4GAoCyp7H5syZDYH LRVD5JAai3yV9F9gRcRSOKK12RyMLZFieApu95ffSSiF/JSUO4+zZZszZLwqEWQhFoTkPQFCCfm nZrQuBobEuEWS77eKvg/qTkNbgiiY+pbDUathc1M22osTbj0FBkqs8kwpB7IZx+gzMBqf+A1pBc revAimVYMG75CJ+NiAPXLbKertW15TcWDeg650QkhFgcrkI4lN5rQ5P+D7lKsWpimCn0bQrHTET HWRJMKv+BTFiWcDAXQcGU2VnbcwjJAaSPLVIAt9IZOkb/rRCfMi2CL+jCPr6dNoZtoLzDRVbuOZ K6spf0EladRyR7CHvSCBpuYG/EA2shG7DaGXJqBEFTaBuQ+dTIr/SZ8yzO/zC3N/Q80lfWbBdRB wa X-Received: by 2002:a05:622a:2c4:b0:517:b58e:a1e3 with SMTP id d75a77b69052e-517ee26715amr25442871cf.50.1781161914020; Thu, 11 Jun 2026 00:11:54 -0700 (PDT) X-Received: by 2002:a05:622a:2c4:b0:517:b58e:a1e3 with SMTP id d75a77b69052e-517ee26715amr25442471cf.50.1781161913474; Thu, 11 Jun 2026 00:11:53 -0700 (PDT) Received: from [10.156.84.244] (218.170.88.92.rev.sfr.net. [92.88.170.218]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-bfcb53c3435sm20061566b.39.2026.06.11.00.11.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 Jun 2026 00:11:52 -0700 (PDT) Message-ID: <0d879628-5250-460d-aa22-021085ebff7b@oss.qualcomm.com> Date: Thu, 11 Jun 2026 09:11:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 2/2] target/riscv: add 'num-triggers' debug property Content-Language: en-US To: Daniel Henrique Barboza , qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, alistair.francis@wdc.com, liwei1518@gmail.com, zhiwei_liu@linux.alibaba.com, chao.liu.zevorn@gmail.com, Palmer Dabbelt References: <20260610205457.1868701-1-daniel.barboza@oss.qualcomm.com> <20260610205457.1868701-3-daniel.barboza@oss.qualcomm.com> From: =?UTF-8?Q?Philippe_Mathieu-Daud=C3=A9?= In-Reply-To: <20260610205457.1868701-3-daniel.barboza@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Info: AW1haW4tMjYwNjExMDA2OSBTYWx0ZWRfX2E/6XLMzmKdA ixaakLF/nqEG9xD2D1obAsLwRM1dNI9Xkfj8VUarTrqpNF3OM4aRNL/JH4q3pPWXg6CSIS8VJAB bWQl82XaPCzyc8vEeyjIP0VPLfM7Z2A= X-Authority-Analysis: v=2.4 cv=atOCzyZV c=1 sm=1 tr=0 ts=6a2a5fba cx=c_pps a=WeENfcodrlLV9YRTxbY/uA==:117 a=/nYmEve+L4YsDi96RCWAbw==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=EUspDBNiAAAA:8 a=kD1aHXNoiUmW-fgF_RsA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=kacYvNCVWA4VmyqE58fU:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjExMDA2OSBTYWx0ZWRfX9sg7b9lPPrI/ xOCIhBYTPLt0Pz3MJkx8A3V6O2vwlb/dHxY4WTuIsd9Lyglf9ml08XkdA5QKgFcKZuaFl/T3mzk IQ9O76VycBWbQMRMXfiDJsP62nohOFbleC2uge79nY7DLgKONu9VWhGjU5VncgloZ4HOxARnQap O99UVWw10S2X3O+SvBVhVW+OYvTyVnSEktLuF78CHBvUMHImiO6ueqtwFUcX2vp8jhiK13K6CMg 52cmdDsClMCq5o16DNRbCX4EfM23dp4lud90vQt6VpChzkltwX51xCSBc0kkK/072YWLuh/16Fe emY/4lRqoM3veO0d33QtLEKkqMDJRNocEYF18806uZIF7n8wDypvDxoChUDT2H90CWRV2MZ5wEV eiXp7FysXB33NKsQ0jLvg4KbvaO/0mNMtU2rihw5gTvccbaEj32u0FjT+SK6dpq3lFX1RJpIlqf 057m131LUgSVjcp6iqA== X-Proofpoint-GUID: oO7bL5E0rCG-vssvqyq4CJoEBqVR__e6 X-Proofpoint-ORIG-GUID: oO7bL5E0rCG-vssvqyq4CJoEBqVR__e6 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-06-11_01,2026-06-09_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 impostorscore=0 bulkscore=0 clxscore=1015 spamscore=0 malwarescore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606110069 Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-riscv@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-riscv-bounces+qemu-riscv=archiver.kernel.org@nongnu.org Sender: qemu-riscv-bounces+qemu-riscv=archiver.kernel.org@nongnu.org On 10/6/26 22:54, Daniel Henrique Barboza wrote: > All CPUs have the same amount of triggers: 2 triggers per hart, set via > RV_MAX_TRIGGERS. This is not enough anymore: we'll have at least one > future CPU that will demand more triggers per hart when implementing the > RISC-V Server Ref Platform, requiring at least 11 triggers per hart. > > Parametrize the trigger amount using a new 'num_triggers' property. The > default amount is kept at 2 for backwards compatibility. The new > maximum is bumped to a generous 1024 triggers per hart, which hopefully > will be enough for the foreseeable future. > > The property can be set in two ways: > > - a '.num_triggers' CPU definition flag, allowing CPUs to set a custom > amount inside the CPU def in DEFINE_RISCV_CPU(); > - a new 'num-triggers' user property. The user property has a higher > priority than an existing '.num_triggers' CPU def setting. > > Assuming a hypothetical case where a CPU 'X' is defined with > '.num_triggers = 8': > > - -cpu X,num-triggers=30 => num_triggers set to 30 > - -cpu X (...) => num_triggers set to 8 > > For a CPU that doesn't set '.num_triggers': > > - -cpu rv64,num-triggers=30 => num_triggers set to 30 > - -cpu rv64 (...) => num_triggers set to 2 > > Signed-off-by: Daniel Henrique Barboza > --- > target/riscv/cpu.c | 11 +++++++++++ > target/riscv/cpu.h | 19 ++++++++++++++++++- > target/riscv/debug.c | 16 ++++++++-------- > target/riscv/machine.c | 4 ++-- > 4 files changed, 39 insertions(+), 11 deletions(-) > diff --git a/target/riscv/machine.c b/target/riscv/machine.c > index b6b53a4840..ba96ceceef 100644 > --- a/target/riscv/machine.c > +++ b/target/riscv/machine.c > @@ -240,8 +240,8 @@ static int debug_post_load(void *opaque, int version_id) > > static const VMStateDescription vmstate_debug = { > .name = "cpu/debug", > - .version_id = 3, > - .minimum_version_id = 3, > + .version_id = 4, > + .minimum_version_id = 4, This change belong to the previous patch, otherwise: Reviewed-by: Philippe Mathieu-Daudé