From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XowLg-0008Jn-TN for qemu-devel@nongnu.org; Thu, 13 Nov 2014 10:30:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XowLc-0004YC-38 for qemu-devel@nongnu.org; Thu, 13 Nov 2014 10:30:16 -0500 Received: from mail-ie0-f174.google.com ([209.85.223.174]:63308) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XowLb-0004Y0-Us for qemu-devel@nongnu.org; Thu, 13 Nov 2014 10:30:12 -0500 Received: by mail-ie0-f174.google.com with SMTP id x19so15894001ier.33 for ; Thu, 13 Nov 2014 07:30:11 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <5006DF1F5103294E8DA02CC4C71B1BF8085C0D7F@SESTOEX04.enea.se> References: <5006DF1F5103294E8DA02CC4C71B1BF8085C08B4@SESTOEX04.enea.se> <5006DF1F5103294E8DA02CC4C71B1BF8085C0D7F@SESTOEX04.enea.se> Date: Thu, 13 Nov 2014 16:30:10 +0100 Message-ID: From: Christoffer Dall Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] qemu arm gic assert failed. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Johan Karlsson Cc: "qemu-devel@nongnu.org" On Thu, Nov 13, 2014 at 4:25 PM, Johan Karlsson wrote: >> -----Original Message----- >> From: Christoffer Dall [mailto:christoffer.dall@linaro.org] >> Sent: den 13 november 2014 15:28 >> On Thu, Nov 13, 2014 at 1:44 PM, Johan Karlsson >> wrote: >> > Hi, >> > Enabled DEBUG_GIC in arm_gic.c >> > >> > Use case: >> > Core0 wakes up core1 using irq and then core1 acks and runs eoi until it >> gets 0x3ff. >> > Note that core1 do not have interrupts enabled and does this in SVC. >> > >> > From what I can see s->current_pending[1] isn't updated in gic_update >> because the following >> > if (!s->enabled || !s->cpu_enabled[cpu]) { >> > qemu_irq_lower(s->parent_irq[cpu]); >> > return; >> > } >> > Is true for core0 after the first ack from core1 causing gic_update to return >> before updating core1. >> > >> It was recently discussed on a previous thread that this is a bug in the QEMU, >> the return statement above should be a 'continue;' >> >> Does that solve your issue? >> >> -Christoffer > > Yes I tried that and it works, however I didn't analyse if it was correct or not. as far as I can tell, it is correct. > But it didn't feel right to return from a function that loops over all cores based on a state of one core. > Exactly, care to send a patch to qemu-devel? -Christoffer