aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorClaudio Fontana <cfontana@suse.de>2020-08-11 15:16:33 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2020-10-05 16:41:22 +0200
commitbb4776be7733659bdbce4548e2c042107bad76f4 (patch)
tree7e02c1ea2062cea1e312f85c93f9a1b60414319c /include
parent994aa172006a545e0e854ebbdb2edef6030f3ad3 (diff)
downloadqemu-bb4776be7733659bdbce4548e2c042107bad76f4.zip
qemu-bb4776be7733659bdbce4548e2c042107bad76f4.tar.gz
qemu-bb4776be7733659bdbce4548e2c042107bad76f4.tar.bz2
cpus: add handle_interrupt to the CpusAccel interface
kvm: uses the generic handler qtest: uses the generic handler whpx: changed to use the generic handler (identical implementation) hax: changed to use the generic handler (identical implementation) hvf: changed to use the generic handler (identical implementation) tcg: adapt tcg-cpus to point to the tcg-specific handler Signed-off-by: Claudio Fontana <cfontana@suse.de> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/core/cpu.h14
-rw-r--r--include/sysemu/cpus.h2
2 files changed, 2 insertions, 14 deletions
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index 6c34798c..4879f250 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -844,12 +844,6 @@ bool cpu_exists(int64_t id);
*/
CPUState *cpu_by_arch_id(int64_t id);
-#ifndef CONFIG_USER_ONLY
-
-typedef void (*CPUInterruptHandler)(CPUState *, int);
-
-extern CPUInterruptHandler cpu_interrupt_handler;
-
/**
* cpu_interrupt:
* @cpu: The CPU to set an interrupt on.
@@ -857,17 +851,9 @@ extern CPUInterruptHandler cpu_interrupt_handler;
*
* Invokes the interrupt handler.
*/
-static inline void cpu_interrupt(CPUState *cpu, int mask)
-{
- cpu_interrupt_handler(cpu, mask);
-}
-
-#else /* USER_ONLY */
void cpu_interrupt(CPUState *cpu, int mask);
-#endif /* USER_ONLY */
-
#ifdef NEED_CPU_H
#ifdef CONFIG_SOFTMMU
diff --git a/include/sysemu/cpus.h b/include/sysemu/cpus.h
index 2617169..2316859 100644
--- a/include/sysemu/cpus.h
+++ b/include/sysemu/cpus.h
@@ -16,6 +16,8 @@ typedef struct CpusAccel {
void (*synchronize_state)(CPUState *cpu);
void (*synchronize_pre_loadvm)(CPUState *cpu);
+ void (*handle_interrupt)(CPUState *cpu, int mask);
+
int64_t (*get_virtual_clock)(void);
int64_t (*get_elapsed_ticks)(void);
} CpusAccel;