19cb805fdSAlexey Kardashevskiy /* 29cb805fdSAlexey Kardashevskiy * NMI monitor handler class and helpers definitions. 39cb805fdSAlexey Kardashevskiy * 49cb805fdSAlexey Kardashevskiy * Copyright IBM Corp., 2014 59cb805fdSAlexey Kardashevskiy * 69cb805fdSAlexey Kardashevskiy * Author: Alexey Kardashevskiy <aik@ozlabs.ru> 79cb805fdSAlexey Kardashevskiy * 89cb805fdSAlexey Kardashevskiy * This program is free software; you can redistribute it and/or modify 99cb805fdSAlexey Kardashevskiy * it under the terms of the GNU General Public License as published by 109cb805fdSAlexey Kardashevskiy * the Free Software Foundation; either version 2 of the License, 119cb805fdSAlexey Kardashevskiy * or (at your option) any later version. 129cb805fdSAlexey Kardashevskiy * 139cb805fdSAlexey Kardashevskiy * This program is distributed in the hope that it will be useful, 149cb805fdSAlexey Kardashevskiy * but WITHOUT ANY WARRANTY; without even the implied warranty of 159cb805fdSAlexey Kardashevskiy * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 169cb805fdSAlexey Kardashevskiy * GNU General Public License for more details. 179cb805fdSAlexey Kardashevskiy * 189cb805fdSAlexey Kardashevskiy * You should have received a copy of the GNU General Public License 199cb805fdSAlexey Kardashevskiy * along with this program; if not, see <http://www.gnu.org/licenses/>. 209cb805fdSAlexey Kardashevskiy */ 219cb805fdSAlexey Kardashevskiy 229cb805fdSAlexey Kardashevskiy #ifndef NMI_H 23175de524SMarkus Armbruster #define NMI_H 249cb805fdSAlexey Kardashevskiy 259cb805fdSAlexey Kardashevskiy #include "qom/object.h" 269cb805fdSAlexey Kardashevskiy 279cb805fdSAlexey Kardashevskiy #define TYPE_NMI "nmi" 289cb805fdSAlexey Kardashevskiy 29db1015e9SEduardo Habkost typedef struct NMIClass NMIClass; 30*8110fa1dSEduardo Habkost DECLARE_CLASS_CHECKERS(NMIClass, NMI, 31*8110fa1dSEduardo Habkost TYPE_NMI) 329cb805fdSAlexey Kardashevskiy #define NMI(obj) \ 3364bc77ebSPhilippe Mathieu-Daudé INTERFACE_CHECK(NMIState, (obj), TYPE_NMI) 349cb805fdSAlexey Kardashevskiy 35aa1b35b9SMarc-André Lureau typedef struct NMIState NMIState; 369cb805fdSAlexey Kardashevskiy 37db1015e9SEduardo Habkost struct NMIClass { 389cb805fdSAlexey Kardashevskiy InterfaceClass parent_class; 399cb805fdSAlexey Kardashevskiy 409cb805fdSAlexey Kardashevskiy void (*nmi_monitor_handler)(NMIState *n, int cpu_index, Error **errp); 41db1015e9SEduardo Habkost }; 429cb805fdSAlexey Kardashevskiy 439cb805fdSAlexey Kardashevskiy void nmi_monitor_handle(int cpu_index, Error **errp); 449cb805fdSAlexey Kardashevskiy 459cb805fdSAlexey Kardashevskiy #endif /* NMI_H */ 46