From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f3iim-0001Zg-IU for qemu-devel@nongnu.org; Wed, 04 Apr 2018 09:45:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f3iih-0005Gr-Uf for qemu-devel@nongnu.org; Wed, 04 Apr 2018 09:45:04 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:38598) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f3iih-0005GP-Mw for qemu-devel@nongnu.org; Wed, 04 Apr 2018 09:44:59 -0400 Received: by mail-wm0-x242.google.com with SMTP id i3so18905986wmf.3 for ; Wed, 04 Apr 2018 06:44:59 -0700 (PDT) References: <1519324303-5674-1-git-send-email-aleksandar.markovic@rt-rk.com> <1519324303-5674-4-git-send-email-aleksandar.markovic@rt-rk.com> <87tvsrclsh.fsf@linaro.org> <6b04fe74-2a84-63d8-5519-fd2fdfe3f4a3@redhat.com> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <6b04fe74-2a84-63d8-5519-fd2fdfe3f4a3@redhat.com> Date: Wed, 04 Apr 2018 14:44:57 +0100 Message-ID: <87bmezcch2.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 3/6] hw/mips_int: hold BQL for all interrupt requests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, Aurelien Jarno , Fam Zheng , Gerd Hoffmann , Laurent Vivier , Peter Maydell , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , Richard Henderson , Riku Voipio , Yongbok Kim , Aleksandar Markovic , Goran Ferenc , Miodrag Dinic , Petar Jovanovic , Raghu Gandham Paolo Bonzini writes: > On 04/04/2018 12:23, Alex Benn=C3=A9e wrote: >> >>> From: Aleksandar Markovic >>> >>> Make sure BQL is held for all interrupt requests. >>> >>> For MTTCG-enabled configurations, handling soft and hard interrupts >>> between vCPUs must be properly locked. By acquiring BQL, make sure >>> all paths triggering an IRQ are synchronized. >>> >>> Signed-off-by: Miodrag Dinic >>> Signed-off-by: Aleksandar Markovic > > Is this actually necessary? What paths are not taking the lock? Helpers functions have to manually take the lock. AIUI from this patch the if (locked) dance allows a single function to be used which may trigger an IRQ from both helpers (no automatic locking) and hw emulation (locked by default). > > Thanks, > > Paolo -- Alex Benn=C3=A9e