x86: Raise inter-processor NMI and SMI
PATCH 2/3 x86: Raise inter-processor NMI and SMI
[ This patch obsoletes
http://permalink.gmane.org/gmane.comp.emulators.qemu/22989. ]
Make the APIC deliver inter-processor NMI and SMI requests. NMI delivery was successfully tested in the context of kgdb (Linux kernel debugger), SMI is included for the sake of completeness.
Signed-off-by Jan Kiszka <[email protected]>
---hw/apic.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
hw/apic.c +7 -1
@@ -216,8 +216,14 @@ static void apic_bus_deliver(const uint3break ;case APIC_DM_SMI : +foreach_apic (apic_iter, deliver_bitmask, +cpu_interrupt (apic_iter->cpu_env,CPU_INTERRUPT_SMI ) ); +return ; +case APIC_DM_NMI : -break ; +foreach_apic (apic_iter, deliver_bitmask, +cpu_interrupt (apic_iter->cpu_env,CPU_INTERRUPT_NMI ) ); +return ;case APIC_DM_INIT :/* normal INIT IPI sent to processors */
Quoted 9 lines · Jan Kiszka
[ This patch obsoletes
http://permalink.gmane.org/gmane.comp.emulators.qemu/22989. ]Make the APIC deliver inter-processor NMI and SMI requests. NMI delivery was successfully tested in the context of kgdb (Linux kernel debugger), SMI is included for the sake of completeness.
Signed-off-by Jan Kiszka <[email protected]>
Non-broken patch attached. Sorry.
Jan
--- hw/apic.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
hw/apic.c +7 -1
@@ -216,8 +216,14 @@ static void apic_bus_deliver(const uint3break ;case APIC_DM_SMI : +foreach_apic (apic_iter, deliver_bitmask, +cpu_interrupt (apic_iter->cpu_env,CPU_INTERRUPT_SMI ) ); +return ; +case APIC_DM_NMI : -break ; +foreach_apic (apic_iter, deliver_bitmask, +cpu_interrupt (apic_iter->cpu_env,CPU_INTERRUPT_NMI ) ); +return ;case APIC_DM_INIT :/* normal INIT IPI sent to processors */