From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: philmd@linaro.org, anjo@rev.ng
Subject: [PATCH v3 38/39] accel/tcg: Have tcg_exec_realizefn() return a boolean
Date: Sat, 16 Sep 2023 14:41:22 -0700 [thread overview]
Message-ID: <20230916214123.525796-39-richard.henderson@linaro.org> (raw)
In-Reply-To: <20230916214123.525796-1-richard.henderson@linaro.org>
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Following the example documented since commit e3fe3988d7 ("error:
Document Error API usage rules"), have tcg_exec_realizefn() return
a boolean indicating whether an error is set or not.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230915190009.68404-5-philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/exec/cpu-all.h | 2 +-
accel/tcg/cpu-exec.c | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index 8d262d141e..6c1db14842 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -410,7 +410,7 @@ static inline bool tlb_hit(uint64_t tlb_addr, vaddr addr)
/* accel/tcg/cpu-exec.c */
int cpu_exec(CPUState *cpu);
-void tcg_exec_realizefn(CPUState *cpu, Error **errp);
+bool tcg_exec_realizefn(CPUState *cpu, Error **errp);
void tcg_exec_unrealizefn(CPUState *cpu);
/* Validate correct placement of CPUArchState. */
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 95dd8a30cb..fd0fc08f76 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -1089,7 +1089,7 @@ int cpu_exec(CPUState *cpu)
return ret;
}
-void tcg_exec_realizefn(CPUState *cpu, Error **errp)
+bool tcg_exec_realizefn(CPUState *cpu, Error **errp)
{
static bool tcg_target_initialized;
CPUClass *cc = CPU_GET_CLASS(cpu);
@@ -1105,6 +1105,8 @@ void tcg_exec_realizefn(CPUState *cpu, Error **errp)
tcg_iommu_init_notifier_list(cpu);
#endif /* !CONFIG_USER_ONLY */
/* qemu_plugin_vcpu_init_hook delayed until cpu_index assigned. */
+
+ return true;
}
/* undo the initializations in reverse order */
--
2.34.1
next prev parent reply other threads:[~2023-09-16 21:44 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-16 21:40 [PATCH v3 00/39] target agnostic cleanups Richard Henderson
2023-09-16 21:40 ` [PATCH v3 01/39] target/arm: Replace TARGET_PAGE_ENTRY_EXTRA Richard Henderson
2023-09-16 21:40 ` [PATCH v3 02/39] accel/tcg: Move CPUTLB definitions from cpu-defs.h Richard Henderson
2023-09-16 21:40 ` [PATCH v3 03/39] qom: Propagate alignment through type system Richard Henderson
2023-09-16 21:40 ` [PATCH v3 04/39] target/arm: Remove size and alignment for cpu subclasses Richard Henderson
2023-09-16 21:40 ` [PATCH v3 05/39] target/*: Add instance_align to all cpu base classes Richard Henderson
2023-09-16 21:40 ` [PATCH v3 06/39] accel/tcg: Validate placement of CPUNegativeOffsetState Richard Henderson
2023-09-16 21:40 ` [PATCH v3 07/39] accel/tcg: Move CPUNegativeOffsetState into CPUState Richard Henderson
2023-09-16 21:40 ` [PATCH v3 08/39] accel/tcg: Remove CPUState.icount_decr_ptr Richard Henderson
2023-09-16 21:40 ` [PATCH v3 09/39] accel/tcg: Move can_do_io to CPUNegativeOffsetState Richard Henderson
2023-09-16 21:40 ` [PATCH v3 10/39] accel/tcg: Remove cpu_neg() Richard Henderson
2023-09-16 21:40 ` [PATCH v3 11/39] tcg: Rename cpu_env to tcg_env Richard Henderson
2023-09-16 21:40 ` [PATCH v3 12/39] accel/tcg: Replace CPUState.env_ptr with cpu_env() Richard Henderson
2023-09-16 21:40 ` [PATCH v3 13/39] accel/tcg: Remove cpu_set_cpustate_pointers Richard Henderson
2023-09-16 21:40 ` [PATCH v3 14/39] accel/tcg: Remove env_neg() Richard Henderson
2023-09-19 9:40 ` Philippe Mathieu-Daudé
2023-09-16 21:40 ` [PATCH v3 15/39] tcg: Remove TCGContext.tlb_fast_offset Richard Henderson
2023-09-16 21:41 ` [PATCH v3 16/39] accel/tcg: Modify tlb_*() to use CPUState Richard Henderson
2023-09-19 9:39 ` Philippe Mathieu-Daudé
2023-09-16 21:41 ` [PATCH v3 17/39] accel/tcg: Modify probe_access_internal() " Richard Henderson
2023-09-16 21:41 ` [PATCH v3 18/39] accel/tcg: Modify memory access functions " Richard Henderson
2023-09-16 21:41 ` [PATCH v3 19/39] accel/tcg: Modify atomic_mmu_lookup() " Richard Henderson
2023-09-16 21:41 ` [PATCH v3 20/39] accel/tcg: Use CPUState in atomicity helpers Richard Henderson
2023-09-16 21:41 ` [PATCH v3 21/39] accel/tcg: Remove env_tlb() Richard Henderson
2023-09-19 9:45 ` Philippe Mathieu-Daudé
2023-09-16 21:41 ` [PATCH v3 22/39] accel/tcg: Unify user and softmmu do_[st|ld]*_mmu() Richard Henderson
2023-09-16 21:41 ` [PATCH v3 23/39] accel/tcg: move ld/st helpers to ldst_common.c.inc Richard Henderson
2023-09-16 21:41 ` [PATCH v3 24/39] exec: Make EXCP_FOO definitions target agnostic Richard Henderson
2023-09-16 21:41 ` [PATCH v3 25/39] exec: Move cpu_loop_foo() target agnostic functions to 'cpu-common.h' Richard Henderson
2023-09-16 21:41 ` [PATCH v3 26/39] accel/tcg: Restrict dump_exec_info() declaration Richard Henderson
2023-09-16 21:41 ` [PATCH v3 27/39] accel: Make accel-blocker.o target agnostic Richard Henderson
2023-09-16 21:41 ` [PATCH v3 28/39] accel: Rename accel-common.c -> accel-target.c Richard Henderson
2023-09-16 21:41 ` [PATCH v3 29/39] exec: Rename cpu.c -> cpu-target.c Richard Henderson
2023-09-16 21:41 ` [PATCH v3 30/39] exec: Rename target specific page-vary.c -> page-vary-target.c Richard Henderson
2023-09-16 21:41 ` [PATCH v3 31/39] accel/tcg: Rename target-specific 'internal.h' -> 'internal-target.h' Richard Henderson
2023-09-16 21:41 ` [PATCH v3 32/39] accel/tcg: Make monitor.c a target-agnostic unit Richard Henderson
2023-09-16 21:41 ` [PATCH v3 33/39] accel/tcg: Make icount.o a target agnostic unit Richard Henderson
2023-09-16 21:41 ` [PATCH v3 34/39] accel/tcg: Make cpu-exec-common.c " Richard Henderson
2023-09-16 21:41 ` [PATCH v3 35/39] accel: Rename accel_cpu_realizefn() -> accel_cpu_realize() Richard Henderson
2023-09-16 21:41 ` [PATCH v3 36/39] accel: Introduce accel_cpu_unrealize() stub Richard Henderson
2023-09-18 8:12 ` Philippe Mathieu-Daudé
2023-09-16 21:41 ` [PATCH v3 37/39] accel: Declare AccelClass::[un]realize_cpu() handlers Richard Henderson
2023-09-16 21:41 ` Richard Henderson [this message]
2023-09-16 21:41 ` [PATCH v3 39/39] accel/tcg: Restrict tcg_exec_[un]realizefn() to TCG Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230916214123.525796-39-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=anjo@rev.ng \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).