[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/5] cpus-common: Add run_on_cpu2()
From: |
Peter Maydell |
Subject: |
Re: [PATCH 2/5] cpus-common: Add run_on_cpu2() |
Date: |
Thu, 23 Jun 2022 14:04:03 +0100 |
On Fri, 17 Jun 2022 at 15:57, Peter Xu <peterx@redhat.com> wrote:
>
> This version of run_on_cpu() allows to take an Error** to detect errors.
>
> Signed-off-by: Peter Xu <peterx@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
- [PATCH 0/5] CPU: Detect put cpu register errors for migrations, Peter Xu, 2022/06/17
- [PATCH 1/5] cpus-common: Introduce run_on_cpu_func2 which allows error returns, Peter Xu, 2022/06/17
- [PATCH 3/5] accel: Allow synchronize_post_init() to take an Error**, Peter Xu, 2022/06/17
- [PATCH 4/5] cpu: Allow cpu_synchronize_all_post_init() to take an errp, Peter Xu, 2022/06/17
- [PATCH 5/5] KVM: Hook kvm_arch_put_registers() errors to the caller, Peter Xu, 2022/06/17
- [PATCH 2/5] cpus-common: Add run_on_cpu2(), Peter Xu, 2022/06/17
- Re: [PATCH 2/5] cpus-common: Add run_on_cpu2(),
Peter Maydell <=