Re: [PATCH 00/16] Acceptance Tests: use Avocado 91.0 features and other improvements

2021-09-27 Thread Pavel Dovgalyuk
Hi, Cleber! What about record/replay tests from 25.06? On 24.09.2021 21:54, Cleber Rosa wrote: This is a collection of patches for the Acceptance Tests to leverage some of the features of Avocado 91.0. With the Avocado version bump by itself, there would be a change in the default "test runner

[PATCH] replay: use CF_NOIRQ for special exception-replaying TB

2022-01-31 Thread Pavel Dovgalyuk
Commit aff0e204cb1f1c036a496c94c15f5dfafcd9b4b4 introduced CF_NOIRQ usage, but one case was forgotten. Record/replay uses one special TB which is not really executed, but used to cause a correct exception in replay mode. This patch adds CF_NOIRQ flag for such block. Signed-off-by: Pavel Dovgalyuk

[PATCH] hw/timer: fix a9gtimer vmstate

2022-02-07 Thread Pavel Dovgalyuk
A9 gtimer includes global control field and number of per-cpu fields. But only per-cpu ones are migrated. This patch adds a subsection for global control field migration. Signed-off-by: Pavel Dovgalyuk --- hw/timer/a9gtimer.c | 21 + 1 file changed, 21 insertions(+) diff

target/arm: cp15.dacr migration

2022-02-07 Thread Pavel Dovgalyuk
(1 << 15); } - -/* KVM is always non-secure so add the NS flag on AArch32 register - * entries. - */ - cpregid |= 1 << CP_REG_NS_SHIFT; } return cpregid; } -- Pavel Dovgalyuk

Re: target/arm: cp15.dacr migration

2022-02-07 Thread Pavel Dovgalyuk
On 07.02.2022 16:44, Peter Maydell wrote: On Mon, 7 Feb 2022 at 12:13, Pavel Dovgalyuk wrote: I recently encountered a problem with cp15.dacr register. It has _s and _ns versions. During the migration only dacr_ns is saved/loaded. But both of the values are used in get_phys_addr_v5 and

Re: [PATCH v3 0/3] plugins: add a drcov plugin

2022-01-19 Thread Pavel Dovgalyuk
On 25.10.2021 22:03, Alex Bennée wrote: NDNF writes: These patches adds the ability to generate files in drcov format. Primary goal this scripts is to have coverage logfiles thatwork in Lighthouse. Queued with some fixes to plugins/next, thanks. ping

Re: [PATCH 4/4] icount: preserve cflags when custom tb is about to execute

2021-11-03 Thread Pavel Dovgalyuk
On 28.10.2021 22:26, Richard Henderson wrote: On 10/28/21 4:48 AM, Pavel Dovgalyuk wrote: +    if (cpu->cflags_next_tb == -1 +    && (!use_icount || !(tb->cflags & CF_USE_ICOUNT) +    || cpu_neg(cpu)->icount_decr.

Re: [PATCH] softmmu: fix watchpoint processing in icount mode

2021-10-21 Thread Pavel Dovgalyuk
On 10.09.2021 17:41, Richard Henderson wrote: On 9/10/21 3:46 PM, David Hildenbrand wrote: On 10.09.21 15:34, Richard Henderson wrote: On 9/10/21 1:15 PM, David Hildenbrand wrote: On 07.09.21 13:30, Pavel Dovgalyuk wrote: Watchpoint processing code restores vCPU state twice: in

[PATCH] hw/i386: fix vmmouse registration

2021-10-26 Thread Pavel Dovgalyuk
According to the logic of vmmouse_update_handler function, vmmouse should be registered as an event handler when it's status is zero. vmmouse_read_id resets the status but does not register the handler. This patch adds vmmouse registration and activation when status is reset. Signed-off-by:

[PATCH] hw/net: store timers for e1000 in vmstate

2021-10-26 Thread Pavel Dovgalyuk
Setting timers randomly when vmstate is loaded breaks execution determinism. Therefore this patch allows saving mit and autoneg timers for e1000. It makes execution deterministic and allows snapshotting and reverse debugging in icount mode. Signed-off-by: Pavel Dovgalyuk --- hw/net/e1000.c

Re: [PATCH] hw/net: store timers for e1000 in vmstate

2021-10-27 Thread Pavel Dovgalyuk
On 27.10.2021 07:05, Jason Wang wrote: On Tue, Oct 26, 2021 at 6:36 PM Pavel Dovgalyuk wrote: Setting timers randomly when vmstate is loaded breaks execution determinism. Therefore this patch allows saving mit and autoneg timers for e1000. It makes execution deterministic and allows

[PATCH 3/4] softmmu: fix for "after access" watchpoints

2021-10-28 Thread Pavel Dovgalyuk
lowed explicitly. This patch sets CF_LAST_IO flag for retranslated block, allowing interrupt request for the last instruction. Signed-off-by: Pavel Dovgalyuk --- softmmu/physmem.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/softmmu/physmem.c b/softmmu/physmem.c

[PATCH 4/4] icount: preserve cflags when custom tb is about to execute

2021-10-28 Thread Pavel Dovgalyuk
ial one. This patch checks TB exit reason and restores cflags_next_tb to allow finding the interrupted block. Signed-off-by: Pavel Dovgalyuk --- accel/tcg/cpu-exec.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index c9764c1

[PATCH 1/4] softmmu: fix watchpoint processing in icount mode

2021-10-28 Thread Pavel Dovgalyuk
. Signed-off-by: Pavel Dovgalyuk Reviewed-by: David Hildenbrand --- softmmu/physmem.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/softmmu/physmem.c b/softmmu/physmem.c index f67ad29981..fd1b3b2088 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -938,18

[PATCH 0/4] Some watchpoint-related patches

2021-10-28 Thread Pavel Dovgalyuk
The series includes several watchpoint-related patches. --- Pavel Dovgalyuk (4): softmmu: fix watchpoint processing in icount mode softmmu: remove useless condition in watchpoint check softmmu: fix for "after access" watchpoints icount: preserve cflags when cu

[PATCH 2/4] softmmu: remove useless condition in watchpoint check

2021-10-28 Thread Pavel Dovgalyuk
cpu_check_watchpoint function checks cpu->watchpoint_hit at the entry. But then it also does the same in the middle of the function, while this field can't change. That is why this patch removes this useless condition. Signed-off-by: Pavel Dovgalyuk --- softmmu/physmem.

Re: [PATCH] hw/timer: fix a9gtimer vmstate

2022-02-13 Thread Pavel Dovgalyuk
ping On 07.02.2022 11:44, Pavel Dovgalyuk wrote: A9 gtimer includes global control field and number of per-cpu fields. But only per-cpu ones are migrated. This patch adds a subsection for global control field migration. Signed-off-by: Pavel Dovgalyuk --- hw/timer/a9gtimer.c | 21

Re: [PATCH 2/9] replay: notify vCPU when BH is scheduled

2022-05-03 Thread Pavel Dovgalyuk
On 26.04.2022 21:45, Richard Henderson wrote: On 4/22/22 04:53, Pavel Dovgalyuk wrote: +void icount_notify_exit(void) +{ +    if (icount_enabled() && first_cpu) { +    cpu_exit(first_cpu); +    qemu_clock_notify(QEMU_CLOCK_VIRTUAL); +    } +} Why first_cpu?  Did you really

Re: [PATCH 3/9] replay: rewrite async event handling

2022-05-04 Thread Pavel Dovgalyuk
On 26.04.2022 21:54, Richard Henderson wrote: On 4/22/22 04:53, Pavel Dovgalyuk wrote: This patch decouples checkpoints and async events. It was a tricky part of replay implementation. Now it becomes much simpler and easier to maintain. Signed-off-by: Pavel Dovgalyuk Looks ok, as far as I

Re: [PATCH 4/9] replay: simplify async event processing

2022-05-04 Thread Pavel Dovgalyuk
On 26.04.2022 23:26, Richard Henderson wrote: On 4/22/22 04:53, Pavel Dovgalyuk wrote:   static Event *replay_read_event(void)   {   Event *event; +    int event_kind = replay_state.data_kind - EVENT_ASYNC; Use the enum type. Ok. +/* Asynchronous events IDs */ + +enum

[PATCH v2 3/9] replay: rewrite async event handling

2022-05-04 Thread Pavel Dovgalyuk
This patch decouples checkpoints and async events. It was a tricky part of replay implementation. Now it becomes much simpler and easier to maintain. Signed-off-by: Pavel Dovgalyuk Acked-by: Richard Henderson --- accel/tcg/tcg-accel-ops-icount.c |5 +-- docs/replay.txt

[PATCH v2 2/9] replay: notify vCPU when BH is scheduled

2022-05-04 Thread Pavel Dovgalyuk
execution of guest code. Signed-off-by: Pavel Dovgalyuk -- v2: changed first_cpu to current_cpu (suggested by Richard Henderson) --- include/sysemu/cpu-timers.h |1 + softmmu/icount.c|8 stubs/icount.c |4 util/async.c|8

[PATCH v2 0/9] Record/replay refactoring and stuff

2022-05-04 Thread Pavel Dovgalyuk
- fixed some issues found by Richard Henderson --- Pavel Dovgalyuk (9): replay: fix event queue flush for qemu shutdown replay: notify vCPU when BH is scheduled replay: rewrite async event handling replay: simplify async event processing docs: convert docs/devel

[PATCH v2 4/9] replay: simplify async event processing

2022-05-04 Thread Pavel Dovgalyuk
This patch joins replay event id and async event id into single byte in the log. It makes processing a bit faster and log a bit smaller. Signed-off-by: Pavel Dovgalyuk -- v2: minor enum fixes (suggested by Richard Henderson) --- replay/replay-events.c | 36

[PATCH v2 6/9] docs: move replay docs to docs/system/replay.rst

2022-05-04 Thread Pavel Dovgalyuk
This patch adds replay description page, converting prior text from docs/replay.txt. The text was also updated and some sections were moved to devel part of the docs. Signed-off-by: Pavel Dovgalyuk Acked-by: Richard Henderson --- docs/devel/replay.rst | 264

[PATCH v2 1/9] replay: fix event queue flush for qemu shutdown

2022-05-04 Thread Pavel Dovgalyuk
This patch fixes event queue flush in the case of emulator shutdown. replay_finish_events should be called when replay_mode is not cleared. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson --- replay/replay.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a

[PATCH v2 5/9] docs: convert docs/devel/replay page to rst

2022-05-04 Thread Pavel Dovgalyuk
This patch converts prior .txt replay devel documentation to .rst. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson --- docs/devel/index-tcg.rst |1 + docs/devel/replay.rst| 54 ++ docs/devel/replay.txt| 46

[PATCH v2 8/9] tests/avocado: add replay Linux tests for virtio machine

2022-05-04 Thread Pavel Dovgalyuk
This patch adds two tests for replaying Linux boot process on x86_64 virtio platform. Signed-off-by: Pavel Dovgalyuk --- tests/avocado/replay_linux.py | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_linux.py

[PATCH v2 7/9] tests/avocado: update replay_linux test

2022-05-04 Thread Pavel Dovgalyuk
This patch updates replay_linux test to make it compatible with new LinuxTest class. Signed-off-by: Pavel Dovgalyuk --- tests/avocado/replay_linux.py | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/avocado/replay_linux.py b/tests/avocado

[PATCH v2 9/9] tests/avocado: add replay Linux test for Aarch64 machines

2022-05-04 Thread Pavel Dovgalyuk
This patch adds two tests for replaying Linux boot process on Aarch64 platform. Signed-off-by: Pavel Dovgalyuk --- tests/avocado/replay_linux.py | 41 + 1 file changed, 41 insertions(+) diff --git a/tests/avocado/replay_linux.py b/tests/avocado

Re: [PATCH 2/4] virtio-input: add a virtio-mulitouch device

2023-02-21 Thread Pavel Dovgalyuk
replay/replay-input.c part: Reviewed-by: Pavel Dovgalyuk On 18.02.2023 19:22, Sergio Lopez wrote: Add a virtio-multitouch device to the family of devices emulated by virtio-input implementing the Multi-touch protocol as descripted here: https://www.kernel.org/doc/html/latest/input/multi-touch

Re: [PATCH v2 2/3] target/mips: Cast offset field of Octeon BBIT to int16_t

2022-10-31 Thread Pavel Dovgalyuk
Acked-by: Pavel Dovgalyuk On 31.10.2022 16:25, Jiaxun Yang wrote: As per "Cavium Networks OCTEON Plus CN50XX Hardware Reference Manual" offset field is signed 16 bit value. However arg_BBIT.offset is unsigned. We need to cast it as signed to do address calculation. Signed-off-by: J

[PATCH] target/mips: enable LBX/LWX/* instructions for Octeon

2022-10-31 Thread Pavel Dovgalyuk
This patch changes condition and function name for enabling indexed load instructions for Octeon vCPUs. Octeons do not have DSP extension, but implement LBX-and-others. Signed-off-by: Pavel Dovgalyuk --- target/mips/tcg/translate.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions

Re: [PATCH v2 3/3] target/mips: Disable DSP ASE for Octeon68XX

2022-10-31 Thread Pavel Dovgalyuk
DSP in QEMU as well. That's true. But there is one exception: LBX/LWX/LDX instruction. These are grouped into DSP extension in QEMU, but Octeon supports them. I've sent a patch for enabling these instructions. Reviewed-by: Pavel Dovgalyuk Signed-off-by: Jiaxun Yang Acked-by: Richar

Re: Intermittent hang on x86 replay avocado test?

2022-11-06 Thread Pavel Dovgalyuk
n't remember which one). It hangs with avocado, but does not hang when I run it with the same command line without avocado. It could be some replay issue (like infinite waiting for input in main_loop_wait), but I couldn't trigger this behavior with logging/debugging enabled. Pavel Dovgalyuk

[PATCH 0/3] Cavium Octeon MIPS extensions

2022-06-07 Thread Pavel Dovgalyuk
The following series includes emulation of the platform-specific MIPS extension for Cavium Octeon CPUS: - basic Octeon vCPU model - custom instruction decoder for Octeon - implementation of arithmetic and logic instructions --- Pavel Dovgalyuk (3): target/mips: introduce generic Cavium

[PATCH 1/3] target/mips: introduce generic Cavium Octeon CPU model

2022-06-07 Thread Pavel Dovgalyuk
This patch adds generic Octeon vCPU for providing Octeon-specific instructions. Signed-off-by: Pavel Dovgalyuk --- target/mips/cpu-defs.c.inc | 30 ++ target/mips/mips-defs.h|1 + 2 files changed, 31 insertions(+) diff --git a/target/mips/cpu-defs.c.inc b

[PATCH 2/3] target/mips: implement Octeon-specific BBIT instructions

2022-06-07 Thread Pavel Dovgalyuk
This patch introduces Octeon-specific decoder and implements check-bit-and-jump instructions. Signed-off-by: Pavel Dovgalyuk --- target/mips/tcg/meson.build|2 + target/mips/tcg/octeon.decode | 14 ++ target/mips/tcg/octeon_translate.c | 53

[PATCH 3/3] target/mips: implement Octeon-specific arithmetic instructions

2022-06-07 Thread Pavel Dovgalyuk
This patch implements several Octeon-specific instructions: - BADDU - DMUL - EXTS/EXTS32 - CINS/CINS32 - POP/DPOP - SEQ/SEQI - SNE/SNEI Signed-off-by: Pavel Dovgalyuk --- target/mips/helper.h|1 target/mips/tcg/meson.build |1 target/mips/tcg/octeon.decode

Re: [PATCH 2/3] target/mips: implement Octeon-specific BBIT instructions

2022-06-08 Thread Pavel Dovgalyuk
On 07.06.2022 20:06, Richard Henderson wrote: On 6/7/22 01:59, Pavel Dovgalyuk wrote: +# Branch on bit set or clear +# BBIT0  110010 . . +# BBIT032    110110 . . +# BBIT1  111010 . . +# BBIT132    10

[PATCH v2 3/3] target/mips: implement Octeon-specific arithmetic instructions

2022-06-09 Thread Pavel Dovgalyuk
This patch implements several Octeon-specific instructions: - BADDU - DMUL - EXTS/EXTS32 - CINS/CINS32 - POP/DPOP - SEQ/SEQI - SNE/SNEI Signed-off-by: Pavel Dovgalyuk -- v2 changes: - Using existing tcg instructions for exts, cins, pop (suggested by Richard Henderson) --- target/mips

[PATCH v2 0/3] Cavium Octeon MIPS extensions

2022-06-09 Thread Pavel Dovgalyuk
by Richard Henderson) --- Pavel Dovgalyuk (3): target/mips: introduce Cavium Octeon CPU model target/mips: implement Octeon-specific BBIT instructions target/mips: implement Octeon-specific arithmetic instructions target/mips/tcg/meson.build| 2 + target/mips/tcg

[PATCH v2 1/3] target/mips: introduce Cavium Octeon CPU model

2022-06-09 Thread Pavel Dovgalyuk
This patch adds Cavium Octeon vCPU for providing Octeon-specific instructions. Signed-off-by: Pavel Dovgalyuk -- v2 changes: - vCPU name changed to Octeon68XX (suggested by Richard Henderson) --- target/mips/cpu-defs.c.inc | 28 target/mips/mips-defs.h|1

[PATCH v2 2/3] target/mips: implement Octeon-specific BBIT instructions

2022-06-09 Thread Pavel Dovgalyuk
This patch introduces Octeon-specific decoder and implements check-bit-and-jump instructions. Signed-off-by: Pavel Dovgalyuk -- v2 changes: - Changed insn field description and simplified the jumps (suggested by Richard Henderson) --- target/mips/tcg/meson.build|2

Re: [PATCH v2 3/3] target/mips: implement Octeon-specific arithmetic instructions

2022-06-13 Thread Pavel Dovgalyuk
On 09.06.2022 18:53, Richard Henderson wrote: On 6/9/22 01:23, Pavel Dovgalyuk wrote: +static bool trans_BADDU(DisasContext *ctx, arg_BADDU *a) +{ +    TCGv t0, t1; + +    if (a->rt == 0) { +    /* nop */ +    return true; +    } I believe that we're standardizing

[PATCH v3 1/4] target/mips: introduce decodetree structure for Cavium Octeon extension

2022-06-20 Thread Pavel Dovgalyuk
This patch adds decodetree for Cavium Octeon extension and an instruction set extension flag for using it in CPU models. Signed-off-by: Pavel Dovgalyuk --- target/mips/mips-defs.h|1 + target/mips/tcg/meson.build|2 ++ target/mips/tcg/octeon.decode |6

[PATCH v3 4/4] target/mips: introduce Cavium Octeon CPU model

2022-06-20 Thread Pavel Dovgalyuk
This patch adds Cavium Octeon 68XX vCPU which provides Octeon-specific instructions. Signed-off-by: Pavel Dovgalyuk -- v3 changes: - split the patch to instruction set introduction and new vCPU (suggested by Philippe Mathieu-Daudé) v2 changes: - vCPU name changed to Octeon68XX (suggested

[PATCH v3 0/2] Cavium Octeon MIPS extensions

2022-06-20 Thread Pavel Dovgalyuk
(suggested by Philippe Mathieu-Daudé) - fixed length field for EXTS/CINS (bug found by Richard Henderson) v2 changes: - simplified instruction decoding and translation (suggested by Richard Henderson) --- Pavel Dovgalyuk (2): target/mips: introduce Cavium Octeon CPU model target

[PATCH v3 2/4] target/mips: implement Octeon-specific BBIT instructions

2022-06-20 Thread Pavel Dovgalyuk
This patch introduces Octeon-specific decoder and implements check-bit-and-jump instructions. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson -- v3 changes: - Split new decodetree and BBIT decoding into two patches (suggested by Philippe Mathieu-Daudé) v2 changes

[PATCH v3 0/4] Cavium Octeon MIPS extensions

2022-06-20 Thread Pavel Dovgalyuk
(suggested by Philippe Mathieu-Daudé) - fixed length field for EXTS/CINS (bug found by Richard Henderson) v2 changes: - simplified instruction decoding and translation (suggested by Richard Henderson) --- Pavel Dovgalyuk (4): target/mips: introduce decodetree structure for Cavium

[PATCH v3 3/4] target/mips: implement Octeon-specific arithmetic instructions

2022-06-20 Thread Pavel Dovgalyuk
This patch implements several Octeon-specific instructions: - BADDU - DMUL - EXTS/EXTS32 - CINS/CINS32 - POP/DPOP - SEQ/SEQI - SNE/SNEI Signed-off-by: Pavel Dovgalyuk -- v3 changes: - Fixed length field for EXTS/CINS (bug found by Richard Henderson) v2 changes: - Using existing tcg

Re: [PATCH 4/5] replay: Extract core API to 'exec/replay-core.h'

2022-12-21 Thread Pavel Dovgalyuk
Reviewed-by: Pavel Dovgalyuk On 19.12.2022 20:08, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daude replay API is used deeply within TCG common code (common to user and system emulation). Unfortunately "sysemu/replay.h" requires some QAPI headers for few system-specific de

Re: [PATCH 6/9] accel/tcg: Introduce TCGCPUOps::need_replay_interrupt() handler

2024-01-24 Thread Pavel Dovgalyuk
Reviewed-by: Pavel Dovgalyuk On 24.01.2024 13:16, Philippe Mathieu-Daudé wrote: In order to make accel/tcg/ target agnostic, introduce the need_replay_interrupt() handler. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/tcg-cpu-ops.h | 5 + accel/tcg/cpu-exec.c | 5

Re: [PATCH 7/9] target/i386: Extract x86_need_replay_interrupt() from accel/tcg/

2024-01-24 Thread Pavel Dovgalyuk
Reviewed-by: Pavel Dovgalyuk On 24.01.2024 13:16, Philippe Mathieu-Daudé wrote: Move this x86-specific code out of the generic accel/tcg/. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/tcg/helper-tcg.h| 1 + accel/tcg/cpu-exec.c| 9 - target/i386

Re: [PATCH 5/5] avocado/replay_kernel.py: make tcg-icount check in run_vm()

2022-03-08 Thread Pavel Dovgalyuk
cific ppc64 scenario, the TCG check is being done in the common code inside run_vm() because all archs need TCG to have access to icount. Cc: Pavel Dovgalyuk Signed-off-by: Daniel Henrique Barboza Reviewed-by: Cédric Le Goater Pavel, Should I take this patch through the ppc tree ? Nobod

Re: [PATCH v3 4/4] target/mips: introduce Cavium Octeon CPU model

2022-07-07 Thread Pavel Dovgalyuk
On 06.07.2022 23:53, Philippe Mathieu-Daudé wrote: On 4/7/22 12:59, Pavel Dovgalyuk wrote: ping This is the only non-reviewed patch in the series. I've been looking for doc/datasheets but no luck (except the Linux kernel comments). What kind of testing are you doing? We compare

Re: [PATCH v3 4/4] target/mips: introduce Cavium Octeon CPU model

2022-07-07 Thread Pavel Dovgalyuk
On 06.07.2022 23:53, Philippe Mathieu-Daudé wrote: On 4/7/22 12:59, Pavel Dovgalyuk wrote: ping This is the only non-reviewed patch in the series. I've been looking for doc/datasheets but no luck (except the Linux kernel comments). What kind of testing are you doing? BTW, we foun

[PATCH v3 2/9] replay: notify vCPU when BH is scheduled

2022-05-26 Thread Pavel Dovgalyuk
execution of guest code. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson -- v2: changed first_cpu to current_cpu (suggested by Richard Henderson) --- include/sysemu/cpu-timers.h |1 + softmmu/icount.c|8 stubs/icount.c |4 util

[PATCH v3 4/9] replay: simplify async event processing

2022-05-26 Thread Pavel Dovgalyuk
This patch joins replay event id and async event id into single byte in the log. It makes processing a bit faster and log a bit smaller. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson -- v2: minor enum fixes (suggested by Richard Henderson) --- replay/replay-events.c | 36

[PATCH v3 7/9] tests/avocado: update replay_linux test

2022-05-26 Thread Pavel Dovgalyuk
This patch updates replay_linux test to make it compatible with new LinuxTest class. Signed-off-by: Pavel Dovgalyuk --- tests/avocado/replay_linux.py | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/avocado/replay_linux.py b/tests/avocado

[PATCH v3 0/9] Record/replay refactoring and stuff

2022-05-26 Thread Pavel Dovgalyuk
v2 changes: - rebased to master - fixed some issues found by Richard Henderson --- Pavel Dovgalyuk (9): replay: fix event queue flush for qemu shutdown replay: notify vCPU when BH is scheduled replay: rewrite async event handling replay: simplify async event processing

[PATCH v3 5/9] docs: convert docs/devel/replay page to rst

2022-05-26 Thread Pavel Dovgalyuk
This patch converts prior .txt replay devel documentation to .rst. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson --- docs/devel/index-tcg.rst |1 + docs/devel/replay.rst| 54 ++ docs/devel/replay.txt| 46

[PATCH v3 9/9] tests/avocado: add replay Linux test for Aarch64 machines

2022-05-26 Thread Pavel Dovgalyuk
This patch adds two tests for replaying Linux boot process on Aarch64 platform. Signed-off-by: Pavel Dovgalyuk --- tests/avocado/replay_linux.py | 41 + 1 file changed, 41 insertions(+) diff --git a/tests/avocado/replay_linux.py b/tests/avocado

[PATCH v3 6/9] docs: move replay docs to docs/system/replay.rst

2022-05-26 Thread Pavel Dovgalyuk
This patch adds replay description page, converting prior text from docs/replay.txt. The text was also updated and some sections were moved to devel part of the docs. Signed-off-by: Pavel Dovgalyuk Acked-by: Richard Henderson --- docs/devel/replay.rst | 264

[PATCH v3 8/9] tests/avocado: add replay Linux tests for virtio machine

2022-05-26 Thread Pavel Dovgalyuk
This patch adds two tests for replaying Linux boot process on x86_64 virtio platform. Signed-off-by: Pavel Dovgalyuk --- tests/avocado/replay_linux.py | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_linux.py

[PATCH v3 1/9] replay: fix event queue flush for qemu shutdown

2022-05-26 Thread Pavel Dovgalyuk
This patch fixes event queue flush in the case of emulator shutdown. replay_finish_events should be called when replay_mode is not cleared. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson --- replay/replay.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a

[PATCH v3 3/9] replay: rewrite async event handling

2022-05-26 Thread Pavel Dovgalyuk
This patch decouples checkpoints and async events. It was a tricky part of replay implementation. Now it becomes much simpler and easier to maintain. Signed-off-by: Pavel Dovgalyuk Acked-by: Richard Henderson --- accel/tcg/tcg-accel-ops-icount.c |5 +-- docs/replay.txt

Re: [PATCH v3 2/9] replay: notify vCPU when BH is scheduled

2022-05-26 Thread Pavel Dovgalyuk
On 26.05.2022 12:37, Paolo Bonzini wrote: On 5/26/22 10:45, Pavel Dovgalyuk wrote: vCPU execution should be suspended when new BH is scheduled. This is needed to avoid guest timeouts caused by the long cycles of the execution. In replay mode execution may hang when vCPU sleeps and block event

Re: [PATCH v3 4/9] replay: simplify async event processing

2022-05-26 Thread Pavel Dovgalyuk
On 26.05.2022 12:40, Paolo Bonzini wrote: On 5/26/22 10:45, Pavel Dovgalyuk wrote: + +typedef enum ReplayAsyncEventKind { +    REPLAY_ASYNC_EVENT_BH, +    REPLAY_ASYNC_EVENT_BH_ONESHOT, +    REPLAY_ASYNC_EVENT_INPUT, +    REPLAY_ASYNC_EVENT_INPUT_SYNC, +    REPLAY_ASYNC_EVENT_CHAR_READ

Re: [PATCH v3 2/9] replay: notify vCPU when BH is scheduled

2022-05-27 Thread Pavel Dovgalyuk
On 26.05.2022 15:10, Paolo Bonzini wrote: On 5/26/22 11:51, Pavel Dovgalyuk wrote: At least aio_bh_schedule_oneshot_full should have the same effect, so should this be done at a lower level, in aio_bh_enqueue() or even aio_notify()? Not sure about aio_notify. It can operate with different

[PATCH v4 0/9] Record/replay refactoring and stuff

2022-05-27 Thread Pavel Dovgalyuk
notification to aio_bh_enqueue (suggested by Paolo Bonzini) v3 changes: - rebased to master v2 changes: - rebased to master - fixed some issues found by Richard Henderson --- Pavel Dovgalyuk (9): replay: fix event queue flush for qemu shutdown replay: notify vCPU when BH is scheduled

[PATCH v4 5/9] docs: convert docs/devel/replay page to rst

2022-05-27 Thread Pavel Dovgalyuk
This patch converts prior .txt replay devel documentation to .rst. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson --- docs/devel/index-tcg.rst |1 + docs/devel/replay.rst| 54 ++ docs/devel/replay.txt| 46

[PATCH v4 3/9] replay: rewrite async event handling

2022-05-27 Thread Pavel Dovgalyuk
This patch decouples checkpoints and async events. It was a tricky part of replay implementation. Now it becomes much simpler and easier to maintain. Signed-off-by: Pavel Dovgalyuk Acked-by: Richard Henderson --- accel/tcg/tcg-accel-ops-icount.c |5 +-- docs/replay.txt

[PATCH v4 2/9] replay: notify vCPU when BH is scheduled

2022-05-27 Thread Pavel Dovgalyuk
execution of guest code. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson -- v2: changed first_cpu to current_cpu (suggested by Richard Henderson) v4: moved vCPU notification to aio_bh_enqueue (suggested by Paolo Bonzini) --- include/sysemu/cpu-timers.h |1 + softmmu/icount.c

[PATCH v4 4/9] replay: simplify async event processing

2022-05-27 Thread Pavel Dovgalyuk
This patch joins replay event id and async event id into single byte in the log. It makes processing a bit faster and log a bit smaller. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson -- v2: minor enum fixes (suggested by Richard Henderson) --- replay/replay-events.c | 36

[PATCH v4 1/9] replay: fix event queue flush for qemu shutdown

2022-05-27 Thread Pavel Dovgalyuk
This patch fixes event queue flush in the case of emulator shutdown. replay_finish_events should be called when replay_mode is not cleared. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson --- replay/replay.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a

[PATCH v4 6/9] docs: move replay docs to docs/system/replay.rst

2022-05-27 Thread Pavel Dovgalyuk
This patch adds replay description page, converting prior text from docs/replay.txt. The text was also updated and some sections were moved to devel part of the docs. Signed-off-by: Pavel Dovgalyuk Acked-by: Richard Henderson --- docs/devel/replay.rst | 264

[PATCH v4 8/9] tests/avocado: add replay Linux tests for virtio machine

2022-05-27 Thread Pavel Dovgalyuk
This patch adds two tests for replaying Linux boot process on x86_64 virtio platform. Signed-off-by: Pavel Dovgalyuk --- tests/avocado/replay_linux.py | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_linux.py

[PATCH v4 7/9] tests/avocado: update replay_linux test

2022-05-27 Thread Pavel Dovgalyuk
This patch updates replay_linux test to make it compatible with new LinuxTest class. Signed-off-by: Pavel Dovgalyuk --- tests/avocado/replay_linux.py | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/avocado/replay_linux.py b/tests/avocado

[PATCH v4 9/9] tests/avocado: add replay Linux test for Aarch64 machines

2022-05-27 Thread Pavel Dovgalyuk
This patch adds two tests for replaying Linux boot process on Aarch64 platform. Signed-off-by: Pavel Dovgalyuk --- tests/avocado/replay_linux.py | 41 + 1 file changed, 41 insertions(+) diff --git a/tests/avocado/replay_linux.py b/tests/avocado

Re: [PATCH v2 3/3] Use g_new() & friends where that makes obvious sense

2022-03-16 Thread Pavel Dovgalyuk
thieu-Daudé Reviewed-by: Cédric Le Goater Reviewed-by: Alex Bennée Acked-by: Dr. David Alan Gilbert --- replay/replay-char.c | 4 +-- replay/replay-events.c | 10 +++--- Reviewed-by: Pavel Dovgalyuk diff --git a/replay/replay-char.c b/replay/replay-c

Re: [PATCH 1/6] device-tree: add re-randomization helper function

2022-10-10 Thread Pavel Dovgalyuk
om numbers are external to the machine, they come from the outer world. It means that this is completely new reset case and new solution should be found for it. Pavel Dovgalyuk

[PATCH 5/9] docs: convert docs/devel/replay page to rst

2022-04-22 Thread Pavel Dovgalyuk
This patch converts prior .txt replay devel documentation to .rst. Signed-off-by: Pavel Dovgalyuk --- docs/devel/index-tcg.rst |2 ++ docs/devel/replay.rst| 54 ++ docs/devel/replay.txt| 46 --- 3

[PATCH 0/9] Record/replay refactoring and stuff

2022-04-22 Thread Pavel Dovgalyuk
The following series includes the following record/replay-related changes: - simplified async event processing - updated record/replay documentation, which was also converted to rst - avocado tests for record/replay of Linux for x86_64 and Aarch64 - some bugfixes --- Pavel Dovgalyuk (9

[PATCH 1/9] replay: fix event queue flush for qemu shutdown

2022-04-22 Thread Pavel Dovgalyuk
This patch fixes event queue flush in the case of emulator shutdown. replay_finish_events should be called when replay_mode is not cleared. Signed-off-by: Pavel Dovgalyuk --- replay/replay.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/replay/replay.c b/replay

[PATCH 6/9] docs: move replay docs to docs/system/replay.rst

2022-04-22 Thread Pavel Dovgalyuk
This patch adds replay description page, converting prior text from docs/replay.txt. The text was also updated and some sections were moved to devel part of the docs. Signed-off-by: Pavel Dovgalyuk --- docs/devel/replay.rst | 264 ++- docs/replay.txt| 407

[PATCH 7/9] tests/avocado: update replay_linux test

2022-04-22 Thread Pavel Dovgalyuk
This patch updates replay_linux test to make it compatible with new LinuxTest class. Signed-off-by: Pavel Dovgalyuk --- tests/avocado/replay_linux.py | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/avocado/replay_linux.py b/tests/avocado

[PATCH 2/9] replay: notify vCPU when BH is scheduled

2022-04-22 Thread Pavel Dovgalyuk
execution of guest code. Signed-off-by: Pavel Dovgalyuk --- include/sysemu/cpu-timers.h |1 + softmmu/icount.c|8 stubs/icount.c |4 util/async.c|8 4 files changed, 21 insertions(+) diff --git a/include/sysemu/cpu

[PATCH 3/9] replay: rewrite async event handling

2022-04-22 Thread Pavel Dovgalyuk
This patch decouples checkpoints and async events. It was a tricky part of replay implementation. Now it becomes much simpler and easier to maintain. Signed-off-by: Pavel Dovgalyuk --- accel/tcg/tcg-accel-ops-icount.c |5 +-- docs/replay.txt | 11 ++ include/sysemu

[PATCH 8/9] tests/avocado: add replay Linux tests for virtio machine

2022-04-22 Thread Pavel Dovgalyuk
This patch adds two tests for replaying Linux boot process on x86_64 virtio platform. Signed-off-by: Pavel Dovgalyuk --- tests/avocado/replay_linux.py | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_linux.py

[PATCH 4/9] replay: simplify async event processing

2022-04-22 Thread Pavel Dovgalyuk
This patch joins replay event id and async event id into single byte in the log. It makes processing a bit faster and log a bit smaller. Signed-off-by: Pavel Dovgalyuk --- replay/replay-events.c | 36 ++-- replay/replay-internal.h | 29

[PATCH 9/9] tests/avocado: add replay Linux test for Aarch64 machines

2022-04-22 Thread Pavel Dovgalyuk
This patch adds two tests for replaying Linux boot process on Aarch64 platform. Signed-off-by: Pavel Dovgalyuk --- tests/avocado/replay_linux.py | 41 + 1 file changed, 41 insertions(+) diff --git a/tests/avocado/replay_linux.py b/tests/avocado

[PATCH 2/3] virtio-net: added replay blocker for guest_announce

2023-09-29 Thread pavel . dovgalyuk
From: Pavel Dovgalyuk This patch blocks record/replay when guest_announce is enabled, because this flag breaks loading the snapshots in deterministic execution mode. Signed-off-by: Pavel Dovgalyuk --- hw/net/virtio-net.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/net/virtio

[PATCH 3/3] replay: fix for loading non-replay snapshots

2023-09-29 Thread pavel . dovgalyuk
From: Pavel Dovgalyuk Snapshots created in regular icount execution mode can't be loaded in recording mode, because icount value advances only by 32-bit value. This patch initializes replay icount initial value after loading the snapshot. Cc: Pizarro Solar Rafael Ulises Luzius Signed-o

[PATCH 1/3] replay: improve determinism of virtio-net

2023-09-29 Thread pavel . dovgalyuk
From: Pavel Dovgalyuk virtio-net device uses bottom halves for callbacks. These callbacks should be deterministic, because they affect VM state. This patch replaces BH invocations with corresponding replay functions, making them deterministic in record/replay mode. Signed-off-by: Pavel

[PATCH 0/3] Record/replay patches

2023-09-29 Thread pavel . dovgalyuk
From: Pavel Dovgalyuk The set of patches include the following modifications: - fix for allowing record/replay with virtio-net - fix for loading non-replay snapshots Pavel Dovgalyuk (3): replay: improve determinism of virtio-net virtio-net: added replay blocker for guest_announce replay

Re: [PATCH 4/7] spapr: Fix record-replay machine reset consuming too many events

2023-08-07 Thread Pavel Dovgalyuk
On 08.08.2023 06:09, Nicholas Piggin wrote: On Sun Aug 6, 2023 at 9:46 PM AEST, Nicholas Piggin wrote: On Fri Aug 4, 2023 at 6:50 PM AEST, Pavel Dovgalyuk wrote: BTW, there is a function qemu_register_reset_nosnapshotload that can be used in similar cases. Can you just use it without changing

[PATCH 2/3] virtio-net: added replay blocker for guest_announce

2023-08-11 Thread pavel . dovgalyuk
From: Pavel Dovgalyuk This patch blocks record/replay when guest_announce is enabled, because this flag breaks loading the snapshots in deterministic execution mode. Signed-off-by: Pavel Dovgalyuk --- hw/net/virtio-net.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/net/virtio

[PATCH 0/3] Record/replay patches

2023-08-11 Thread pavel . dovgalyuk
From: Pavel Dovgalyuk The set of patches include the following modifications: - fix for allowing record/replay with virtio-net - fix of the record/replay test Pavel Dovgalyuk (3): replay: improve determinism of virtio-net virtio-net: added replay blocker for guest_announce tests/avocado

[PATCH 3/3] tests/avocado: fix waiting for vm shutdown in replay_linux

2023-08-11 Thread pavel . dovgalyuk
From: Pavel Dovgalyuk This patch fixes the race condition in waiting for shutdown of the replay linux test. Signed-off-by: Pavel Dovgalyuk Suggested-by: John Snow --- tests/avocado/replay_linux.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/avocado

<    3   4   5   6   7   8   9   10   11   12   >