2
0

nmi.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * NMI monitor handler class and helpers definitions.
  3. *
  4. * Copyright IBM Corp., 2014
  5. *
  6. * Author: Alexey Kardashevskiy <aik@ozlabs.ru>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License,
  11. * or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, see <http://www.gnu.org/licenses/>.
  20. */
  21. #ifndef NMI_H
  22. #define NMI_H
  23. #include "qom/object.h"
  24. #define TYPE_NMI "nmi"
  25. typedef struct NMIClass NMIClass;
  26. DECLARE_CLASS_CHECKERS(NMIClass, NMI,
  27. TYPE_NMI)
  28. #define NMI(obj) \
  29. INTERFACE_CHECK(NMIState, (obj), TYPE_NMI)
  30. typedef struct NMIState NMIState;
  31. struct NMIClass {
  32. InterfaceClass parent_class;
  33. void (*nmi_monitor_handler)(NMIState *n, int cpu_index, Error **errp);
  34. };
  35. void nmi_monitor_handle(int cpu_index, Error **errp);
  36. #endif /* NMI_H */