Hi Richard, Richard Henderson wrote: > On 5/19/25 16:19, Julian Ganz wrote: > > diff --git a/plugins/core.c b/plugins/core.c > > index dc1f5cb4d8..f07813d588 100644 > > --- a/plugins/core.c > > +++ b/plugins/core.c > > @@ -104,6 +104,44 @@ static void plugin_vcpu_cb__simple(CPUState *cpu, enum > > qemu_plugin_event ev) > > } > > } > > > > +/* > > + * Disable CFI checks. > > + * The callback function has been loaded from an external library so we do > > not > > + * have type information > > + */ > > +QEMU_DISABLE_CFI > > +static void plugin_vcpu_cb__discon(CPUState *cpu, > > + enum qemu_plugin_discon_type type, > > + uint64_t from) > > +{ > > + struct qemu_plugin_cb *cb, *next; > > + enum qemu_plugin_event ev; > > + uint64_t to = cpu->cc->get_pc(cpu); > > Maybe cleaner to pass in @to. It's readily available in the callers.
We originally did do that. However, we tried to reduce the noise we have at the hook calling site to a minimum. And for some targets we would need to consult get_pc anyway because the PC computation... takes more than one line. I can still add the parameter. But especially given your latest sugestion of altering the do_interrupt interface this may not be worth it. Regards, Julian