Received: from eggs.gnu.org ([2001:4830:134:3::10]:59518) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIHP8-0005sI-4U for qemu-devel@nongnu.org; Mon, 02 Feb 2015 08:51:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIHP2-0004iX-Le for qemu-devel@nongnu.org; Mon, 02 Feb 2015 08:51:05 -0500 Received: from mail.ispras.ru ([83.149.199.45]:48217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIHP2-0004hw-E1 for qemu-devel@nongnu.org; Mon, 02 Feb 2015 08:51:00 -0500 From: "Pavel Dovgaluk" References: <20150122085127.5276.53895.stgit@PASHA-ISP.def.inno> <20150122085221.5276.24836.stgit@PASHA-ISP.def.inno> <54CA00FE.3000605@redhat.com> In-Reply-To: <54CA00FE.3000605@redhat.com> Date: Mon, 2 Feb 2015 16:50:58 +0300 Message-ID: <001a01d03eef$46059060$d210b120$@Dovgaluk@ispras.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 v8 09/21] replay: interrupts and exceptions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'Paolo Bonzini' , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, alex.bennee@linaro.org, mark.burton@greensocs.com, real@ispras.ru, batuzovk@ispras.ru, maria.klimushenkova@ispras.ru, afaerber@suse.de, fred.konrad@greensocs.com > From: Paolo Bonzini [mailto:pbonzini@redhat.com] > On 22/01/2015 09:52, Pavel Dovgalyuk wrote: > > + if (replay_mode =3D=3D REPLAY_MODE_RECORD) { > > + replay_save_instructions(); > > + replay_put_event(EVENT_EXCEPTION); > > + return true; >=20 > Missing mutex lock/unlock. I think not. We just have to write number of already executed = instructions. This number is not linked to exception event. They could be read in = replay while processing some other event. =20 > > @@ -1294,6 +1295,9 @@ bool x86_cpu_exec_interrupt(CPUState *cs, int = interrupt_request) > > if (interrupt_request & CPU_INTERRUPT_POLL) { > > cs->interrupt_request &=3D ~CPU_INTERRUPT_POLL; > > apic_poll_irq(cpu->apic_state); > > + if (replay_mode !=3D REPLAY_MODE_NONE) { > > + return true; > > + } > > } > > #endif >=20 > Can you explain this? It probably needs a comment. Each function call should process one interrupt at once, because it = corresponds to single event in the log. Pavel Dovgalyuk