Received: from eggs.gnu.org ([2001:4830:134:3::10]:44781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuGMK-0004MC-JM for qemu-devel@nongnu.org; Fri, 28 Nov 2014 02:53:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XuGMD-0000cb-3c for qemu-devel@nongnu.org; Fri, 28 Nov 2014 02:52:56 -0500 Received: from mail.ispras.ru ([83.149.199.45]:51109) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuGMC-0000cX-SO for qemu-devel@nongnu.org; Fri, 28 Nov 2014 02:52:49 -0500 From: "Pavel Dovgaluk" References: <20141126103841.7772.11864.stgit@PASHA-ISP> <20141126104049.7772.3594.stgit@PASHA-ISP> <5475B3AB.1040402@redhat.com> <001301d00a22$1d21bae0$576530a0$@Dovgaluk@ispras.ru> <5477570C.70607@redhat.com> In-Reply-To: <5477570C.70607@redhat.com> Date: Fri, 28 Nov 2014 10:52:53 +0300 Message-ID: <002701d00ae0$50e7e070$f2b7a150$@Dovgaluk@ispras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Content-Language: ru Subject: Re: [Qemu-devel] [RFC PATCH v5 22/31] timer: introduce new QEMU_CLOCK_VIRTUAL_RT clock 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, rbilson@qnx.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 27/11/2014 10:11, Pavel Dovgaluk wrote: > > When POLL interrupt request is processed by x86_cpu_exec_interrupt function, as it were > before, > > everything is ok, because I ensure that these calls occur at the same moments in > record/replay. > > Does this partial revert work? This one is better because I can place synchronization point for replay here. Pavel Dovgalyuk > > Paolo > > diff --git a/cpu-exec.c b/cpu-exec.c > index 3913de0..c976095 100644 > --- a/cpu-exec.c > +++ b/cpu-exec.c > @@ -331,6 +331,12 @@ int cpu_exec(CPUArchState *env) > volatile bool have_tb_lock = false; > > if (cpu->halted) { > +#ifdef TARGET_I386 > + if (cpu->interrupt_request & CPU_INTERRUPT_POLL) { > + apic_poll_irq(x86_cpu->apic_state); > + cpu_reset_interrupt(cpu, CPU_INTERRUPT_POLL); > + } > +#endif > if (!cpu_has_work(cpu)) { > return EXCP_HALTED; > } > diff --git a/target-i386/cpu.c b/target-i386/cpu.c > index e9df33e..3f13dfe 100644 > --- a/target-i386/cpu.c > +++ b/target-i386/cpu.c > @@ -2912,14 +2912,8 @@ static bool x86_cpu_has_work(CPUState *cs) > X86CPU *cpu = X86_CPU(cs); > CPUX86State *env = &cpu->env; > > -#if !defined(CONFIG_USER_ONLY) > - if (cs->interrupt_request & CPU_INTERRUPT_POLL) { > - apic_poll_irq(cpu->apic_state); > - cpu_reset_interrupt(cs, CPU_INTERRUPT_POLL); > - } > -#endif > - > - return ((cs->interrupt_request & CPU_INTERRUPT_HARD) && > + return ((cs->interrupt_request & (CPU_INTERRUPT_HARD | > + CPU_INTERRUPT_POLL)) && > (env->eflags & IF_MASK)) || > (cs->interrupt_request & (CPU_INTERRUPT_NMI | > CPU_INTERRUPT_INIT |