#include <xen/lib.h>
#include <xen/mm.h>
#include <xen/irq.h>
-#include <xen/nmi.h>
#include <xen/delay.h>
#include <xen/time.h>
#include <xen/sched.h>
#include <asm/mc146818rtc.h>
#include <asm/msr.h>
#include <asm/mpspec.h>
+#include <asm/nmi.h>
#include <asm/debugger.h>
#include <asm/div64.h>
#include <asm/apic.h>
#include <xen/types.h>
#include <xen/errno.h>
#include <xen/init.h>
-#include <xen/nmi.h>
#include <xen/string.h>
#include <xen/delay.h>
#include <xen/xenoprof.h>
#include <asm/apic.h>
#include <asm/regs.h>
#include <asm/current.h>
+#include <asm/nmi.h>
#include "op_counter.h"
#include "op_x86_model.h"
#include <xen/lib.h>
#include <xen/sched.h>
#include <compat/callback.h>
+#include <compat/nmi.h>
#include <asm/current.h>
#include <asm/nmi.h>
return rc;
}
+long do_nmi_op(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
+{
+ struct xennmi_callback cb;
+ long rc = 0;
+
+ switch ( cmd )
+ {
+ case XENNMI_register_callback:
+ rc = -EFAULT;
+ if ( copy_from_guest(&cb, arg, 1) )
+ break;
+ rc = register_guest_nmi_callback(cb.handler_address);
+ break;
+ case XENNMI_unregister_callback:
+ rc = unregister_guest_nmi_callback();
+ break;
+ default:
+ rc = -ENOSYS;
+ break;
+ }
+
+ return rc;
+}
+
+int compat_nmi_op(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
+{
+ struct compat_nmi_callback cb;
+ int rc = 0;
+
+ switch ( cmd )
+ {
+ case XENNMI_register_callback:
+ rc = -EFAULT;
+ if ( copy_from_guest(&cb, arg, 1) )
+ break;
+ rc = register_guest_nmi_callback(cb.handler_address);
+ break;
+ case XENNMI_unregister_callback:
+ rc = unregister_guest_nmi_callback();
+ break;
+ default:
+ rc = -ENOSYS;
+ break;
+ }
+
+ return rc;
+}
+
/*
* Local variables:
* mode: C
#include <xen/domain_page.h>
#include <xen/symbols.h>
#include <xen/iocap.h>
-#include <xen/nmi.h>
#include <xen/version.h>
#include <xen/kexec.h>
#include <xen/trace.h>
#include <asm/xstate.h>
#include <asm/debugger.h>
#include <asm/msr.h>
+#include <asm/nmi.h>
#include <asm/shared.h>
#include <asm/x86_emulate.h>
#include <asm/traps.h>
#include <xen/console.h>
#include <xen/sched.h>
#include <xen/shutdown.h>
-#include <xen/nmi.h>
#include <xen/guest_access.h>
#include <xen/watchdog.h>
#include <xen/hypercall.h>
#include <asm/flushtlb.h>
#include <asm/traps.h>
#include <asm/event.h>
+#include <asm/nmi.h>
#include <asm/msr.h>
#include <asm/page.h>
#include <asm/shared.h>
#include <xen/errno.h>
#include <xen/version.h>
#include <xen/sched.h>
-#include <xen/nmi.h>
#include <xen/guest_access.h>
#include <asm/current.h>
#include <compat/xen.h>
-#include <compat/nmi.h>
#include <compat/version.h>
extern xen_commandline_t saved_cmdline;
CHECK_TYPE(domain_handle);
-#define xennmi_callback compat_nmi_callback
-#define xennmi_callback_t compat_nmi_callback_t
-
#ifdef COMPAT_VM_ASSIST_VALID
#undef VM_ASSIST_VALID
#define VM_ASSIST_VALID COMPAT_VM_ASSIST_VALID
#include <xen/version.h>
#include <xen/sched.h>
#include <xen/paging.h>
-#include <xen/nmi.h>
#include <xen/guest_access.h>
#include <xen/hypercall.h>
#include <xsm/xsm.h>
#include <asm/current.h>
-#include <public/nmi.h>
#include <public/version.h>
#ifndef COMPAT
return -ENOSYS;
}
-DO(nmi_op)(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
-{
- struct xennmi_callback cb;
- long rc = 0;
-
- switch ( cmd )
- {
- case XENNMI_register_callback:
- rc = -EFAULT;
- if ( copy_from_guest(&cb, arg, 1) )
- break;
- rc = register_guest_nmi_callback(cb.handler_address);
- break;
- case XENNMI_unregister_callback:
- rc = unregister_guest_nmi_callback();
- break;
- default:
- rc = -ENOSYS;
- break;
- }
-
- return rc;
-}
-
#ifdef VM_ASSIST_VALID
DO(vm_assist)(unsigned int cmd, unsigned int type)
{
+++ /dev/null
-#ifndef ASM_NMI_H
-#define ASM_NMI_H
-
-#define register_guest_nmi_callback(a) (-ENOSYS)
-#define unregister_guest_nmi_callback() (-ENOSYS)
-
-#endif /* ASM_NMI_H */
-/*
- * Local variables:
- * mode: C
- * c-file-style: "BSD"
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
+++ /dev/null
-/******************************************************************************
- * nmi.h
- *
- * Register and unregister NMI callbacks.
- *
- * Copyright (c) 2006, Ian Campbell <ian.campbell@xensource.com>
- */
-
-#ifndef __XEN_NMI_H__
-#define __XEN_NMI_H__
-
-#include <asm/nmi.h>
-
-#endif /* __XEN_NMI_H__ */