From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin O'Connor Subject: Re: [Qemu-devel] E5-2620v2 - emulation stop error Date: Wed, 11 Mar 2015 11:42:20 -0400 Message-ID: <20150311154220.GA26463@morn.localdomain> References: <20150310165755.GL2338@work-vm> <54FF337A.1010202@redhat.com> <54FF4541.9080608@redhat.com> <20150310202958.GR2338@work-vm> <20150311134556.GH2334@work-vm> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Bandan Das , Paolo Bonzini , kraxel@redhat.com, Andrey Korolyov , "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" To: "Dr. David Alan Gilbert" Return-path: Received: from mail-qc0-f178.google.com ([209.85.216.178]:38843 "EHLO mail-qc0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753258AbbCKPmX (ORCPT ); Wed, 11 Mar 2015 11:42:23 -0400 Received: by qcvp6 with SMTP id p6so11170427qcv.5 for ; Wed, 11 Mar 2015 08:42:23 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20150311134556.GH2334@work-vm> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Mar 11, 2015 at 01:45:57PM +0000, Dr. David Alan Gilbert wrote: > * Bandan Das (bsd@redhat.com) wrote: > > "Dr. David Alan Gilbert" writes: > > > while true; do (sleep 5; echo -e '\001cq\n')|/opt/qemu-try-world3/bin/qemu-system-x86_64 -machine pc-i440fx-2.0,accel=kvm -m 1024 -smp 128 -nographic -device sga 2>&1 | tee /tmp/qemu.op; grep "internal error" /tmp/qemu.op -q && break; done > > > [...] > > > [root@virtlab413 qemu-world3]# git bisect bad > > > 21f5826a04d38e19488f917e1eef22751490c769 is the first bad commit > > > > I can reproduce this on E5-2620 v2 with David's "while true" test. > > (The emulation failure I mean, not the suberror 2 that Andrey is seeing) > > The commit that seems to have introduced this is - > > > > commit 0673b7870063a3affbad9046fb6d385a4e734c19 > > Author: Kevin O'Connor > > Date: Sat May 24 10:49:50 2014 -0400 > > > > smp: Replace QEMU SMP init assembler code with C; run only in 32bit mode. [...] > Turning on debug logging > ( -chardev file,id=log,path=/tmp/debugcon.$$ -device isa-debugcon,chardev=log,iobase=0x402 ) > > SeaBIOS (version rel-1.8.0-0-g4c59f5d-20150219_092859-nilsson.home.kraxel.org) [...] > Found 1 cpu(s) max supported 128 cpu(s) Something is very odd here. When I run the above command (on an older AMD machine) I get: Found 128 cpu(s) max supported 128 cpu(s) That first value (1 vs 128) comes from QEMU (via cmos index 0x5f). That is, during smp init, SeaBIOS expects QEMU to tell it how many cpus are active, and SeaBIOS waits until that many CPUs check in from its SIPI request before proceeding. I wonder if QEMU reported only 1 active cpu via that cmos register, but more were actually active. If that was the case, it could certainly explain the failure - as multiple cpus could be running without the sipi trapoline in place. What does the log look like on a non-failure case? -Kevin From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59824) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVimC-0005jv-GA for qemu-devel@nongnu.org; Wed, 11 Mar 2015 11:42:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVim8-0002q0-D0 for qemu-devel@nongnu.org; Wed, 11 Mar 2015 11:42:28 -0400 Received: from mail-qg0-f50.google.com ([209.85.192.50]:45518) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVim8-0002pZ-8d for qemu-devel@nongnu.org; Wed, 11 Mar 2015 11:42:24 -0400 Received: by qgaj5 with SMTP id j5so10892674qga.12 for ; Wed, 11 Mar 2015 08:42:23 -0700 (PDT) Date: Wed, 11 Mar 2015 11:42:20 -0400 From: Kevin O'Connor Message-ID: <20150311154220.GA26463@morn.localdomain> References: <20150310165755.GL2338@work-vm> <54FF337A.1010202@redhat.com> <54FF4541.9080608@redhat.com> <20150310202958.GR2338@work-vm> <20150311134556.GH2334@work-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150311134556.GH2334@work-vm> Subject: Re: [Qemu-devel] E5-2620v2 - emulation stop error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert" Cc: Andrey Korolyov , "kvm@vger.kernel.org" , "qemu-devel@nongnu.org" , Bandan Das , kraxel@redhat.com, Paolo Bonzini On Wed, Mar 11, 2015 at 01:45:57PM +0000, Dr. David Alan Gilbert wrote: > * Bandan Das (bsd@redhat.com) wrote: > > "Dr. David Alan Gilbert" writes: > > > while true; do (sleep 5; echo -e '\001cq\n')|/opt/qemu-try-world3/bin/qemu-system-x86_64 -machine pc-i440fx-2.0,accel=kvm -m 1024 -smp 128 -nographic -device sga 2>&1 | tee /tmp/qemu.op; grep "internal error" /tmp/qemu.op -q && break; done > > > [...] > > > [root@virtlab413 qemu-world3]# git bisect bad > > > 21f5826a04d38e19488f917e1eef22751490c769 is the first bad commit > > > > I can reproduce this on E5-2620 v2 with David's "while true" test. > > (The emulation failure I mean, not the suberror 2 that Andrey is seeing) > > The commit that seems to have introduced this is - > > > > commit 0673b7870063a3affbad9046fb6d385a4e734c19 > > Author: Kevin O'Connor > > Date: Sat May 24 10:49:50 2014 -0400 > > > > smp: Replace QEMU SMP init assembler code with C; run only in 32bit mode. [...] > Turning on debug logging > ( -chardev file,id=log,path=/tmp/debugcon.$$ -device isa-debugcon,chardev=log,iobase=0x402 ) > > SeaBIOS (version rel-1.8.0-0-g4c59f5d-20150219_092859-nilsson.home.kraxel.org) [...] > Found 1 cpu(s) max supported 128 cpu(s) Something is very odd here. When I run the above command (on an older AMD machine) I get: Found 128 cpu(s) max supported 128 cpu(s) That first value (1 vs 128) comes from QEMU (via cmos index 0x5f). That is, during smp init, SeaBIOS expects QEMU to tell it how many cpus are active, and SeaBIOS waits until that many CPUs check in from its SIPI request before proceeding. I wonder if QEMU reported only 1 active cpu via that cmos register, but more were actually active. If that was the case, it could certainly explain the failure - as multiple cpus could be running without the sipi trapoline in place. What does the log look like on a non-failure case? -Kevin