From nobody Tue Feb 10 09:58:15 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=quarantine dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1767650201; cv=none; d=zohomail.com; s=zohoarc; b=VAHzwKtXIKkXiJ/r4IcoZmy+lI7w25sDK9YVHE/Vrux9YEsLt34MTNUsB3yP09x0pNV9jGLRerEQIyc7Mxyc1LTFjEY8JmIyAXzZ+gNbeKe/TUCmiUMIRIfLWMCUxAk8fV4DHnEnHIMNWvZWCfqSmQt8TF6Z9e47zj8IvmL5nxQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767650201; h=Content-Type: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=op/Hej9nBSyfdqBErr/sNlN23OFcnPlmjZDT8J0vV90=; b=lhyBKbLMcdLTyCbrSKpZAxKL8odp1+gBrW80L2DLo4JUI22QzFXGhIj4HnCAIQIsUUHfQqvHhB3BJP5Lz0oKWXvRAUsBJ/wDIwR4WOt1xdEn9T9ue1smzoL0+vGcoBSRZvaw2H2qJ3spayYlnD2xLElr+oaF5f6p9WKC9D+0u/g= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1767650201905183.98296112286482; Mon, 5 Jan 2026 13:56:41 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vcsXY-0006Qp-TU; Mon, 05 Jan 2026 16:55:05 -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 1vcsXV-0006KE-UP; Mon, 05 Jan 2026 16:55:02 -0500 Received: from tor.source.kernel.org ([172.105.4.254]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vcsXT-0006E3-J1; Mon, 05 Jan 2026 16:55:01 -0500 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 8A40C60149; Mon, 5 Jan 2026 21:54:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1263FC16AAE; Mon, 5 Jan 2026 21:54:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1767650092; bh=nVXcBke4+Xpy+dP8Jn1js2x8PMSpowa0B2KjBZEzC9o=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Pb/YhpJZXo+P2VAaxxSkCTb54nMxvt0iFhhxRDTNss5wdAfmLx0pefqBrnf9tvwVg 3UdSpLtFCnY512wB+aKg3fgSsRBDC/yZRnqx9pkXTFppWCA/VAVsL0hw64ZaBo9Fci 6fZ/L/IIoMu0GxWa9B8ihqf8BI8HbfKbfAb9k56Md+r0MRrlpBin7KDXHYFNpAEo2+ j893uTc04ERutdt2piuQ7qY56rhOMAgrtGRSkZBgMpS/oVDOYHOd6m/B3qqOCe15Iz wHq7VgQGgmRPcsL57XvdxKYMiOqHL4NHxetQhO0pllaDP9VbrGSeTShnMFaTWadjZo cOeMBldG4pGPg== From: Drew Fustini Date: Mon, 05 Jan 2026 13:54:24 -0800 Subject: [PATCH v4 6/6] hw/riscv: add CBQRI controllers to virt machine MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260105-riscv-ssqosid-cbqri-v4-6-9ad7671dde78@kernel.org> References: <20260105-riscv-ssqosid-cbqri-v4-0-9ad7671dde78@kernel.org> In-Reply-To: <20260105-riscv-ssqosid-cbqri-v4-0-9ad7671dde78@kernel.org> To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, Palmer Dabbelt , Alistair Francis , Weiwei Li , Daniel Henrique Barboza , Liu Zhiwei , Paolo Bonzini , Nicolas Pitre , =?utf-8?q?Kornel_Dul=C4=99ba?= , Atish Kumar Patra , Atish Patra , Vasudevan Srinivasan , =?utf-8?q?Radim_Kr=C4=8Dm=C3=A1=C5=99?= , yunhui cui , Chen Pei , guo.wenjia23@zte.com.cn, liu.qingtao2@zte.com.cn, Drew Fustini X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=3217; i=fustini@kernel.org; h=from:subject:message-id; bh=e3aHR89QXlGWitka8WoVRilMH1bltd7QHZqaKaGawDs=; b=owGbwMvMwCV2+43O4ZsaG3kYT6slMWTGGGslbL/uFthZ/Y07cVm6Tz+H3QUzG+HXantTjhzlS u6fGGHZUcrCIMbFICumyLLpQ96FJV6hXxfMf7ENZg4rE8gQBi5OAZhIbzUjw97+3ZXaf0Ssdyya p/Km4IGm1VeWhzekTM7VOB0q7E8pmcfI8H9z7rSObaKly+03z49nWf+eX6FWWP1QT22xGc+XrfF OTAA= X-Developer-Key: i=fustini@kernel.org; a=openpgp; fpr=1B6F948213EA489734F3997035D5CD577C1E6010 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=172.105.4.254; envelope-from=fustini@kernel.org; helo=tor.source.kernel.org 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, 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: 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 @kernel.org) X-ZM-MESSAGEID: 1767650203363158500 From: Nicolas Pitre Add CBQRI controllers to the RISC-V virt machine. The device properties can be fully configured from the command line: $ qemu-system-riscv64 -M virt ... \ -device riscv.cbqri.capacity,mmio_base=3D0x04828000[,...] -device riscv.cbqri.bandwidth,mmio_base=3D0x04829000[,...] The mmio_base option is mandatory, the others are optional. Many -device arguments as wanted can be provided as long as their mmio regions don't conflict. To see all possible options: $ qemu-system-riscv64 -device riscv.cbqri.capacity,help riscv.cbqri.capacity options: alloc_op_config_limit=3D - (default: true) alloc_op_flush_rcid=3D - (default: true) alloc_op_read_limit=3D - (default: true) at_code=3D - (default: true) at_data=3D - (default: true) max_mcids=3D - (default: 256) max_rcids=3D - (default: 64) mmio_base=3D - (default: 0) mon_evt_id_none=3D - (default: true) mon_evt_id_occupancy=3D - (default: true) mon_op_config_event=3D - (default: true) mon_op_read_counter=3D - (default: true) ncblks=3D - (default: 16) target=3D $ qemu-system-riscv64 -device riscv.cbqri.bandwidth,help riscv.cbqri.bandwidth options: alloc_op_config_limit=3D - (default: true) alloc_op_read_limit=3D - (default: true) at_code=3D - (default: true) at_data=3D - (default: true) max_mcids=3D - (default: 256) max_rcids=3D - (default: 64) mmio_base=3D - (default: 0) mon_evt_id_none=3D - (default: true) mon_evt_id_rdonly_count=3D - (default: true) mon_evt_id_rdwr_count=3D - (default: true) mon_evt_id_wronly_count=3D - (default: true) mon_op_config_event=3D - (default: true) mon_op_read_counter=3D - (default: true) nbwblks=3D - (default: 1024) target=3D Boolean options correspond to hardware capabilities that can be disabled Signed-off-by: Nicolas Pitre Reviewed-by: Daniel Henrique Barboza Signed-off-by: Drew Fustini --- hw/riscv/virt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index c87c169d38cd..99871119be44 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -55,6 +55,7 @@ #include "hw/pci-host/gpex.h" #include "hw/display/ramfb.h" #include "hw/acpi/aml-build.h" +#include "hw/riscv/cbqri.h" #include "qapi/qapi-visit-common.h" #include "hw/virtio/virtio-iommu.h" #include "hw/uefi/var-service-api.h" @@ -1941,6 +1942,8 @@ static void virt_machine_class_init(ObjectClass *oc, = const void *data) #ifdef CONFIG_TPM machine_class_allow_dynamic_sysbus_dev(mc, TYPE_TPM_TIS_SYSBUS); #endif + machine_class_allow_dynamic_sysbus_dev(mc, TYPE_RISCV_CBQRI_BC); + machine_class_allow_dynamic_sysbus_dev(mc, TYPE_RISCV_CBQRI_CC); =20 object_class_property_add_bool(oc, "aclint", virt_get_aclint, virt_set_aclint); --=20 2.43.0