[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v16 23/23] accel-cpu: make cpu_realizefn return a bool
From: |
Richard Henderson |
Subject: |
Re: [PATCH v16 23/23] accel-cpu: make cpu_realizefn return a bool |
Date: |
Fri, 5 Feb 2021 10:17:07 -1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 2/4/21 6:39 AM, Claudio Fontana wrote:
> overall, all devices' realize functions take an Error **errp, but return void.
>
> hw/core/qdev.c code, which realizes devices, therefore does:
>
> local_err = NULL;
> dc->realize(dev, &local_err);
> if (local_err != NULL) {
> goto fail;
> }
>
> However, we can improve at least accel_cpu to return a meaningful bool value.
>
> Signed-off-by: Claudio Fontana <cfontana@suse.de>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> include/hw/core/accel-cpu.h | 2 +-
> include/qemu/accel.h | 2 +-
> target/i386/host-cpu.h | 2 +-
> accel/accel-common.c | 6 +++---
> cpu.c | 5 +++--
> target/i386/host-cpu.c | 5 +++--
> target/i386/kvm/kvm-cpu.c | 4 ++--
> target/i386/tcg/tcg-cpu.c | 6 ++++--
> 8 files changed, 18 insertions(+), 14 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
- Re: [PATCH v16 22/23] target/i386: fix host_cpu_adjust_phys_bits error handling, (continued)
- [PATCH v16 21/23] accel: introduce new accessor functions, Claudio Fontana, 2021/02/04
- [PATCH v16 18/23] accel: introduce AccelCPUClass extending CPUClass, Claudio Fontana, 2021/02/04
- [PATCH v16 14/23] cpu: move debug_check_watchpoint to tcg_ops, Claudio Fontana, 2021/02/04
- [PATCH v16 15/23] cpu: tcg_ops: move to tcg-cpu-ops.h, keep a pointer in CPUClass, Claudio Fontana, 2021/02/04
- [PATCH v16 17/23] accel: replace struct CpusAccel with AccelOpsClass, Claudio Fontana, 2021/02/04
- [PATCH v16 19/23] i386: split cpu accelerators from cpu.c, using AccelCPUClass, Claudio Fontana, 2021/02/04
- [PATCH v16 23/23] accel-cpu: make cpu_realizefn return a bool, Claudio Fontana, 2021/02/04
- Re: [PATCH v16 23/23] accel-cpu: make cpu_realizefn return a bool,
Richard Henderson <=
- Re: [PATCH v16 00/23] i386 cleanup PART 2, Richard Henderson, 2021/02/05