Philippe,

On Mon, Jul 20, 2026 at 4:29 PM Philippe Mathieu-Daudé
<[email protected]> wrote:
>
> On 14/7/26 09:56, Subrahmanya Lingappa wrote:
> > Add a QEMU implementation of the RPMI System Reset service group.
> >
> > The service advertises shutdown and cold reboot reset types, validates
> > guest requests, and dispatches accepted requests through the machine
> > reset and shutdown callbacks. This lets firmware use RPMI reset commands
> > while keeping the board-specific reset policy in the RISC-V virt machine.
> >
> > Signed-off-by: Subrahmanya Lingappa <[email protected]>
> > ---
> >   hw/misc/meson.build           |   1 +
> >   hw/misc/riscv_rpmi.c          |  38 ++++++-
> >   hw/misc/riscv_rpmi_internal.h |   9 ++
> >   hw/misc/riscv_rpmi_sysreset.c | 206 ++++++++++++++++++++++++++++++++++
> >   hw/riscv/virt.c               |  40 +++++++
> >   include/hw/misc/riscv_rpmi.h  |  13 ++-
> >   include/hw/riscv/rpmi-fdt.h   |  11 ++
> >   7 files changed, 313 insertions(+), 5 deletions(-)
> >   create mode 100644 hw/misc/riscv_rpmi_sysreset.c
>
>
> > diff --git a/include/hw/misc/riscv_rpmi.h b/include/hw/misc/riscv_rpmi.h
> > index b5d8a32f9b..d11db87731 100644
> > --- a/include/hw/misc/riscv_rpmi.h
> > +++ b/include/hw/misc/riscv_rpmi.h
>
>
> > +typedef struct RiscvRpmiMachineOps {
> > +    void (*system_reset)(void *opaque);
> > +    void (*system_shutdown)(void *opaque);
>
> What is the plan for this @opaque argument?
>
 The opaque argument was only future-proofing and is not needed by
  the current virt machine callbacks, so I'll remove it instead of
keeping unused
  callback state. in v5

Thanks,
subbu

> > +} RiscvRpmiMachineOps;
> >   typedef struct RiscvRpmiServiceConfig {
> >       RiscvRpmiServiceKind kind;
> >       const char *node_name;
> > @@ -56,7 +62,8 @@ typedef struct RiscvRpmiConfig {
> >       uint32_t a2p_req_size;
> >       uint32_t p2a_req_size;
> >       const char *platform_info;
> > -
> > +    const RiscvRpmiMachineOps *machine_ops;
> > +    void *machine_opaque;
> >       const uint32_t *hart_ids;
> >       uint32_t hart_count;
> >       const RiscvRpmiServiceConfig *services;
> > @@ -73,7 +80,9 @@ struct RiscvRpmiState {
> >       uint32_t a2p_req_size;
> >       uint32_t p2a_req_size;
> >       char *platform_info;
> > -
> > +    const RiscvRpmiMachineOps *machine_ops;
> > +    void *machine_opaque;
> > +    struct rpmi_service_group *sysreset_group;
> >       uint32_t *hart_ids;
> >       uint32_t hart_count;
> >       const RiscvRpmiServiceConfig *services;
>

Reply via email to