1 /******************************************************************************
4 * NMI callback registration and reason codes.
6 * Copyright (c) 2005, Keir Fraser <keir@xensource.com>
9 #ifndef __XEN_PUBLIC_NMI_H__
10 #define __XEN_PUBLIC_NMI_H__
12 #include <xen/interface/xen.h>
16 * Currently these are x86-specific, stored in arch_shared_info.nmi_reason.
18 /* I/O-check error reported via ISA port 0x61, bit 6. */
19 #define _XEN_NMIREASON_io_error 0
20 #define XEN_NMIREASON_io_error (1UL << _XEN_NMIREASON_io_error)
21 /* PCI SERR reported via ISA port 0x61, bit 7. */
22 #define _XEN_NMIREASON_pci_serr 1
23 #define XEN_NMIREASON_pci_serr (1UL << _XEN_NMIREASON_pci_serr)
24 /* Unknown hardware-generated NMI. */
25 #define _XEN_NMIREASON_unknown 2
26 #define XEN_NMIREASON_unknown (1UL << _XEN_NMIREASON_unknown)
29 * long nmi_op(unsigned int cmd, void *arg)
30 * NB. All ops return zero on success, else a negative error code.
34 * Register NMI callback for this (calling) VCPU. Currently this only makes
35 * sense for domain 0, vcpu 0. All other callers will be returned EINVAL.
36 * arg == pointer to xennmi_callback structure.
38 #define XENNMI_register_callback 0
39 struct xennmi_callback
{
40 unsigned long handler_address
;
43 DEFINE_GUEST_HANDLE_STRUCT(xennmi_callback
);
46 * Deregister NMI callback for this (calling) VCPU.
49 #define XENNMI_unregister_callback 1
51 #endif /* __XEN_PUBLIC_NMI_H__ */