On Fri, 17 Jun 2022 at 15:57, Peter Xu <pet...@redhat.com> wrote: > > This version of run_on_cpu() allows to take an Error** to detect errors. > > Signed-off-by: Peter Xu <pet...@redhat.com> > --- > cpus-common.c | 27 +++++++++++++++++++++++++++ > include/hw/core/cpu.h | 26 ++++++++++++++++++++++++++ > softmmu/cpus.c | 6 ++++++ > 3 files changed, 59 insertions(+)
> +/** > + * run_on_cpu2: > + * @cpu: The vCPU to run on. > + * @func: The function to be executed. > + * @data: Data to pass to the function. > + * @errp: The Error** pointer to be passed into @func2. > + * > + * Schedules the function @func2 for execution on the vCPU @cpu, capture > + * any error and put it into *@errp when provided. > + */ > +void run_on_cpu2(CPUState *cpu, run_on_cpu_func2 func2, run_on_cpu_data data, > + Error **errp); Can you give this a more descriptive name, please, unless the plan is to convert all the users of the existing run_on_cpu() and then rename this function to that ? thanks -- PMM