summaryrefslogtreecommitdiff
path: root/cpu-all.h
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2011-05-03 19:22:38 -0300
committerMarcelo Tosatti <mtosatti@redhat.com>2011-05-03 19:22:38 -0300
commita1459cad89ba49fe63a340b11ba38e31eff0611d (patch)
tree4a0b400b1f23bcb27902d77b25efa4a481cf3018 /cpu-all.h
parent2d7abfd627bba11ec072f23d2c8c8e0c4a3fb647 (diff)
parentaa7f74d1199020a29c677bc80518df5267bfe73f (diff)
Merge commit 'aa7f74d1199020a29c677bc80518df5267bfe73f' into upstream-merge
* commit 'aa7f74d1199020a29c677bc80518df5267bfe73f': (70 commits) kvm: Install specialized interrupt handler Redirect cpu_interrupt to callback handler Break up user and system cpu_interrupt implementations kvm: create kvmclock when one of the flags are present kvm: add kvmclock to its second bit x86: Allow multiple cpu feature matches of lookup_feature kvm: use kernel-provided para_features instead of statically coming up with new capabilities Don't zero out buffer in sched_getaffinity Fix buffer overrun in sched_getaffinity linux-user: Fix compilation for "old" linux versions virtfs: fix build due from rename virtio-serial: Fix endianness bug in the config space char: Detect chardev release by NULL handlers as well as NULL opaque char: Allow devices to use a single multiplexed chardev. spice-chardev: listen to frontend guest open / close virtio-console: notify backend of guest open / close chardev: Allow frontends to notify backends of guest open / close target-arm: Don't update base register on abort in Thumb T1 LDM target-arm: fix LDMIA bug on page boundary ioapic: Do not set irr for masked edge IRQs ... Conflicts: kvm-all.c Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'cpu-all.h')
-rw-r--r--cpu-all.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/cpu-all.h b/cpu-all.h
index 0bae6df8e..88126ea65 100644
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -799,7 +799,19 @@ extern CPUState *cpu_single_env;
#define CPU_INTERRUPT_SIPI 0x800 /* SIPI pending. */
#define CPU_INTERRUPT_MCE 0x1000 /* (x86 only) MCE pending. */
-void cpu_interrupt(CPUState *s, int mask);
+#ifndef CONFIG_USER_ONLY
+typedef void (*CPUInterruptHandler)(CPUState *, int);
+
+extern CPUInterruptHandler cpu_interrupt_handler;
+
+static inline void cpu_interrupt(CPUState *s, int mask)
+{
+ cpu_interrupt_handler(s, mask);
+}
+#else /* USER_ONLY */
+void cpu_interrupt(CPUState *env, int mask);
+#endif /* USER_ONLY */
+
void cpu_reset_interrupt(CPUState *env, int mask);
void cpu_exit(CPUState *s);