[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC v2 07/34] exec-all: Move cpu_can_do_io to qom/cpu.h
From: |
Peter Crosthwaite |
Subject: |
[Qemu-devel] [RFC v2 07/34] exec-all: Move cpu_can_do_io to qom/cpu.h |
Date: |
Sat, 30 May 2015 23:11:40 -0700 |
This function has no architecture specific dependencies and should be
callable from core code. Move it to qom/cpu.h.
Signed-off-by: Peter Crosthwaite <address@hidden>
---
include/exec/exec-all.h | 21 ---------------------
include/qom/cpu.h | 21 +++++++++++++++++++++
2 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 680d8bc..12630ea 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -364,25 +364,4 @@ extern int singlestep;
/* cpu-exec.c */
extern volatile sig_atomic_t exit_request;
-/**
- * cpu_can_do_io:
- * @cpu: The CPU for which to check IO.
- *
- * Deterministic execution requires that IO only be performed on the last
- * instruction of a TB so that interrupts take effect immediately.
- *
- * Returns: %true if memory-mapped IO is safe, %false otherwise.
- */
-static inline bool cpu_can_do_io(CPUState *cpu)
-{
- if (!use_icount) {
- return true;
- }
- /* If not executing code then assume we are ok. */
- if (cpu->current_tb == NULL) {
- return true;
- }
- return cpu->can_do_io != 0;
-}
-
#endif
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index 4508c56..9863db8 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -678,6 +678,27 @@ void cpu_watchpoint_remove_all(CPUState *cpu, int mask);
void QEMU_NORETURN cpu_abort(CPUState *cpu, const char *fmt, ...)
GCC_FMT_ATTR(2, 3);
+/**
+ * cpu_can_do_io:
+ * @cpu: The CPU for which to check IO.
+ *
+ * Deterministic execution requires that IO only be performed on the last
+ * instruction of a TB so that interrupts take effect immediately.
+ *
+ * Returns: %true if memory-mapped IO is safe, %false otherwise.
+ */
+static inline bool cpu_can_do_io(CPUState *cpu)
+{
+ if (!use_icount) {
+ return true;
+ }
+ /* If not executing code then assume we are ok. */
+ if (cpu->current_tb == NULL) {
+ return true;
+ }
+ return cpu->can_do_io != 0;
+}
+
#ifdef CONFIG_SOFTMMU
extern const struct VMStateDescription vmstate_cpu_common;
#else
--
1.9.1
- [Qemu-devel] [RFC v2 00/34] Multi Architecture System Emulation, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 01/34] cpu-defs: Move CPU_TEMP_BUF_NLONGS to tcg, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 02/34] cpu-exec: Purge all uses of CPU_GET_ENV, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 03/34] Makefile.target: Introduce arch-obj, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 04/34] cpu-exec: Migrate some generic fns to cpus.c, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 05/34] translate: Listify tcg_exec_init, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 06/34] cpu-common: Define tb_page_addr_t for everyone, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 07/34] exec-all: Move cpu_can_do_io to qom/cpu.h,
Peter Crosthwaite <=
- [Qemu-devel] [RFC v2 08/34] translate-all: Move tcg_handle_interrupt to -common, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 09/34] include/exec: Move standard exceptions to cpu-all.h, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 10/34] include/exec: Split target_long def to new header, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 11/34] include/exec: Move cputlb exec.c defs out, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 12/34] include/exec: Move tb hash functions out, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 13/34] cpu-defs: Move out TB_JMP defines, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 14/34] cpu-defs: Allow multiple inclusions, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 15/34] HACK: monitor: Comment out TCG profile ops, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 16/34] HACK: Disable list_cpus, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 17/34] HACK: globalise TCG page size variables, Peter Crosthwaite, 2015/05/31