hw/nmi: Rename nmi_monitor_handler() -> raise_nmi()
nmi_monitor_handler() is not related to the monitor, rename it as raise_nmi(). Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20260812121232.71958-6-philmd@oss.qualcomm.com>
Philippe Mathieu-Daudé committed
Aug 11, 2026 at 12:20 UTC
caabebf76b0203e37108c3c6902cc146bb7dd0f4
10 files changed
+15
-13
hw/core/nmi.c
+1
-1
@@ -37,7 +37,7 @@ static int do_nmi(Object *o, void *opaque)
37
NMIClass *nc = NMI_GET_CLASS(n);
38
39
ns->handled = true;
40
- nc->nmi_monitor_handler(n, &ns->err);
40
+ nc->raise_nmi(n, &ns->err);
41
if (ns->err) {
42
return -1;
43
}
hw/hppa/machine.c
+1
-1
@@ -851,7 +851,7 @@ static void hppa_machine_common_class_init(ObjectClass *oc, const void *data)
851
mc->default_ram_id = "hppa.ram";
852
mc->default_nic = "tulip";
853
854
- nc->nmi_monitor_handler = hppa_nmi;
854
+ nc->raise_nmi = hppa_nmi;
855
}
856
857
static void HP_B160L_machine_init_class_init(ObjectClass *oc, const void *data)
hw/i386/x86.c
+1
-1
@@ -389,7 +389,7 @@ static void x86_machine_class_init(ObjectClass *oc, const void *data)
389
mc->get_default_cpu_node_id = x86_get_default_cpu_node_id;
390
mc->possible_cpu_arch_ids = x86_possible_cpu_arch_ids;
391
mc->kvm_type = x86_kvm_type;
392
- nc->nmi_monitor_handler = x86_nmi;
392
+ nc->raise_nmi = x86_nmi;
393
394
object_class_property_add(oc, X86_MACHINE_SMM, "OnOffAuto",
395
x86_machine_get_smm, x86_machine_set_smm,
hw/intc/m68k_irqc.c
+1
-1
@@ -97,7 +97,7 @@ static void m68k_irqc_class_init(ObjectClass *oc, const void *data)
97
InterruptStatsProviderClass *ic = INTERRUPT_STATS_PROVIDER_CLASS(oc);
98
99
device_class_set_props(dc, m68k_irqc_properties);
100
- nc->nmi_monitor_handler = m68k_nmi;
100
+ nc->raise_nmi = m68k_nmi;
101
device_class_set_legacy_reset(dc, m68k_irqc_reset);
102
dc->vmsd = &vmstate_m68k_irqc;
103
ic->get_statistics = m68k_irqc_get_statistics;
hw/m68k/q800-glue.c
+1
-1
@@ -237,7 +237,7 @@ static void glue_class_init(ObjectClass *klass, const void *data)
237
dc->vmsd = &vmstate_glue;
238
device_class_set_props(dc, glue_properties);
239
rc->phases.hold = glue_reset_hold;
240
- nc->nmi_monitor_handler = glue_nmi;
240
+ nc->raise_nmi = glue_nmi;
241
}
242
243
static const TypeInfo glue_info_types[] = {
hw/misc/macio/gpio.c
+1
-1
@@ -201,7 +201,7 @@ static void macio_gpio_class_init(ObjectClass *oc, const void *data)
201
202
device_class_set_legacy_reset(dc, macio_gpio_reset);
203
dc->vmsd = &vmstate_macio_gpio;
204
- nc->nmi_monitor_handler = macio_gpio_nmi;
204
+ nc->raise_nmi = macio_gpio_nmi;
205
}
206
207
static const TypeInfo macio_gpio_init_info = {
hw/ppc/pnv.c
+1
-1
@@ -3583,7 +3583,7 @@ static void pnv_machine_class_init(ObjectClass *oc, const void *data)
3583
mc->default_ram_size = 1 * GiB;
3584
mc->default_ram_id = "pnv.ram";
3585
ispc->print_info = pnv_pic_print_info;
3586
- nc->nmi_monitor_handler = pnv_nmi;
3586
+ nc->raise_nmi = pnv_nmi;
3587
3588
object_class_property_add_bool(oc, "hb-mode",
3589
pnv_machine_get_hb, pnv_machine_set_hb);
hw/ppc/spapr.c
+1
-1
@@ -4652,7 +4652,7 @@ static void spapr_machine_class_init(ObjectClass *oc, const void *data)
4652
mc->nvdimm_supported = true;
4653
smc->resize_hpt_default = SPAPR_RESIZE_HPT_ENABLED;
4654
fwc->get_dev_path = spapr_get_fw_dev_path;
4655
- nc->nmi_monitor_handler = spapr_nmi;
4655
+ nc->raise_nmi = spapr_nmi;
4656
vhc->cpu_in_nested = spapr_cpu_in_nested;
4657
vhc->deliver_hv_excp = spapr_exit_nested;
4658
vhc->hypercall = emulate_spapr_hypercall;
hw/s390x/s390-virtio-ccw.c
+1
-1
@@ -830,7 +830,7 @@ static void ccw_machine_class_init(ObjectClass *oc, const void *data)
830
hc->plug = s390_machine_device_plug;
831
hc->unplug_request = s390_machine_device_unplug_request;
832
hc->unplug = s390_machine_device_unplug;
833
- nc->nmi_monitor_handler = s390_nmi;
833
+ nc->raise_nmi = s390_nmi;
834
mc->default_ram_id = "s390.ram";
835
mc->default_nic = "virtio-net-ccw";
836
dsi->qmp_dump_skeys = s390_qmp_dump_skeys;
include/hw/core/nmi.h
+6
-4
@@ -38,12 +38,14 @@ struct NMIClass {
38
InterfaceClass parent_class;
39
40
/**
41
- * nmi_monitor_handler: Callback to handle NMI notifications.
42
- *
41
+ * raise_nmi: Callback to handle NMI notifications.
42
* @ns: Class #NMIState state
43
* @errp: pointer to error object
44
+ *
45
+ * Called by nmi_inject() to perform the machine-specific
46
+ * action when a NMI is requested.
47
*/
46
- void (*nmi_monitor_handler)(NMIState *ns, Error **errp);
48
+ void (*raise_nmi)(NMIState *ns, Error **errp);
49
};
50
51
/**
@@ -58,7 +60,7 @@ struct NMIClass {
60
* and on s390 it triggers the RESTART interrupt on the first CPU.)
61
*
62
* The NMI is injected by looking for a QOM object which implements
61
- * the TYPE_NMI interface, and calling its nmi_monitor_handler method. Usually
63
+ * the TYPE_NMI interface, and calling its raise_nmi method. Usually
64
* it is the machine model class that implements this interface.
65
*
66
* Not all machines implement NMI handling; this function