From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aK7ii-0004UY-PE for qemu-devel@nongnu.org; Fri, 15 Jan 2016 11:59:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aK7ie-0001Yg-Hw for qemu-devel@nongnu.org; Fri, 15 Jan 2016 11:59:28 -0500 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:33461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aK7ie-0001Yc-3z for qemu-devel@nongnu.org; Fri, 15 Jan 2016 11:59:24 -0500 Received: by mail-wm0-x234.google.com with SMTP id f206so30882484wmf.0 for ; Fri, 15 Jan 2016 08:59:23 -0800 (PST) References: <87oacqd7v9.fsf@linaro.org> <87bn8nc5kb.fsf@linaro.org> <878u3qdhfw.fsf@linaro.org> <877fjadfv4.fsf@linaro.org> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: Date: Fri, 15 Jan 2016 16:59:21 +0000 Message-ID: <8760yudbiu.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] Status of my hacks on the MTTCG WIP branch List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: alvise rigo Cc: MTTCG Devel , Paolo Bonzini , Pranith Kumar , QEMU Developers , KONRAD Frederic alvise rigo writes: > On Fri, Jan 15, 2016 at 4:25 PM, Alex Bennée wrote: >> >> alvise rigo writes: >> >>> On Fri, Jan 15, 2016 at 3:51 PM, Alex Bennée wrote: >>>> >>>> alvise rigo writes: >>>> >>>>> This problem could be related to a missing multi-threaded aware >>>>> translation of the atomic instructions. >>>>> I'm working on this missing piece, probably the next week I will >>>>> publish something. >>>> >>>> Maybe. We still have Fred's: >>>> >>>> Use atomic cmpxchg to atomically check the exclusive value in a STREX >>>> >>>> Which I think papers over the cracks for both arm and aarch64 in MTTCG >>>> while not being as correct as your work. >>> >>> Keep in mind that Linux on arm64 uses the LDXP/STXP instructions that >>> exist solely in aarch64. >>> These instructions are purely emulated now and can potentially write >>> 128 bits of data in a non-atomic fashion. >> >> Sure, but I doubt they are the reason for this hang as the kernel >> doesn't use them. > > The kernel does use them for __cmpxchg_double in > arch/arm64/include/asm/atomic_ll_sc.h. I take it back, if I'd have grepped for "ldxp" instead of "stxp" I would have seen it, sorry about that ;-) > In any case, the normal exclusive instructions are also emulated in > target-arm/translate-a64.c. I'll check on them on Monday. I'd assumed all the stuff was in the helpers as I scanned through and missed the translate.c changes Fred made. Hopefully that will be the last hurdle. In the meantime if I'm not booting Jessie I can get MTTCG aarch64 working with a initrd based rootfs. Once I've gone through those I'm planning on giving it a good stress test with -fsantize=threads. > > alvise > >> >>> >>> Regards, >>> alvise >>> >>>> >>>>> >>>>> Regards, >>>>> alvise >>>>> >>>>> On Fri, Jan 15, 2016 at 3:24 PM, Pranith Kumar wrote: >>>>>> Hi Alex, >>>>>> >>>>>> On Fri, Jan 15, 2016 at 8:53 AM, Alex Bennée wrote: >>>>>>> Can you try this branch: >>>>>>> >>>>>>> >>>>>>> https://github.com/stsquad/qemu/tree/mttcg/multi_tcg_v8_wip_ajb_fix_locks-r1 >>>>>>> >>>>>>> I think I've caught all the things likely to screw up addressing. >>>>>>> >>>>>> >>>>>> I tried this branch and the boot hangs like follows: >>>>>> >>>>>> [ 2.001083] random: systemd-udevd urandom read with 1 bits of entropy >>>>>> available >>>>>> main-loop: WARNING: I/O thread spun for 1000 iterations >>>>>> [ 23.778970] INFO: rcu_sched detected stalls on CPUs/tasks: {} (detected >>>>>> by 0, t=2102 jiffies, g=-165, c=-166, q=83) >>>> >>>> This is just saying the kernel has been waiting for a while and nothing >>>> has happened. >>>> >>>>>> I will try to debug and see where it is hanging. >>>> >>>> If we knew what the kernel was waiting for that would be useful to know. >>>> >>>>>> >>>>>> Thanks! >>>>>> -- >>>>>> Pranith >>>> >>>> >>>> -- >>>> Alex Bennée >> >> >> -- >> Alex Bennée -- Alex Bennée