aboutsummaryrefslogtreecommitdiffstats
path: root/include/xen/interface/nmi.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/xen/interface/nmi.h')
-rw-r--r--include/xen/interface/nmi.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/include/xen/interface/nmi.h b/include/xen/interface/nmi.h
new file mode 100644
index 000000000000..b47d9d06fade
--- /dev/null
+++ b/include/xen/interface/nmi.h
@@ -0,0 +1,51 @@
1/******************************************************************************
2 * nmi.h
3 *
4 * NMI callback registration and reason codes.
5 *
6 * Copyright (c) 2005, Keir Fraser <keir@xensource.com>
7 */
8
9#ifndef __XEN_PUBLIC_NMI_H__
10#define __XEN_PUBLIC_NMI_H__
11
12#include <xen/interface/xen.h>
13
14/*
15 * NMI reason codes:
16 * Currently these are x86-specific, stored in arch_shared_info.nmi_reason.
17 */
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)
27
28/*
29 * long nmi_op(unsigned int cmd, void *arg)
30 * NB. All ops return zero on success, else a negative error code.
31 */
32
33/*
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.
37 */
38#define XENNMI_register_callback 0
39struct xennmi_callback {
40 unsigned long handler_address;
41 unsigned long pad;
42};
43DEFINE_GUEST_HANDLE_STRUCT(xennmi_callback);
44
45/*
46 * Deregister NMI callback for this (calling) VCPU.
47 * arg == NULL.
48 */
49#define XENNMI_unregister_callback 1
50
51#endif /* __XEN_PUBLIC_NMI_H__ */