QEMU-Riscv Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Subrahmanya Lingappa <subrahmanya.lingappa@oss.qualcomm.com>
To: qemu-riscv@nongnu.org
Cc: Subrahmanya Lingappa <subrahmanya.lingappa@oss.qualcomm.com>
Subject: [PATCH v5 00/10] riscv: add initial RPMI virt support
Date: Tue, 21 Jul 2026 12:06:26 +0530	[thread overview]
Message-ID: <cover.1784547370.git.subrahmanya.lingappa@oss.qualcomm.com> (raw)

Add optional librpmi support and the initial RISC-V virt RPMI
implementation. This series introduces the shared-memory transport, FDT
helpers, opt-in virt wiring, and the Base, System Reset, HSM, and System
Suspend service groups with qtest and functional coverage.

The implementation targets the RISC-V Platform Management Interface
(RPMI) Specification v1.0 Ratified and uses librpmi as the backend.

Changes since v4:
- Drop the unused machine-opaque argument from the RPMI machine callback
  API.
- Move the no-librpmi riscv_rpmi_create() fallback out of the public
  header into a dedicated hw/misc/riscv_rpmi-stub.c file.
- Add a matching RPMI FDT helper stub file for no-librpmi builds, while
  keeping the real rpmi-fdt.c source gated on CONFIG_RISCV_RPMI.
- Revalidate librpmi and no-librpmi builds, qtest, and the real OpenSBI
  RPMI guest flow.

Subrahmanya Lingappa (10):
  build: add optional librpmi dependency
  hw/misc: add RISC-V RPMI transport and Base support
  hw/riscv: add RPMI FDT helpers
  hw/riscv/virt: add opt-in RPMI base support
  riscv: add RPMI system reset service
  riscv: add RPMI HSM service
  riscv: add RPMI system suspend service
  docs/system/riscv: document initial virt RPMI support
  tests/qtest: cover initial RISC-V RPMI services
  tests/functional: add initial RPMI virt guest smoke

 Kconfig.host                               |   3 +
 MAINTAINERS                                |   3 +
 docs/system/riscv/virt.rst                 |  65 ++
 hw/misc/Kconfig                            |   4 +
 hw/misc/meson.build                        |   6 +
 hw/misc/riscv_rpmi-stub.c                  |  16 +
 hw/misc/riscv_rpmi.c                       | 558 +++++++++++++++++
 hw/misc/riscv_rpmi_hsm.c                   | 287 +++++++++
 hw/misc/riscv_rpmi_internal.h              |  42 ++
 hw/misc/riscv_rpmi_sysreset.c              | 206 +++++++
 hw/misc/riscv_rpmi_syssusp.c               | 191 ++++++
 hw/riscv/Kconfig                           |   1 +
 hw/riscv/meson.build                       |   3 +
 hw/riscv/rpmi-fdt-stub.c                   |  63 ++
 hw/riscv/rpmi-fdt.c                        | 103 ++++
 hw/riscv/virt.c                            | 166 +++++
 include/hw/misc/riscv_rpmi.h               | 114 ++++
 include/hw/riscv/rpmi-fdt.h                |  41 ++
 include/hw/riscv/virt.h                    |   3 +
 meson.build                                |  14 +
 meson_options.txt                          |   2 +
 scripts/meson-buildoptions.sh              |   3 +
 tests/functional/riscv64/meson.build       |   2 +
 tests/functional/riscv64/test_rpmi_virt.py | 171 ++++++
 tests/qtest/meson.build                    |   2 +
 tests/qtest/riscv-rpmi-test.c              | 684 +++++++++++++++++++++
 26 files changed, 2753 insertions(+)
 create mode 100644 hw/misc/riscv_rpmi-stub.c
 create mode 100644 hw/misc/riscv_rpmi.c
 create mode 100644 hw/misc/riscv_rpmi_hsm.c
 create mode 100644 hw/misc/riscv_rpmi_internal.h
 create mode 100644 hw/misc/riscv_rpmi_sysreset.c
 create mode 100644 hw/misc/riscv_rpmi_syssusp.c
 create mode 100644 hw/riscv/rpmi-fdt-stub.c
 create mode 100644 hw/riscv/rpmi-fdt.c
 create mode 100644 include/hw/misc/riscv_rpmi.h
 create mode 100644 include/hw/riscv/rpmi-fdt.h
 create mode 100644 tests/functional/riscv64/test_rpmi_virt.py
 create mode 100644 tests/qtest/riscv-rpmi-test.c


base-commit: 9eb08992b1df4a3dfcf442b1239678095e50471b
-- 
2.43.0


             reply	other threads:[~2026-07-21  6:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-21  6:36 Subrahmanya Lingappa [this message]
2026-07-21  6:36 ` [PATCH v5 01/10] build: add optional librpmi dependency Subrahmanya Lingappa
2026-07-21  6:36 ` [PATCH v5 02/10] hw/misc: add RISC-V RPMI transport and Base support Subrahmanya Lingappa
2026-07-21  6:36 ` [PATCH v5 03/10] hw/riscv: add RPMI FDT helpers Subrahmanya Lingappa
2026-07-21  6:36 ` [PATCH v5 04/10] hw/riscv/virt: add opt-in RPMI base support Subrahmanya Lingappa
2026-07-21  6:36 ` [PATCH v5 05/10] riscv: add RPMI system reset service Subrahmanya Lingappa
2026-07-21  6:36 ` [PATCH v5 06/10] riscv: add RPMI HSM service Subrahmanya Lingappa
2026-07-21  6:36 ` [PATCH v5 07/10] riscv: add RPMI system suspend service Subrahmanya Lingappa
2026-07-21  6:36 ` [PATCH v5 08/10] docs/system/riscv: document initial virt RPMI support Subrahmanya Lingappa
2026-07-21  6:36 ` [PATCH v5 09/10] tests/qtest: cover initial RISC-V RPMI services Subrahmanya Lingappa
2026-07-21  6:36 ` [PATCH v5 10/10] tests/functional: add initial RPMI virt guest smoke Subrahmanya Lingappa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1784547370.git.subrahmanya.lingappa@oss.qualcomm.com \
    --to=subrahmanya.lingappa@oss.qualcomm.com \
    --cc=qemu-riscv@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox