aboutsummaryrefslogtreecommitdiff
path: root/softmmu/cpus.c
diff options
context:
space:
mode:
Diffstat (limited to 'softmmu/cpus.c')
-rw-r--r--softmmu/cpus.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/softmmu/cpus.c b/softmmu/cpus.c
index 99f4184..f3d0c59 100644
--- a/softmmu/cpus.c
+++ b/softmmu/cpus.c
@@ -225,6 +225,24 @@ int64_t cpus_get_elapsed_ticks(void)
return cpu_get_ticks();
}
+static void generic_handle_interrupt(CPUState *cpu, int mask)
+{
+ cpu->interrupt_request |= mask;
+
+ if (!qemu_cpu_is_self(cpu)) {
+ qemu_cpu_kick(cpu);
+ }
+}
+
+void cpu_interrupt(CPUState *cpu, int mask)
+{
+ if (cpus_accel->handle_interrupt) {
+ cpus_accel->handle_interrupt(cpu, mask);
+ } else {
+ generic_handle_interrupt(cpu, mask);
+ }
+}
+
static int do_vm_stop(RunState state, bool send_stop)
{
int ret = 0;