Hi

On Wed, Aug 26, 2026 at 4:39 PM Philippe Mathieu-Daudé
<[email protected]> wrote:
>
> On 25/8/26 21:09, Marc-André Lureau wrote:
> > mon_cpu_path and reset_seen are only used by HMP monitors; move them
> > from the base Monitor struct into MonitorHMP to properly encapsulate
> > HMP-specific state.
> >
> > Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
> > Signed-off-by: Marc-André Lureau <[email protected]>
> > ---
> >   monitor/hmp-cmds.c         | 16 +++++++++-------
> >   monitor/hmp.c              |  9 +++++----
> >   monitor/monitor-internal.h |  4 ++--
> >   monitor/monitor.c          |  1 -
> >   4 files changed, 16 insertions(+), 14 deletions(-)
> >
> > diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
> > index 6b1114fdaf13..6718fec97047 100644
> > --- a/monitor/hmp-cmds.c
> > +++ b/monitor/hmp-cmds.c
> > @@ -499,31 +499,33 @@ void hmp_dumpdtb(Monitor *mon, const QDict *qdict)
> >   /* Set the current CPU defined by the user. Callers must hold BQL. */
> >   int monitor_set_cpu(Monitor *mon, int cpu_index)
> >   {
> > +    MonitorHMP *hmp_mon = MONITOR_HMP(mon);
>
> s/_mon// please

It is gone by the end of the series, I'd not bother here.
thanks

>
> >       CPUState *cpu;
> >
> >       cpu = qemu_get_cpu(cpu_index);
> >       if (cpu == NULL) {
> >           return -1;
> >       }
> > -    g_free(mon->mon_cpu_path);
> > -    mon->mon_cpu_path = object_get_canonical_path(OBJECT(cpu));
> > +    g_free(hmp_mon->mon_cpu_path);
> > +    hmp_mon->mon_cpu_path = object_get_canonical_path(OBJECT(cpu));
> >       return 0;
> >   }
>


Reply via email to