From patchwork Thu May 19 22:15:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bandan Das X-Patchwork-Id: 624238 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 3r9lqH5Kwjz9sDb for ; Fri, 20 May 2016 08:19:39 +1000 (AEST) Received: from localhost ([::1]:52319 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3WI5-0004g0-KM for incoming@patchwork.ozlabs.org; Thu, 19 May 2016 18:19:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40093) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3WEK-0001bm-AB for qemu-devel@nongnu.org; Thu, 19 May 2016 18:15:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3WEJ-0007Fr-9m for qemu-devel@nongnu.org; Thu, 19 May 2016 18:15:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60483) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3WEJ-0007Ff-3v for qemu-devel@nongnu.org; Thu, 19 May 2016 18:15:43 -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 C34CA62659; Thu, 19 May 2016 22:15:42 +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 u4JMFXCJ003178; Thu, 19 May 2016 18:15:42 -0400 From: Bandan Das To: qemu-devel@nongnu.org Date: Thu, 19 May 2016 18:15:14 -0400 Message-Id: <1463696116-31631-3-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.39]); Thu, 19 May 2016 22:15:42 +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 2/4] nmi: remove x86 specific nmi handling 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" nmi_monitor_handle is wired to call the x86 nmi handler now. So, we can call it here. Note that this also reverts changes made by commit 33c11879 Signed-off-by: Bandan Das --- hw/core/nmi.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/hw/core/nmi.c b/hw/core/nmi.c index f616a79..cc47025 100644 --- a/hw/core/nmi.c +++ b/hw/core/nmi.c @@ -20,16 +20,11 @@ */ #include "qemu/osdep.h" -#include "qom/cpu.h" #include "hw/nmi.h" #include "qapi/error.h" #include "qapi/qmp/qerror.h" #include "monitor/monitor.h" -#if defined(TARGET_I386) -#include "cpu.h" -#endif - struct do_nmi_s { int cpu_index; Error *err; @@ -80,21 +75,7 @@ void nmi_monitor_handle(int cpu_index, Error **errp) void inject_nmi(void) { -#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(0, NULL); -#endif } static const TypeInfo nmi_info = {