From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUSmc-00062m-Mn for qemu-devel@nongnu.org; Sun, 30 Mar 2014 23:21:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WUSmW-000276-Mr for qemu-devel@nongnu.org; Sun, 30 Mar 2014 23:21:10 -0400 Sender: Richard Henderson Message-ID: <5338DF1B.4090506@twiddle.net> Date: Sun, 30 Mar 2014 20:20:59 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1396011112-23559-1-git-send-email-aik@ozlabs.ru> <1396011112-23559-3-git-send-email-aik@ozlabs.ru> <5338D93A.5010001@ozlabs.ru> In-Reply-To: <5338D93A.5010001@ozlabs.ru> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 2/5] target-i386: Implement nmi() callback List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy , qemu-devel@nongnu.org Cc: Paolo Bonzini , qemu-ppc@nongnu.org, Alexander Graf , Thomas Huth On 03/30/2014 07:55 PM, Alexey Kardashevskiy wrote: > On 03/28/2014 11:51 PM, Alexey Kardashevskiy wrote: >> Signed-off-by: Alexey Kardashevskiy >> --- >> target-i386/cpu.c | 14 ++++++++++++++ >> 1 file changed, 14 insertions(+) >> >> diff --git a/target-i386/cpu.c b/target-i386/cpu.c >> index 8fd1497..35f20e0 100644 >> --- a/target-i386/cpu.c >> +++ b/target-i386/cpu.c >> @@ -2489,6 +2489,19 @@ static void x86_cpu_reset(CPUState *s) >> #endif >> } >> >> +static int x86_cpu_nmi(CPUState *cs) >> +{ >> + X86CPU *cpu = X86_CPU(cs); >> + >> + if (!cpu->apic_state) { >> + cpu_interrupt(cs, CPU_INTERRUPT_NMI); >> + } else { >> + apic_deliver_nmi(cpu->apic_state); > > This symbols is undefined for (i386|x86_64)-linux-user. > > What would be the right fix here? #ifndef CONFIG_USER_ONLY here or empty > stub for apic_deliver_nmi() in include/hw/i386/apic.h? Thanks. The ifndef is the normal solution. r~