From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3WEV-0001lL-GO for qemu-devel@nongnu.org; Thu, 19 May 2016 18:16:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3WEO-0007H7-9k for qemu-devel@nongnu.org; Thu, 19 May 2016 18:15:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3WEO-0007Gx-4t for qemu-devel@nongnu.org; Thu, 19 May 2016 18:15:48 -0400 From: Bandan Das Date: Thu, 19 May 2016 18:15:16 -0400 Message-Id: <1463696116-31631-5-git-send-email-bsd@redhat.com> In-Reply-To: <1463696116-31631-1-git-send-email-bsd@redhat.com> References: <1463696116-31631-1-git-send-email-bsd@redhat.com> Subject: [Qemu-devel] [PATCH 4/4] cpus: call the core nmi injection function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, aik@ozlabs.ru Now that the common functions are in place, we can call it instead of duplicating code. Signed-off-by: Bandan Das --- cpus.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/cpus.c b/cpus.c index eb34b4f..ead4e3f 100644 --- a/cpus.c +++ b/cpus.c @@ -1693,21 +1693,7 @@ exit: void qmp_inject_nmi(Error **errp) { -#if defined(TARGET_I386) - CPUState *cs; - - CPU_FOREACH(cs) { - X86CPU *cpu = X86_CPU(cs); - - if (!cpu->apic_state) { - cpu_interrupt(cs, CPU_INTERRUPT_NMI); - } else { - apic_deliver_nmi(cpu->apic_state); - } - } -#else - nmi_monitor_handle(monitor_get_cpu_index(), errp); -#endif + inject_nmi(errp); } void dump_drift_info(FILE *f, fprintf_function cpu_fprintf) -- 2.5.5