Re: [PATCH v8 04/10] hw/riscv/virt: add opt-in RPMI base support
Sunil V L <[email protected]>
| Newsgroups | org.nongnu.qemu-riscv,org.nongnu.qemu-devel |
|---|---|
| Message-ID | <CAB19ukGHNA7KwDpgeucPoy0h2OThHGL7LqESDeY8f_moxPGyUQ@mail.gmail.com> |
On Fri, Aug 14, 2026 at 10:25 AM Subrahmanya Lingappa <[email protected]> wrote: > > Add the virt machine rpmi=on/off option and wire the initial RPMI Base > transport into machine realization. > > The option remains disabled by default and requires TCG plus librpmi. > Invalid accelerator/build combinations fail during machine > initialization. When enabled, virt allocates the RPMI shared-memory > transport, creates the RPMI device, configures Base service metadata, > and emits the corresponding device-tree nodes for firmware discovery. > > Signed-off-by: Subrahmanya Lingappa <[email protected]> > --- > hw/misc/meson.build | 2 +- > hw/misc/riscv_rpmi-stub.c | 16 +++++++ > hw/riscv/Kconfig | 1 + > hw/riscv/meson.build | 4 +- > hw/riscv/rpmi-fdt-stub.c | 37 +++++++++++++++ > hw/riscv/virt.c | 96 +++++++++++++++++++++++++++++++++++++++ > include/hw/riscv/virt.h | 3 ++ > 7 files changed, 157 insertions(+), 2 deletions(-) > create mode 100644 hw/misc/riscv_rpmi-stub.c > create mode 100644 hw/riscv/rpmi-fdt-stub.c > > diff --git a/hw/misc/meson.build b/hw/misc/meson.build > index e7c2ebe28f..92c9cd6064 100644 > --- a/hw/misc/meson.build > +++ b/hw/misc/meson.build > @@ -170,4 +170,4 @@ system_ss.add(when: 'CONFIG_SBSA_REF', if_true: files('sbsa_ec.c')) > system_ss.add(when: 'CONFIG_LASI', if_true: files('lasi.c')) > system_ss.add(when: 'CONFIG_RISCV_RPMI', if_true: [files( > 'riscv_rpmi.c', > -), librpmi]) > +), librpmi], if_false: files('riscv_rpmi-stub.c')) > diff --git a/hw/misc/riscv_rpmi-stub.c b/hw/misc/riscv_rpmi-stub.c > new file mode 100644 > index 0000000000..dc32b43227 > --- /dev/null > +++ b/hw/misc/riscv_rpmi-stub.c > @@ -0,0 +1,16 @@ > +/* > + * RISC-V RPMI stubs. > Shouldn't these changes which are outside of the virt, be in a separate patch? Thanks, Sunil