From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eo4VK-0005Js-3i for qemu-devel@nongnu.org; Tue, 20 Feb 2018 04:46:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eo4VG-0002bz-19 for qemu-devel@nongnu.org; Tue, 20 Feb 2018 04:46:30 -0500 Received: from mail.ispras.ru ([83.149.199.45]:57492) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eo4VF-0002bG-KR for qemu-devel@nongnu.org; Tue, 20 Feb 2018 04:46:25 -0500 From: "Pavel Dovgalyuk" References: <20180207120353.5389.54531.stgit@pasha-VirtualBox> <002401d3a010$8d551280$a7ff3780$@ru> <001b01d3a3c5$032e09f0$098a1dd0$@ru> <000c01d3a496$fd2bc470$f7834d50$@ru> <001a01d3a4b1$273f1a90$75bd4fb0$@ru> <002201d3a4b5$2a642b80$7f2c8280$@ru> <000d01d3a590$caa17950$5fe46bf0$@ru> <001201d3a957$f85ed610$e91c8230$@ru> In-Reply-To: Date: Tue, 20 Feb 2018 12:46:25 +0300 Message-ID: <001801d3aa2f$ac7b4160$0571c420$@ru> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Language: ru Subject: Re: [Qemu-devel] [RFC PATCH v6 00/20] replay additions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'Ciro Santilli' Cc: 'Peter Maydell' , richard.henderson@linaro.org, cota@braap.org, 'Pavel Dovgalyuk' , 'QEMU Developers' , 'Kevin Wolf' , war2jordan@live.com, 'Igor R' , 'Juan Quintela' , 'Jason Wang' , "'Michael S. Tsirkin'" , 'Aleksandr Bezzubikov' , maria.klimushenkova@ispras.ru, 'Gerd Hoffmann' , 'Thomas Dullien' , 'Paolo Bonzini' , =?utf-8?Q?'Alex_Benn=C3=A9e'?= > From: Ciro Santilli [mailto:ciro.santilli@gmail.com] > On Mon, Feb 19, 2018 at 8:02 AM, Pavel Dovgalyuk = wrote: > >> From: Pavel Dovgalyuk [mailto:dovgaluk@ispras.ru] > >> > From: Peter Maydell [mailto:peter.maydell@linaro.org] > >> > On 13 February 2018 at 10:26, Pavel Dovgalyuk = wrote: > >> > > Then I added SCSI adapter with the option =E2=80=93device = lsi,id=3Dscsi0 and QEMU > >> > > failed with the following error: > >> > > > >> > > qemu: fatal: IO on conditional branch instruction > >> > > >> > > Seems, that your kernel is incomatible with QEMU, which ARM = emulation is not > >> > > good enough. > >> > > >> > It seems fairly unlikely to me that the Linux driver for this > >> > SCSI adaptor is using weirdo self-modifying code of the kind > >> > that would trip up that cpu_abort(). I would suggest a bit > >> > more investigation into what's actually happening... > >> > >> Peter, I bisected this bug and figured out the following. > >> > >> icount in ARM was broken by the following commit: = 9b990ee5a3cc6aa38f81266fb0c6ef37a36c45b9 > >> tcg: Add CPUState cflags_next_tb > >> This commit breaks execution of Ciro's kernel with enabled icount. > >> I haven't yet figured out why this happens. > > > > The problem is in the following code. > > As far, as I can understand, original version recompiles the TB and > > continues the execution as it goes. > > > > But the modified version sets cflags for the next compilation. > > And these are the flags for the old TB which should replace the = original one. > > TCG tries to use cflags for the new TB (which starts after the = interrupted one) > > and fails, because these flags are inappropriate. > > That is why icount execution fails. > > > > New version also does not include recompilation of the old block, = which is wrong too. > > >=20 > Awesome! Can you push it to a branch, and give the full qemu command > line so I can test it? Updated the branch on github. You may try it. Pavel Dovgalyuk