From patchwork Thu May 19 22:15:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bandan Das X-Patchwork-Id: 624240 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3r9lt803Frz9t5P for ; Fri, 20 May 2016 08:22:08 +1000 (AEST) Received: from localhost ([::1]:52333 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3WKT-0006fk-S3 for incoming@patchwork.ozlabs.org; Thu, 19 May 2016 18:22:05 -0400 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 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BDC7B3B758; Thu, 19 May 2016 22:15:47 +0000 (UTC) Received: from gigantic.usersys.redhat.com (dhcp-17-169.bos.redhat.com [10.18.17.169]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u4JMFXCL003178; Thu, 19 May 2016 18:15:47 -0400 From: Bandan Das To: qemu-devel@nongnu.org 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> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 19 May 2016 22:15:47 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 4/4] cpus: call the core nmi injection function X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aik@ozlabs.ru, pbonzini@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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)