[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 10/35] exec-all: Move cpu_can_do_io() to qom/cpu.
From: |
Peter Crosthwaite |
Subject: |
[Qemu-devel] [PATCH v3 10/35] exec-all: Move cpu_can_do_io() to qom/cpu.h |
Date: |
Sat, 18 Jul 2015 02:40:20 -0700 |
This function has no architecture specific dependencies and should be
callable from core code. Move it to qom/cpu.h.
Reviewed-by: Richard Henderson <address@hidden>
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 a6fce04..4bc4340 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -344,27 +344,6 @@ 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;
-}
-
#if !defined(CONFIG_USER_ONLY)
void migration_bitmap_extend(ram_addr_t old, ram_addr_t new);
#endif
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index 20aabc9..0815ed5 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -694,6 +694,27 @@ void QEMU_NORETURN cpu_abort(CPUState *cpu, const char
*fmt, ...)
GCC_FMT_ATTR(2, 3);
void cpu_exec_exit(CPUState *cpu);
+/**
+ * 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] [PATCH v3 01/35] cpu-exec: Migrate some generic fns to cpu-exec-common, (continued)
- [Qemu-devel] [PATCH v3 01/35] cpu-exec: Migrate some generic fns to cpu-exec-common, Peter Crosthwaite, 2015/07/18
- [Qemu-devel] [PATCH v3 02/35] translate: Listify tcg_exec_init(), Peter Crosthwaite, 2015/07/18
- [Qemu-devel] [PATCH v3 03/35] translate-all: Move tcg_handle_interrupt() to -common, Peter Crosthwaite, 2015/07/18
- [Qemu-devel] [PATCH v3 04/35] tcg: split tcg_op_defs to -common, Peter Crosthwaite, 2015/07/18
- [Qemu-devel] [PATCH v3 05/35] tcg: Move tcg_tb_ptr to -common, Peter Crosthwaite, 2015/07/18
- [Qemu-devel] [PATCH v3 06/35] translate: move real_host_page setting to -common, Peter Crosthwaite, 2015/07/18
- [Qemu-devel] [PATCH v3 07/35] cpus: Listify cpu_list() function, Peter Crosthwaite, 2015/07/18
- [Qemu-devel] [PATCH v3 08/35] translate-common: Listify tcg_enabled(), Peter Crosthwaite, 2015/07/18
- [Qemu-devel] [PATCH v3 09/35] core: Convert tcg_enabled() users to tcg_(any|all)_enabled(), Peter Crosthwaite, 2015/07/18
- [Qemu-devel] [PATCH v3 10/35] exec-all: Move cpu_can_do_io() to qom/cpu.h,
Peter Crosthwaite <=
- [Qemu-devel] [PATCH v3 11/35] cputlb: move CPU_LOOP() for tlb_reset() to exec.c, Peter Crosthwaite, 2015/07/18
- [Qemu-devel] [PATCH v3 12/35] cputlb: Change tlb_set_dirty() arg to cpu, Peter Crosthwaite, 2015/07/18
- [Qemu-devel] [PATCH v3 13/35] include/exec: Move cputlb exec.c defs out, Peter Crosthwaite, 2015/07/18
- [Qemu-devel] [PATCH v3 14/35] cpu-common: Define tb_page_addr_t for everyone, Peter Crosthwaite, 2015/07/18
- [Qemu-devel] [PATCH v3 15/35] include/exec: Split target_long def to new header, Peter Crosthwaite, 2015/07/18
[Qemu-devel] [PATCH v3 17/35] monitor: uninclude cpu_ldst, Peter Crosthwaite, 2015/07/18