hw/riscv/Kconfig | 2 +- hw/riscv/cbqri_bandwidth.c | 26 ++++ hw/riscv/cbqri_capacity.c | 21 ++++ hw/riscv/virt-acpi-build.c | 298 ++++++++++++++++++++++++++++++++++++++++++++- include/hw/riscv/cbqri.h | 20 +++ 5 files changed, 365 insertions(+), 2 deletions(-)
Add support for the ACPI RISC-V Quality of Service Controllers (RQSC)
table [1] that describes the CBQRI controllers [2] present in a system.
A capacity controller is described by the PPTT Cache ID of the cache it
backs. A bandwidth controller is described by the SRAT proximity domain
of its NUMA node.
This series depends on:
- "riscv: implement Ssqosid extension and CBQRI controllers" v8 [3]
- "RISC-V: ACPI: Add PPTT support" v2 from Sunil [4]
- "hw/acpi: Build PPTT rev 3 with cache IDs for MPAM
cross-references" from Jinjie's MPAM series [5].
Note: bios-tables-test fails on the riscv64 PPTT golden file
as this patch does not update it.
Tested with the Linux series [6] at the tip of its b4/ssqosid-cbqri-rqsc
branch [7], with this configuration:
Base addr Spacing
0x4820000 4KB Cluster 0 L2 cache controller
0x4821000 4KB Cluster 1 L2 cache controller
0x4828000 4KB Memory controller 0
0x482b000 4KB Shared L3 cache controller
qemu-system-riscv64 \
-M virt,pflash0=pflash0,pflash1=pflash1,aia=aplic-imsic,smp-cache.0.cache=l1d,smp-cache.0.topology=core,smp-cache.1.cache=l1i,smp-cache.1.topology=core,smp-cache.2.cache=l2,smp-cache.2.topology=cluster,smp-cache.3.cache=l3,smp-cache.3.topology=socket \
-smp cpus=8,sockets=1,clusters=2,cores=4,threads=1 \
-blockdev node-name=pflash0,driver=file,read-only=on,filename=RISCV_VIRT_CODE.fd \
-blockdev node-name=pflash1,driver=file,filename=RISCV_VIRT_VARS.fd \
-device riscv.cbqri.capacity,max_mcids=256,max_rcids=64,ncblks=12,alloc_op_flush_rcid=false,mon_op_config_event=false,mon_op_read_counter=false,mon_evt_id_none=false,mon_evt_id_occupancy=false,mmio_base=0x04820000 \
-device riscv.cbqri.capacity,max_mcids=256,max_rcids=64,ncblks=12,alloc_op_flush_rcid=false,mon_op_config_event=false,mon_op_read_counter=false,mon_evt_id_none=false,mon_evt_id_occupancy=false,mmio_base=0x04821000 \
-device riscv.cbqri.capacity,max_mcids=256,max_rcids=64,ncblks=16,cache_level=3,mmio_base=0x0482b000 \
-device riscv.cbqri.bandwidth,max_mcids=256,max_rcids=64,nbwblks=1024,mrbwb=819,mmio_base=0x04828000
Changes in v2:
- Drop the RFC prefix as RQSC v1.0 is ratified
- Rebase on Sunil's PPTT series and Jinjie's PPTT Cache ID patch
- Add cache_level and node properties to the CBQRI controllers
- Use the PPTT Cache ID and the SRAT proximity domain as the resource
IDs instead of the MMIO address
- Only build the table when CBQRI controllers are present
- Set the table revision to 1
- Make RCID Count and MCID Count 2 bytes each
- Add the Bandwidth per Block field to memory resources
- Make RISCV_VIRT select RISCV_CBQRI
- Link to v1: https://lore.kernel.org/qemu-devel/20260202-riscv-rqsc-v1-0-dcf448a3ed73@kernel.org/
[1] https://github.com/riscv-non-isa/riscv-rqsc/releases/tag/v1.0.0
[2] https://github.com/riscv-non-isa/riscv-cbqri/releases/tag/v1.0
[3] https://lore.kernel.org/qemu-devel/20261111-riscv-ssqosid-cbqri-v8-0-121f6dcfb573@kernel.org/
[4] https://lore.kernel.org/qemu-devel/20261015064957.4076464-1-sunilvl@oss.qualcomm.com/
[5] https://lore.kernel.org/qemu-devel/tencent_F9C68A515AC6C40BE2C32DB314E14CCB7106@qq.com/
[6] https://lore.kernel.org/all/20260601-ssqosid-cbqri-rqsc-v7-0-v6-0-baf00f50028a@kernel.org/
[7] https://github.com/tt-fustini/linux/tree/b4/ssqosid-cbqri-rqsc
Signed-off-by: Drew Fustini <fustini@kernel.org>
---
Drew Fustini (2):
hw/riscv: add cache_level and node properties to CBQRI controllers
hw/riscv: add support for ACPI RQSC table
hw/riscv/Kconfig | 2 +-
hw/riscv/cbqri_bandwidth.c | 26 ++++
hw/riscv/cbqri_capacity.c | 21 ++++
hw/riscv/virt-acpi-build.c | 298 ++++++++++++++++++++++++++++++++++++++++++++-
include/hw/riscv/cbqri.h | 20 +++
5 files changed, 365 insertions(+), 2 deletions(-)
---
base-commit: bf67d56f282c1ee25b67dfda3f8ca54d2bd4648e
change-id: 20260201-riscv-rqsc-ae806ee0a7aa
prerequisite-change-id: 20251229-riscv-ssqosid-cbqri-aee2271532ff:v8
prerequisite-patch-id: 7d1487071207ac8c9750af152baec0cfa80b704f
prerequisite-patch-id: 7d852a70275071c5b5cfce579bbb442cf5b4d456
prerequisite-patch-id: 6361057143117707a309b225a6e0d6a708e6f5ff
prerequisite-patch-id: b207082f77e5882c20a061cf415055b6832eef7c
prerequisite-patch-id: 2d20f4be6cb77039cca28cb0b774524f88f964b1
prerequisite-patch-id: f3474864af8c82a4d96ac2b99de7abb80458e366
prerequisite-message-id: <20261015064957.4076464-1-sunilvl@oss.qualcomm.com>
prerequisite-patch-id: 2ff76b9d66b52771c4f963d891f39a6a93fbe5b4
prerequisite-patch-id: 95682b479c131bd09f4bd68426554918e1d43075
prerequisite-patch-id: cca54a74db19c96cb4cf048393dc278d96edd905
prerequisite-patch-id: ee77339d6590704a4240b641ebfc2574f7f29ed5
prerequisite-patch-id: 2b50d0ab2b41d993906cdf0abbd2013192d6e411
Best regards,
--
Drew Fustini <fustini@kernel.org>
© 2016 - 2026 Red Hat, Inc.