Re: [Qemu-devel] [PULL 00/18] Record/replay core for 2.5-rc1

2015-11-05 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 05/11/2015 15:00, Peter Maydell wrote: > > On 5 November 2015 at 12:13, Paolo Bonzini wrote: > >> The following changes since commit > >> 6c5f30cad290c745f910481d0e890b3f4fad1f00: > >> > >> Merge remote-tracking branch > >> 'remotes/juanq

Re: [Qemu-devel] [RFH PATCH 0/4] record/replay fixups and doubts

2015-10-23 Thread Pavel Dovgaluk
Hi, Paolo! Will you pull these patches into 2.5? Pavel Dovgalyuk > -Original Message- > From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > Sent: Tuesday, October 06, 2015 11:01 PM > To: qemu-devel@nongnu.org > Cc: pavel.dovga...@ispras.ru > Subject: [RFH

Re: [Qemu-devel] [RFH PATCH 0/4] record/replay fixups and doubts

2015-10-13 Thread Pavel Dovgaluk
There is one more fix. Sometimes replay cannot continue after stopping/restarting of the virtual machine. This happens because warp on stopped machine and on running machine behaves differently. Timers deadline calculation depends on enabled flag of the virtual timer. The following patch fixes th

Re: [Qemu-devel] [PATCH 4/4] events doubts

2015-10-07 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > On 07/10/2015 10:21, Pavel Dovgaluk wrote: > > There are two kinds of events: > > - read from the log and injected immediately (user input, network input) > > - read from the log and w

Re: [Qemu-devel] [PATCH 4/4] events doubts

2015-10-07 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 07/10/2015 12:42, Pavel Dovgaluk wrote: > >> > Ok, got it. I still want to understand exactly the need for the init > >> > and reset checkpoints, and the placement of qemu_clock_warp calls, but > >> &g

Re: [Qemu-devel] [PATCH 4/4] events doubts

2015-10-07 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 07/10/2015 11:50, Pavel Dovgaluk wrote: > >> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > >> Bonzini > >> On 07/10/2015 10:21, Pavel Dovgaluk wrote: > >>> There are t

Re: [Qemu-devel] [PATCH 3/4] why is runstate_is_running needed?

2015-10-07 Thread Pavel Dovgaluk
I checked this patch. Let's leave it without runstate_is_running() call. If it will be needed later, we'll find it out. Pavel Dovgalyuk > -Original Message- > From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > Sent: Tuesday, October 06, 2015 11:01 PM > T

Re: [Qemu-devel] [PATCH 4/4] events doubts

2015-10-07 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > > It is not clear what separates REPLAY_ASYNC_EVENT_BH from other async > events. It seems to be an ordering issue, but then why do input events > not have to be looked up in the queue? It would be much simple

Re: [Qemu-devel] [PATCH 3/4] why is runstate_is_running needed?

2015-10-07 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > Sent: Tuesday, October 06, 2015 11:01 PM > To: qemu-devel@nongnu.org > Cc: pavel.dovga...@ispras.ru > Subject: [PATCH 3/4] why is runstate_is_running needed? > > It doesn't seem correct to call it for all checkp

Re: [Qemu-devel] [PATCH 2/4] more replay fixes

2015-10-07 Thread Pavel Dovgaluk
This one is ok too. Pavel Dovgalyuk > -Original Message- > From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > Sent: Tuesday, October 06, 2015 11:01 PM > To: qemu-devel@nongnu.org > Cc: pavel.dovga...@ispras.ru > Subject: [PATCH 2/4] more replay fixes >

Re: [Qemu-devel] [PATCH 1/4] replay: generalize ptimer event to bottom halves

2015-10-07 Thread Pavel Dovgaluk
This one is ok. Pavel Dovgalyuk > -Original Message- > From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > Sent: Tuesday, October 06, 2015 11:01 PM > To: qemu-devel@nongnu.org > Cc: pavel.dovga...@ispras.ru > Subject: [PATCH 1/4] replay: generalize ptimer

Re: [Qemu-devel] [PULL 50/52] typedef: add typedef for QemuOpts

2015-09-27 Thread Pavel Dovgaluk
Thank you! What about other patches from rr series? Pavel Dovgalyuk > -Original Message- > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Friday, September 25, 2015 7:52 PM > To: qemu-devel@nongnu.org > Cc: Pavel Dovgalyuk; Pavel Dovgalyuk > Subject: [PULL 50/52] typedef: add t

Re: [Qemu-devel] [PATCH v18 13/21] icount: improve counting for record/replay

2015-09-23 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > On 23/09/2015 09:22, Pavel Dovgaluk wrote: > > Sometimes tcg thread halts in qemu_tcg_wait_io_event function, > > waiting for any external event. Virtual clock does not run, because > &g

Re: [Qemu-devel] [PATCH v18 13/21] icount: improve counting for record/replay

2015-09-23 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 17/09/2015 18:24, Pavel Dovgalyuk wrote: > > #endif > > > > +/* CPU thread can infinitely wait for event after > > + missing the warp */ > > +qemu_clock_warp(QEMU_CLOCK_VIRTUAL); > > qemu_clock_run_all_timers(); > > It is

Re: [Qemu-devel] [PATCH v18 11/21] replay: recording and replaying clock ticks

2015-09-23 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 17/09/2015 18:24, Pavel Dovgalyuk wrote: > > +if ((now < last || now > (last + get_max_clock_jump())) > > +&& replay_mode == REPLAY_MODE_NONE) { > > notifier_list_notify(&clock->reset_notifiers, &now); > > Thi

Re: [Qemu-devel] [PATCH v18 00/21] Deterministic replay core

2015-09-21 Thread Pavel Dovgaluk
Hi! Paolo, have you reviewed these patches? Pavel Dovgalyuk > -Original Message- > From: Pavel Dovgalyuk [mailto:pavel.dovga...@ispras.ru] > Sent: Thursday, September 17, 2015 7:23 PM > To: qemu-devel@nongnu.org > Cc: edgar.igles...@xilinx.com; peter.mayd...@linaro.org; > igor.rubi...@g

Re: [Qemu-devel] [PATCH v7 04/11] target-mips: improve exception handling

2015-09-16 Thread Pavel Dovgaluk
> From: Leon Alrae [mailto:leon.al...@imgtec.com] > On 28/08/2015 10:08, Pavel Dovgaluk wrote: > >> From: Aurelien Jarno [mailto:aurel...@aurel32.net] > >> On 2015-08-13 14:12, Leon Alrae wrote: > >>> On 10/07/2015 10:57, Pavel Dovgalyuk wrote: > &

Re: [Qemu-devel] [PATCH v17 00/21] Deterministic replay core

2015-09-10 Thread Pavel Dovgaluk
Paolo, Are these patches good enough? Pavel Dovgalyuk > -Original Message- > From: Pavel Dovgalyuk [mailto:pavel.dovga...@ispras.ru] > Sent: Monday, September 07, 2015 11:40 AM > To: qemu-devel@nongnu.org > Cc: edgar.igles...@xilinx.com; peter.mayd...@linaro.org; > igor.rubi...@gmail.co

Re: [Qemu-devel] [PATCH v7 04/11] target-mips: improve exception handling

2015-08-28 Thread Pavel Dovgaluk
> From: Aurelien Jarno [mailto:aurel...@aurel32.net] > On 2015-08-13 14:12, Leon Alrae wrote: > > On 10/07/2015 10:57, Pavel Dovgalyuk wrote: > > > @@ -2364,14 +2363,12 @@ static void gen_st_cond (DisasContext *ctx, > > > uint32_t opc, int rt, > > > #if defined(TARGET_MIPS64) > > > case OPC_

Re: [Qemu-devel] [PATCH v16 00/21] Deterministic replay core

2015-08-27 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > unfortunately I do have some more review comments; that can happen when > going back to the code after a few months, and it's also a good thing > because it means that the code _is_ actually getting cleaner. Tha

Re: [Qemu-devel] [PATCH v6 09/10] target-i386: exception handling for other helper functions

2015-07-08 Thread Pavel Dovgaluk
> From: Richard Henderson [mailto:rth7...@gmail.com] On Behalf Of Richard > Henderson > On 07/07/2015 02:31 PM, Pavel Dovgalyuk wrote: > > diff --git a/target-i386/misc_helper.c b/target-i386/misc_helper.c > > index 52c5d65..c8e7ee9 100644 > > --- a/target-i386/misc_helper.c > > +++ b/target-i386/

Re: [Qemu-devel] [PATCH v5 08/11] target-i386: exception handling for seg_helper functions

2015-07-07 Thread Pavel Dovgaluk
> From: Richard Henderson [mailto:rth7...@gmail.com] On Behalf Of Richard > Henderson > On 07/06/2015 09:26 AM, Pavel Dovgalyuk wrote: > > This patch fixes exception handling for seg_helper functions. > > > > Signed-off-by: Pavel Dovgalyuk > > > No, you don't want to discriminately change every

Re: [Qemu-devel] [PATCH v5 05/11] target-i386: exception handling for FPU instructions

2015-07-06 Thread Pavel Dovgaluk
> From: Richard Henderson [mailto:rth7...@gmail.com] On Behalf Of Richard > Henderson > On 07/06/2015 09:26 AM, Pavel Dovgalyuk wrote: > > @@ -1117,33 +1131,33 @@ void helper_fxsave(CPUX86State *env, target_ulong > > ptr, int data64) > > for (i = 0; i < 8; i++) { > > fptag |= (env

Re: [Qemu-devel] [PATCH v5 08/11] target-i386: exception handling for seg_helper functions

2015-07-06 Thread Pavel Dovgaluk
> From: Richard Henderson [mailto:rth7...@gmail.com] On Behalf Of Richard > Henderson > On 07/06/2015 09:26 AM, Pavel Dovgalyuk wrote: > > This patch fixes exception handling for seg_helper functions. > > > > Signed-off-by: Pavel Dovgalyuk > > > No, you don't want to discriminately change every

Re: [Qemu-devel] [PATCH v15 00/21] Deterministic replay core

2015-07-06 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 06/07/2015 13:54, Pavel Dovgaluk wrote: > > Paolo, > > > > Are there any chances for upstreaming these patches? > > I'm sorry. It looks like no one really feels competent enough. What > about committi

Re: [Qemu-devel] [PATCH v15 00/21] Deterministic replay core

2015-07-06 Thread Pavel Dovgaluk
Paolo, Are there any chances for upstreaming these patches? Pavel Dovgalyuk > -Original Message- > From: Pavel Dovgalyuk [mailto:pavel.dovga...@ispras.ru] > Sent: Wednesday, July 01, 2015 2:52 PM > To: qemu-devel@nongnu.org > Cc: peter.mayd...@linaro.org; peter.crosthwa...@xilinx.com; >

Re: [Qemu-devel] [PATCH v4 4/5] target-i386: fix memory operations in helpers

2015-07-01 Thread Pavel Dovgaluk
> From: Richard Henderson [mailto:rth7...@gmail.com] On Behalf Of Richard > Henderson > On 06/29/2015 08:23 AM, Pavel Dovgalyuk wrote: > > This patch passes TB return address into softmmu functions that are > > invoked from target helpers. This allows correct PC and icount recovering > > while han

Re: [Qemu-devel] [PATCH v4 0/5] Fix exceptions handling for MIPS and i386

2015-06-29 Thread Pavel Dovgaluk
Forgot to fix the subject. These patches also fix exceptions handling for PowerPC. Pavel Dovgalyuk > -Original Message- > From: Pavel Dovgalyuk [mailto:pavel.dovga...@ispras.ru] > Sent: Monday, June 29, 2015 10:23 AM > To: qemu-devel@nongnu.org > Cc: rth7...@gmail.com; ag...@suse.de; pav

Re: [Qemu-devel] [PATCH v3 2/3] target-mips: improve exceptions handling

2015-06-28 Thread Pavel Dovgaluk
> From: Aurelien Jarno [mailto:aurel...@aurel32.net] > On 2015-06-18 16:28, Pavel Dovgalyuk wrote: > > This patch improves exception handling in MIPS. > > Instructions generate several types of exceptions. > > When exception is generated, it breaks the execution of the current > > translation > >

Re: [Qemu-devel] [PATCH v3 1/3] softmmu: add helper function to pass through retaddr

2015-06-25 Thread Pavel Dovgaluk
> From: Aurelien Jarno [mailto:aurel...@aurel32.net] > On 2015-06-18 16:28, Pavel Dovgalyuk wrote: > > This patch introduces several helpers to pass return address > > which points to the TB. Correct return address allows correct > > restoring of the guest PC and icount. These functions should be u

Re: [Qemu-devel] [RFC v2 07/34] exec-all: Move cpu_can_do_io to qom/cpu.h

2015-06-24 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 24/06/2015 13:40, Pavel Dovgaluk wrote: > >>> > > +/* If not executing code then assume we are ok. */ > >>> > > +if (cpu->current_tb == NULL) { > >>> > > +ret

Re: [Qemu-devel] [RFC v2 07/34] exec-all: Move cpu_can_do_io to qom/cpu.h

2015-06-24 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > On 31/05/2015 08:11, Peter Crosthwaite wrote: > > +/* If not executing code then assume we are ok. */ > > +if (cpu->current_tb == NULL) { > > +return true; > > +} > > +return cpu->can_do_

Re: [Qemu-devel] [PATCH v2 0/3] Fix exceptions handling for MIPS and i386

2015-06-18 Thread Pavel Dovgaluk
> From: Aurelien Jarno [mailto:aurel...@aurel32.net] > On 2015-06-18 12:02, Paolo Bonzini wrote: > > > > TCG can then use them to fill in an array stored inside the > > TranslationBlock, together with the host PC. Since the gen_opc_pc, > > gen_opc_instr_start, gen_opc_icount arrays are inside tcg_

Re: [Qemu-devel] [PATCH v2 1/3] softmmu: add helper function to pass through retaddr

2015-06-18 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 18/06/2015 11:24, Pavel Dovgaluk wrote: > >>> > > +uint16_t helper_call_ldw_cmmu(CPUArchState *env, target_ulong addr, > >>> > > + int mmu_idx, uintptr_t retaddr); > &

Re: [Qemu-devel] [PATCH v2 1/3] softmmu: add helper function to pass through retaddr

2015-06-18 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 17/06/2015 14:42, Pavel Dovgalyuk wrote: > > This patch introduces several helpers to pass return address > > which points to the TB. Correct return address allows correct > > restoring of the guest PC and icount. These functions should be use

Re: [Qemu-devel] [PATCH v2 0/3] Fix exceptions handling for MIPS and i386

2015-06-18 Thread Pavel Dovgaluk
> From: Aurelien Jarno [mailto:aurel...@aurel32.net] > On 2015-06-18 10:12, Pavel Dovgaluk wrote: > > > From: Aurelien Jarno [mailto:aurel...@aurel32.net] > > > On 2015-06-17 15:41, Pavel Dovgalyuk wrote: > > > > In icount mode every translation block looks a

Re: [Qemu-devel] [PATCH v2 0/3] Fix exceptions handling for MIPS and i386

2015-06-18 Thread Pavel Dovgaluk
> From: Peter Maydell [mailto:peter.mayd...@linaro.org] > On 18 June 2015 at 08:12, Pavel Dovgaluk wrote: > >> From: Aurelien Jarno [mailto:aurel...@aurel32.net] > >> Looking at how icount work, I see it's basically a variable in the CPU > >> state (icount_de

Re: [Qemu-devel] [PATCH v2 0/3] Fix exceptions handling for MIPS and i386

2015-06-18 Thread Pavel Dovgaluk
> From: Aurelien Jarno [mailto:aurel...@aurel32.net] > On 2015-06-17 15:41, Pavel Dovgalyuk wrote: > > In icount mode every translation block looks as follows: > > > > if icount < n then exit > > icount -= n > > instr1 > > instr2 > > ... > > instrn > > exit > > > > When one of these instructions in

Re: [Qemu-devel] [PATCH v2 0/3] Fix exceptions handling for MIPS and i386

2015-06-17 Thread Pavel Dovgaluk
> From: Aurelien Jarno [mailto:aurel...@aurel32.net] > On 2015-06-17 15:41, Pavel Dovgalyuk wrote: > > This set of patches fixes exception handling for MIPS and i386 targets. > > These targets contain instructions that break correct execution in > > icount/TCG modes (MIPS) and in regular TCG mode (

Re: [Qemu-devel] [PATCH v2 1/3] softmmu: add helper function to pass through retaddr

2015-06-17 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 17/06/2015 14:42, Pavel Dovgalyuk wrote: > > This patch introduces several helpers to pass return address > > which points to the TB. Correct return address allows correct > > restoring of the guest PC and icount. These functions should be use

Re: [Qemu-devel] [PATCH] MIPS: exceptions handling in icount mode

2015-06-15 Thread Pavel Dovgaluk
> From: Aurelien Jarno [mailto:aurel...@aurel32.net] > On 2015-06-15 07:53, Pavel Dovgaluk wrote: > > > From: Aurelien Jarno [mailto:aurel...@aurel32.net] > > > On 2015-06-10 11:33, Pavel Dovgalyuk wrote: > > > > This patch fixes exception handling in MIPS

Re: [Qemu-devel] [PATCH] MIPS: exceptions handling in icount mode

2015-06-15 Thread Pavel Dovgaluk
> From: Aurelien Jarno [mailto:aurel...@aurel32.net] > On 2015-06-15 07:53, Pavel Dovgaluk wrote: > > > From: Aurelien Jarno [mailto:aurel...@aurel32.net] > > > On 2015-06-10 11:33, Pavel Dovgalyuk wrote: > > > > This patch fixes exception handling in MIPS

Re: [Qemu-devel] [PATCH] MIPS: exceptions handling in icount mode

2015-06-14 Thread Pavel Dovgaluk
> From: Aurelien Jarno [mailto:aurel...@aurel32.net] > On 2015-06-10 11:33, Pavel Dovgalyuk wrote: > > This patch fixes exception handling in MIPS. > > MIPS instructions generate several types of exceptions. > > When exception is generated, it breaks the execution of the current > > translation >

Re: [Qemu-devel] [PATCH v14 21/21] replay: ptimer

2015-05-25 Thread Pavel Dovgaluk
Broken description. This one is correct: replay: recording of the user input This records user input (keyboard and mouse events) in record mode and replays these input events in replay mode. Pavel Dovgalyuk > -Original Message- > From: Pavel Dovgalyuk [mailto:pavel.dovga...@ispras.ru] >

Re: [Qemu-devel] [RFC PATCH v13 00/21] Deterministic replay core

2015-05-19 Thread Pavel Dovgaluk
Ping? > -Original Message- > From: Pavel Dovgalyuk [mailto:pavel.dovga...@ispras.ru] > Sent: Wednesday, May 06, 2015 5:03 PM > To: qemu-devel@nongnu.org > Cc: peter.mayd...@linaro.org; peter.crosthwa...@xilinx.com; ebl...@redhat.com; > mark.bur...@greensocs.com; r...@ispras.ru; batuz...@is

Re: [Qemu-devel] when does a target frontend need to use gen_io_start()/gen_io_end() ?

2015-05-12 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > On 12/05/2015 17:32, Peter Maydell wrote: > > In order for -icount to work, it's important for the target > > translate.c code to correctly bracket any generated code which > > can "do I/O" with gen_io_start()/ge

Re: [Qemu-devel] [RFC PATCH v13 15/21] bottom halves: introduce bh call function

2015-05-06 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 06/05/2015 16:04, Pavel Dovgalyuk wrote: > > This patch introduces aio_bh_call function. It is used to execute > > bottom halves as callbacks without adding them to the queue. > > > > Signed-off-by: Pavel Dovgalyuk > > --- > > async.c

Re: [Qemu-devel] [RFC PATCH v12 16/21]

2015-05-06 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 05/05/2015 12:22, Pavel Dovgaluk wrote: > > This patch is the reduced version of prior "bottom halves" patch. > > dma-helpers.c is also related to block devices, so it's better not to > change it now.

Re: [Qemu-devel] [RFC PATCH v12 16/21]

2015-05-05 Thread Pavel Dovgaluk
This patch is the reduced version of prior "bottom halves" patch. Pavel Dovgalyuk > -Original Message- > From: Pavel Dovgalyuk [mailto:pavel.dovga...@ispras.ru] > Sent: Tuesday, May 05, 2015 1:19 PM > To: qemu-devel@nongnu.org > Cc: peter.mayd...@linaro.org; peter.crosthwa...@xilinx.com;

Re: [Qemu-devel] [RFC PATCH v11 00/23] Deterministic replay core

2015-05-05 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 27/04/2015 09:32, Pavel Dovgalyuk wrote: > > This set of patches is related to the reverse execution and deterministic > > replay of qemu execution. This implementation of deterministic replay can > > be used for deterministic debugging of gue

Re: [Qemu-devel] [RFC PATCH v10 18/24] replay: replay aio requests

2015-03-16 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 27/02/2015 14:11, Pavel Dovgalyuk wrote: > > This patch adds identifier to aio requests. ID is used for creating bottom > > halves and identifying them while replaying. > > The patch also introduces several functions that make possible replayi

Re: [Qemu-devel] [RFC PATCH v9 00/23] Deterministic replay core

2015-02-27 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > On 18/02/2015 12:55, Pavel Dovgalyuk wrote: > > This set of patches is related to the reverse execution and deterministic > > replay of qemu execution. This implementation of deterministic replay can > > be used

Re: [Qemu-devel] [RFC PATCH v9 22/23] replay: command line options

2015-02-20 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > On 18/02/2015 12:57, Pavel Dovgalyuk wrote: > > @@ -2751,6 +2757,7 @@ int main(int argc, char **argv, char **envp) > > { > > int i; > > int snapshot, linux_boot; > > +const char *icount_option = NU

Re: [Qemu-devel] [RFC PATCH v8 08/21] cpu: replay instructions sequence

2015-02-17 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 17/02/2015 09:43, Pavel Dovgaluk wrote: > >> > int64_t deadline = qemu_clock_deadline_ns_all(QEMU_CLOCK_VIRTUAL); > >> > if (deadline == 0) { > >> > qemu_clock_notify(QEMU_CLOCK_VIR

Re: [Qemu-devel] [RFC PATCH v8 08/21] cpu: replay instructions sequence

2015-02-17 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > On 16/02/2015 14:37, Pavel Dovgaluk wrote: > >> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > >> Bonzini > >> On 16/02/2015 14:27, Pavel Dovgal

Re: [Qemu-devel] [RFC PATCH v8 08/21] cpu: replay instructions sequence

2015-02-16 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > On 16/02/2015 14:27, Pavel Dovgaluk wrote: > >> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > >> Bonzini > >> On 16/02/2015 13:26, Pavel Dovga

Re: [Qemu-devel] [RFC PATCH v8 08/21] cpu: replay instructions sequence

2015-02-16 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > On 16/02/2015 13:26, Pavel Dovgaluk wrote: > >>> > > I think in this case there are no events at all - just reading timers > >>> > > values > >>> > &

Re: [Qemu-devel] [RFC PATCH v8 08/21] cpu: replay instructions sequence

2015-02-16 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > On 02/02/2015 13:42, Pavel Dovgaluk wrote: > >> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > >> On 02/02/2015 13:28, Pavel Dovgaluk wrote: > >>>>>>>

Re: [Qemu-devel] [RFC PATCH v8 20/21] replay: command line options

2015-02-12 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 09/02/2015 13:15, Pavel Dovgaluk wrote: > >> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > >>> break; > >>> case QEMU_OPTION_audio_help: > >>>

Re: [Qemu-devel] [RFC PATCH v8 21/21] replay: recording of the user input

2015-02-12 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > On 22/01/2015 09:53, Pavel Dovgalyuk wrote: > > +if (replay_mode != REPLAY_MODE_PLAY) { > > +evt = qemu_input_event_new_key(key, down); > > +if (QTAILQ_EMPTY(&kbd_queue)) { > > +qe

Re: [Qemu-devel] [RFC PATCH v8 21/21] replay: recording of the user input

2015-02-11 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > On 22/01/2015 09:53, Pavel Dovgalyuk wrote: > > +void replay_input_event(QemuConsole *src, InputEvent *evt) > > +{ > > +if (replay_mode == REPLAY_MODE_PLAY) { > > +/* Nothing */ > > +} else if (re

Re: [Qemu-devel] [RFC PATCH v8 16/21] replay: bottom halves

2015-02-11 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 22/01/2015 09:53, Pavel Dovgalyuk wrote: > > This patch introduces bottom half event for replay queue. It saves the > > events > > into the queue and process them at the checkpoints and instructions > > execution. > > Which bottom halves mu

Re: [Qemu-devel] [PATCH] win64: perform correct setjmp calls

2015-02-09 Thread Pavel Dovgaluk
> From: Stefan Weil [mailto:s...@weilnetz.de] > Am 09.02.2015 um 09:07 schrieb Pavel Dovgaluk: > >> From: Stefan Weil [mailto:s...@weilnetz.de] > >> Am 09.02.2015 um 08:55 schrieb Pavel Dovgalyuk: > >>> On w64, setjmp is implemented by _setjmp which needs a se

Re: [Qemu-devel] [RFC PATCH v8 19/21] replay: initialization and deinitialization

2015-02-09 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 22/01/2015 09:53, Pavel Dovgalyuk wrote: > > This patch introduces the functions for enabling the record/replay and for > > freeing the resources when simulator closes. > > > > Signed-off-by: Pavel Dovgalyuk > > > }; > > > > /* Asynchronou

Re: [Qemu-devel] [RFC PATCH v8 20/21] replay: command line options

2015-02-09 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 22/01/2015 09:53, Pavel Dovgalyuk wrote: > > This patch introduces command line options for enabling recording or > > replaying > > virtual machine behavior. "-record" option starts recording of the execution > > and saves it into the log, sp

Re: [Qemu-devel] [PATCH] win64: perform correct setjmp calls

2015-02-09 Thread Pavel Dovgaluk
> From: Stefan Weil [mailto:s...@weilnetz.de] > Am 09.02.2015 um 08:55 schrieb Pavel Dovgalyuk: > > On w64, setjmp is implemented by _setjmp which needs a second parameter. > > This parameter should be NULL to allow using longjump from generated code. > > This patch replaces all usages of setjmp.h

Re: [Qemu-devel] [RFC PATCH v8 12/21] replay: recording and replaying different timers

2015-02-03 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 22/01/2015 09:52, Pavel Dovgalyuk wrote: > > This patch introduces functions for recording and replaying realtime > > sources, > > that do not use qemu-clock interface. These include return value of time() > > function in time_t and struct tm

Re: [Qemu-devel] [RFC PATCH v8 11/21] replay: recording and replaying clock ticks

2015-02-03 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 03/02/2015 11:51, Pavel Dovgaluk wrote: > >> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > >> On 22/01/2015 09:52, Pavel Dovgalyuk wrote: > >>> Clock ticks are considered as the sources of non-determin

Re: [Qemu-devel] [RFC PATCH v8 11/21] replay: recording and replaying clock ticks

2015-02-03 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 22/01/2015 09:52, Pavel Dovgalyuk wrote: > > Clock ticks are considered as the sources of non-deterministic data for > > virtual machine. This patch implements saving the clock values when they > > are acquired (virtual, host clock, rdtsc, and

Re: [Qemu-devel] [RFC PATCH v8 00/21] Deterministic replay core

2015-02-02 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > On 22/01/2015 09:51, Pavel Dovgalyuk wrote: > > These patches include only core function of the replay, > > excluding the support for replaying serial, audio, network, and USB devices' > > operations. Reverse deb

Re: [Qemu-devel] [RFC PATCH v8 09/21] replay: interrupts and exceptions

2015-02-02 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 22/01/2015 09:52, Pavel Dovgalyuk wrote: > > +if (replay_mode == REPLAY_MODE_RECORD) { > > +replay_save_instructions(); > > +replay_put_event(EVENT_EXCEPTION); > > +return true; > > Missing mutex lock/unlock. I th

Re: [Qemu-devel] [RFC PATCH v8 08/21] cpu: replay instructions sequence

2015-02-02 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 02/02/2015 13:28, Pavel Dovgaluk wrote: > >>> > > cpu->exception_index = EXCP_INTERRUPT; > >>> > > next_tb = 0; > >&g

Re: [Qemu-devel] [RFC PATCH v8 08/21] cpu: replay instructions sequence

2015-02-02 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 22/01/2015 09:52, Pavel Dovgalyuk wrote: > > This patch adds calls to replay functions into the icount setup block. > > In record mode number of executed instructions is written to the log. > > In replay mode number of istructions to execute i

Re: [Qemu-devel] [RFC PATCH v8 04/21] replay: internal functions for replay log

2015-01-30 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 22/01/2015 09:51, Pavel Dovgalyuk wrote: > > This patch adds functions to perform read and write operations > > with replay log. > > > > Signed-off-by: Pavel Dovgalyuk > > --- > > +void replay_check_error(void) > > Could this be static? (I h

Re: [Qemu-devel] [RFC PATCH v8 00/21] Deterministic replay core

2015-01-28 Thread Pavel Dovgaluk
Ping? Pavel Dovgalyuk > -Original Message- > From: Pavel Dovgalyuk [mailto:pavel.dovga...@ispras.ru] > Sent: Thursday, January 22, 2015 11:52 AM > To: qemu-devel@nongnu.org > Cc: peter.mayd...@linaro.org; peter.crosthwa...@xilinx.com; ebl...@redhat.com; > mark.bur...@greensocs.com; r...@i

Re: [Qemu-devel] [RFC PATCH v7 15/21] replay: checkpoints

2015-01-22 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 13/01/2015 10:15, Pavel Dovgaluk wrote: > > The numbers have no meaning. They just have to be distinct in different > > places. > > This is easier to achieve if you give a name to each place. > > > Sorry,

Re: [Qemu-devel] [RFC PATCH v7 12/21] replay: recording and replaying clock ticks

2015-01-19 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 19/01/2015 14:10, Pavel Dovgaluk wrote: > >>> > > > >>> > > Because 'A' is written only inside some of the replay_run_event > >>> > > callbacks. > >>> >

Re: [Qemu-devel] [RFC PATCH v7 12/21] replay: recording and replaying clock ticks

2015-01-19 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 19/01/2015 14:01, Pavel Dovgaluk wrote: > > > It would be easier if you pointed me to actual code in the series. But > > > this doesn't seem impossible to fix by atomically writing the 'E' and

Re: [Qemu-devel] [RFC PATCH v7 12/21] replay: recording and replaying clock ticks

2015-01-19 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 19/01/2015 13:43, Pavel Dovgaluk wrote: > > > For example, why can't replay_run_event (or something > > > that it calls) take the replay lock locally, when it writes to the log? > > > > replay_run

Re: [Qemu-devel] [RFC PATCH v7 12/21] replay: recording and replaying clock ticks

2015-01-19 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 19/01/2015 13:03, Pavel Dovgaluk wrote: > > It will work for protecting the events list (I've already did this). > > But that will not work for protecting the log file. > > replay_run_event can write some data to

Re: [Qemu-devel] [RFC PATCH v7 12/21] replay: recording and replaying clock ticks

2015-01-19 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 16/01/2015 09:03, Pavel Dovgaluk wrote: > > There is one problem with protecting log file inside the replay code. > > We probably should have the following sequence of calls: > > > > lock_repla

Re: [Qemu-devel] [RFC PATCH v7 12/21] replay: recording and replaying clock ticks

2015-01-16 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 13/01/2015 10:21, Pavel Dovgaluk wrote: > >>> +/*! Reads next clock event from the input. */ > >>> > > +int64_t replay_read_clock(unsigned int kind) > >>> > > +{ > >>> >

Re: [Qemu-devel] [RFC PATCH v7 21/21] replay: recording of the user input

2015-01-15 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 12/01/2015 13:01, Pavel Dovgalyuk wrote: > > +void qemu_input_event_send(QemuConsole *src, InputEvent *evt) > > { > > -QemuInputHandlerState *s; > > - > > if (!runstate_is_running() && !runstate_check(RUN_STATE_SUSPENDED)) { > >

Re: [Qemu-devel] [RFC PATCH v7 08/21] replay: interrupts and exceptions

2015-01-14 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > On 14/01/2015 10:07, Pavel Dovgaluk wrote: > >> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > >> On 12/01/2015 13:40, Pavel Dovgaluk wrote: > >>>>> > >&g

Re: [Qemu-devel] [RFC PATCH v7 08/21] replay: interrupts and exceptions

2015-01-14 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 12/01/2015 13:40, Pavel Dovgaluk wrote: > >>> > >> > Perhaps check the replay_interrupt() outside, in an && with "if > >> > (unlikely(interrupt_request))"? > > You mean that I

Re: [Qemu-devel] [RFC PATCH v7 15/21] replay: checkpoints

2015-01-13 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 13/01/2015 10:15, Pavel Dovgaluk wrote: > > The numbers have no meaning. They just have to be distinct in different > > places. > > This is easier to achieve if you give a name to each place. > > > Sorry,

Re: [Qemu-devel] [RFC PATCH v7 12/21] replay: recording and replaying clock ticks

2015-01-13 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 12/01/2015 13:00, Pavel Dovgalyuk wrote: > > +/*! Reads next clock event from the input. */ > > +int64_t replay_read_clock(unsigned int kind) > > +{ > > +if (kind >= REPLAY_CLOCK_COUNT) { > > +fprintf(stderr, "invalid clock ID %d f

Re: [Qemu-devel] [RFC PATCH v7 15/21] replay: checkpoints

2015-01-13 Thread Pavel Dovgaluk
> From: Pavel Dovgaluk [mailto:pavel.dovga...@ispras.ru] > > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > > On 12/01/2015 13:01, Pavel Dovgalyuk wrote: > > > +default: > > > +case QEMU_CLOCK_VIRTUAL: > > > +if ((replay_mode !

Re: [Qemu-devel] [RFC PATCH v7 15/21] replay: checkpoints

2015-01-13 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 12/01/2015 13:01, Pavel Dovgalyuk wrote: > > +default: > > +case QEMU_CLOCK_VIRTUAL: > > +if ((replay_mode != REPLAY_MODE_NONE && !runstate_is_running()) > > +|| !replay_checkpoint(run_all ? 2 : 3)) { > > +

Re: [Qemu-devel] [RFC PATCH v7 04/21] replay: internal functions for replay log

2015-01-12 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > On 12/01/2015 13:00, Pavel Dovgalyuk wrote: > > + > > +volatile unsigned int replay_data_kind = -1; > > +volatile unsigned int replay_has_unread_data; > > + > > Why does this have to be volatile? I think 'volat

Re: [Qemu-devel] [RFC PATCH v7 12/21] replay: recording and replaying clock ticks

2015-01-12 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 12/01/2015 13:00, Pavel Dovgalyuk wrote: > > diff --git a/replay/replay.h b/replay/replay.h > > index 90a949b..1c18c0e 100755 > > --- a/replay/replay.h > > +++ b/replay/replay.h > > @@ -16,6 +16,16 @@ > > #include > > #include "qapi-types.h

Re: [Qemu-devel] [RFC PATCH v7 08/21] replay: interrupts and exceptions

2015-01-12 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 12/01/2015 13:00, Pavel Dovgalyuk wrote: > > > > +if (replay_exception()) { > > +cc->do_interrupt(cpu); > > +cpu->exception_index = -1; > > I cannot see replay_exception() in

Re: [Qemu-devel] [RFC PATCH v7 20/21] replay: command line options

2015-01-12 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 12/01/2015 13:01, Pavel Dovgalyuk wrote: > > This patch introduces command line options for enabling recording or > > replaying > > virtual machine behavior. "-record" option starts recording of the execution > > and saves it into the log, sp

Re: [Qemu-devel] [RFC PATCH v7 02/21] replay: global variables and function stubs

2015-01-12 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 12/01/2015 12:59, Pavel Dovgalyuk wrote: > > +## > > +# ReplaySubmode: > > +# > > +# Submode of the replay subsystem. > > +# > > +# @unknown: used for modes different from play. > > +# > > +# @normal: normal replay mode. > > +# > > +# Since: 2

Re: [Qemu-devel] [PATCH] i386: fix breakpoints handling in icount mode

2015-01-12 Thread Pavel Dovgaluk
> From: Jan Kiszka [mailto:jan.kis...@siemens.com] > On 2014-10-22 13:38, Pavel Dovgalyuk wrote: > > This patch fixes instructions counting when execution is stopped on > > breakpoint (e.g. set from gdb). Without a patch extra instruction is > > translated > > and icount is incremented by invalid

Re: [Qemu-devel] [PULL 26/47] cpu-exec: reset exception_index correctly

2014-12-22 Thread Pavel Dovgaluk
> From: Eduardo Habkost [mailto:ehabk...@redhat.com] > On Mon, Dec 15, 2014 at 05:38:10PM +0100, Paolo Bonzini wrote: > > From: Pavel Dovgalyuk > > > > Exception index is reset at every entry at every entry into cpu_exec() > > function. This may cause missing the exceptions while replaying them. >

Re: [Qemu-devel] [PULL 27/47] icount: set can_do_io outside TB execution

2014-12-17 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > > This patch sets can_do_io function to allow reading icount > within cpu-exec, but outside TB execution. Will you apply other icount patches that enables/disables using icount in particular TBs? Pavel Dovgalyuk > > Signed-off-by: Pavel Do

Re: [Qemu-devel] [RFC PATCH v6 08/32] icount: implement icount requesting

2014-12-11 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > On 10/12/2014 07:35, Pavel Dovgalyuk wrote: > > No, it worked well and I deleted _nocache version of that function. > > But I still need _raw one to get the instructions counter. > > Oh, great. This patch can a

Re: [Qemu-devel] [RFC PATCH v5 07/31] icount: implement icount requesting

2014-12-05 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 05/12/2014 11:55, Pavel Dovgaluk wrote: > >> > > >> > And why is can_do_io zero? :) Is the fix to move the place where > >> > can_do_io becomes nonzero? > > can_do_io is set by gen_io_st

Re: [Qemu-devel] [RFC PATCH v5 07/31] icount: implement icount requesting

2014-12-05 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 05/12/2014 06:34, Pavel Dovgaluk wrote: > >> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > >> On 04/12/2014 12:02, Pavel Dovgaluk wrote: > >>>>> Why do you need to do this if !cpu_can_do

  1   2   3   >