ia64/xen-unstable

view xen/include/asm-x86/nmi.h @ 16185:42d8dadb5864

x86: Allow NMI callback CS to be specified via set_trap_table()
hypercall.
Based on a patch by Jan Beulich.
Signed-off-by: Keir Fraser <keir@xensource.com>
author Keir Fraser <keir@xensource.com>
date Mon Oct 22 13:04:32 2007 +0100 (2007-10-22)
parents c6f7774cae63
children
line source
2 #ifndef ASM_NMI_H
3 #define ASM_NMI_H
5 #include <public/nmi.h>
7 struct cpu_user_regs;
9 typedef int (*nmi_callback_t)(struct cpu_user_regs *regs, int cpu);
11 /**
12 * set_nmi_callback
13 *
14 * Set a handler for an NMI. Only one handler may be
15 * set. Return 1 if the NMI was handled.
16 */
17 void set_nmi_callback(nmi_callback_t callback);
19 /**
20 * unset_nmi_callback
21 *
22 * Remove the handler previously set.
23 */
24 void unset_nmi_callback(void);
26 /**
27 * register_guest_nmi_callback
28 *
29 * The default NMI handler passes the NMI to a guest callback. This
30 * function registers the address of that callback.
31 */
32 long register_guest_nmi_callback(unsigned long address);
34 /**
35 * unregister_guest_nmi_callback
36 *
37 * Unregister a guest NMI handler.
38 */
39 long unregister_guest_nmi_callback(void);
41 #endif /* ASM_NMI_H */