Re: [PATCH v5 20/24] replay: simple auto-snapshot mode for record

2024-04-05 Thread Pavel Dovgalyuk
On 18.03.2024 18:46, Nicholas Piggin wrote: record makes an initial snapshot when the machine is created, to enable reverse-debugging. Often the issue being debugged appears near the end of the trace, so it is important for performance to keep snapshots close to the end. This implements a

Re: [PATCH v5 10/24] virtio-net: Use replay_schedule_bh_event for bhs that affect machine state

2024-04-05 Thread Pavel Dovgalyuk
Reviewed-by: Pavel Dovgalyuk On 18.03.2024 18:46, Nicholas Piggin wrote: The regular qemu_bh_schedule() calls result in non-deterministic execution of the bh in record-replay mode, which causes replay failure. Signed-off-by: Nicholas Piggin --- hw/net/virtio-net.c | 11 ++- 1 file

Re: [PATCH v4 11/24] net: Use virtual time for net announce

2024-03-12 Thread Pavel Dovgalyuk
On 12.03.2024 14:05, Nicholas Piggin wrote: On Tue Mar 12, 2024 at 7:09 PM AEST, Pavel Dovgalyuk wrote: This won't work, as needed. Announce timer can't be enabled, because it is set in post_load function. Therefore announce callbacks break the replay, when virtio-net is used with snapshots

Re: [PATCH v4 11/24] net: Use virtual time for net announce

2024-03-12 Thread Pavel Dovgalyuk
This won't work, as needed. Announce timer can't be enabled, because it is set in post_load function. Therefore announce callbacks break the replay, when virtio-net is used with snapshots. On 11.03.2024 20:40, Nicholas Piggin wrote: Using virtual time for announce ensures that guest visible

Re: [PATCH v4 20/24] replay: simple auto-snapshot mode for record

2024-03-12 Thread Pavel Dovgalyuk
On 11.03.2024 20:40, Nicholas Piggin wrote: record makes an initial snapshot when the machine is created, to enable reverse-debugging. Often the issue being debugged appears near the end of the trace, so it is important for performance to keep snapshots close to the end. This implements a

Re: [Spam][PATCH] replay: Improve error messages about configuration conflicts

2024-03-01 Thread Pavel Dovgalyuk
Reviewed-by: Pavel Dovgalyuk On 01.03.2024 15:06, Markus Armbruster wrote: Improve Record/replay feature is not supported for '-rtc base=localtime' Record/replay feature is not supported for 'smp' Record/replay feature is not supported for '-snapshot' to Record/replay

Re: [PATCH 4/4] replay: simple auto-snapshot mode for record

2024-02-27 Thread Pavel Dovgalyuk
On 26.02.2024 10:36, Nicholas Piggin wrote: On Fri Aug 18, 2023 at 2:36 PM AEST, Pavel Dovgalyuk wrote: On 14.08.2023 19:31, Nicholas Piggin wrote: record makes an initial snapshot when the machine is created, to enable reverse-debugging. Often the issue being debugged appears near the end

Re: [PATCH v1 02/21] tests: correct typos

2024-02-20 Thread Pavel Dovgalyuk
Reviewed-by: Pavel Dovgalyuk On 20.02.2024 11:52, Manos Pitsidianakis wrote: Correct typos automatically found with the `typos` tool <https://crates.io/crates/typos> Signed-off-by: Manos Pitsidianakis --- tests/avocado/acpi-bits/bits-tests/smbios.py2 | 2 +- tests/avocado/mem-addr

Re: [PATCH v2 4/4] tests/avocado: excercise scripts/replay-dump.py in replay tests

2024-01-28 Thread Pavel Dovgalyuk
Reviewed-by: Pavel Dovgalyuk On 25.01.2024 19:08, Nicholas Piggin wrote: This runs replay-dump.py after recording a trace, and fails the test if the script fails. replay-dump.py is modified to exit with non-zero if an error is encountered while parsing, to support this. Signed-off

Re: [PATCH v2 1/4] replay: allow runstate shutdown->running when replaying trace

2024-01-28 Thread Pavel Dovgalyuk
Reviewed-by: Pavel Dovgalyuk On 25.01.2024 19:08, Nicholas Piggin wrote: When replaying a trace, it is possible to go from shutdown to running with a reverse-debugging step. This can be useful if the problem being debugged triggers a reset or shutdown. Signed-off-by: Nicholas Piggin

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 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 09/11] replay: stop us hanging in rr_wait_io_event

2023-12-08 Thread Pavel Dovgalyuk
most of the failures in replay_kernel.py Is there an effect for console QEMU only? I've tested this patch on Windows7 boot scenario and replay speed has not changed. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2013 Signed-off-by: Alex Bennée Cc: Pavel Dovgalyuk --- include

Re: [PATCH 11/11] tests/avocado: remove skips from replay_kernel

2023-12-07 Thread Pavel Dovgalyuk
@@ def test_or1k_sim(self): file_path = self.fetch_asset(tar_url, asset_hash=tar_hash) self.do_test_advcal_2018(file_path, 'vmlinux') -@skip("nios2 emulation is buggy under record/replay") def test_nios2_10m50(self): """ :avocado: tags=arch:nios2 Acked-by: Pavel Dovgalyuk

Re: [PATCH 08/11] replay: introduce a central report point for sync errors

2023-12-07 Thread Pavel Dovgalyuk
, because RR may be started from the snapshot, which references the middle of replayed scenario. Pavel Dovgalyuk

Re: [PATCH 10/11] chardev: force write all when recording replay logs

2023-12-07 Thread Pavel Dovgalyuk
/qemu/-/issues/2010 Signed-off-by: Alex Bennée Cc: Pavel Dovgalyuk --- chardev/char.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chardev/char.c b/chardev/char.c index 996a024c7a..6e5b4d7345 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -171,7 +171,8 @@ int

Re: [PATCH 07/11] replay: make has_unread_data a bool

2023-12-07 Thread Pavel Dovgalyuk
deletions(-) Reviewed-by: Pavel Dovgalyuk

Re: [PATCH 06/11] replay: add proper kdoc for ReplayState

2023-12-07 Thread Pavel Dovgalyuk
overlapping ids. */ uint64_t block_request_id; -/*! Asynchronous event id read from the log */ uint64_t read_event_id; } ReplayState; extern ReplayState replay_state; Reviewed-by: Pavel Dovgalyuk

Re: [PATCH 05/11] replay: remove host_clock_last

2023-12-07 Thread Pavel Dovgalyuk
clock */ -uint64_t host_clock_last; /*! Asynchronous event id read from the log */ uint64_t read_event_id; } ReplayState; Reviewed-by: Pavel Dovgalyuk

Re: [PATCH 04/11] scripts/replay_dump: track total number of instructions

2023-12-07 Thread Pavel Dovgalyuk
): +global total_insns ins_diff = read_dword(dumpfile) -print_event(eid, name, "0x%x" % (ins_diff)) +total_insns += ins_diff +print_event(eid, name, "+ %d -> %d" % (ins_diff, total_insns)) return True def decode_char_write(eid, name, dumpfile): Reviewed-by: Pavel Dovgalyuk

Re: [PATCH 01/11] tests/avocado: add a simple i386 replay kernel test

2023-12-07 Thread Pavel Dovgalyuk
1 file changed, 16 insertions(+) Acked-by: Pavel Dovgalyuk

Re: [PATCH 02/11] tests/avocado: fix typo in replay_linux

2023-12-07 Thread Pavel Dovgalyuk
('successfully finished the replay') elapsed = time.time() - start_time logger.info('elapsed time %.2f sec' % elapsed) return elapsed Reviewed-by: Pavel Dovgalyuk

Re: [PATCH v6 06/21] net: Remove flag propagation

2023-11-13 Thread Pavel Dovgalyuk
On 11.11.2023 17:27, Akihiko Odaki wrote: On 2023/11/10 16:35, Pavel Dovgalyuk wrote: You need to bump REPLAY_VERSION in replay/replay.c, because your patch changes the replay log format. Otherwise, for replay part: Acked-by: Pavel Dovgalyuk I'll drop this change then. It's just a cleanup

Re: [PATCH v6 06/21] net: Remove flag propagation

2023-11-09 Thread Pavel Dovgalyuk
You need to bump REPLAY_VERSION in replay/replay.c, because your patch changes the replay log format. Otherwise, for replay part: Acked-by: Pavel Dovgalyuk On 30.10.2023 08:12, Akihiko Odaki wrote: There is no defined flag now. Signed-off-by: Akihiko Odaki --- include/net/filter.h

[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

[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 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-off

[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

Re: [RFC v2 PATCH] record-replay: support SMP target machine

2023-08-21 Thread Pavel Dovgalyuk
On 11.08.2023 04:47, Nicholas Piggin wrote: RR CPU switching is driven by timers and events so it is deterministic like everything else. Record a CPU switch event and use that to drive the CPU switch on replay. Signed-off-by: Nicholas Piggin --- This is still in RFC phase because so far I've

Re: [PATCH 4/4] replay: simple auto-snapshot mode for record

2023-08-17 Thread Pavel Dovgalyuk
On 14.08.2023 19:31, Nicholas Piggin wrote: record makes an initial snapshot when the machine is created, to enable reverse-debugging. Often the issue being debugged appears near the end of the trace, so it is important for performance to keep snapshots close to the end. This implements a

Re: [PATCH 3/4] replay: allow runstate shutdown->running when replaying trace

2023-08-17 Thread Pavel Dovgalyuk
Acked-by: Pavel Dovgalyuk On 14.08.2023 19:31, Nicholas Piggin wrote: When replaying a trace, it is possible to go from shutdown to running with a reverse-debugging step. This can be useful if the problem being debugged triggers a reset or shutdown. Signed-off-by: Nicholas Piggin

Re: [PATCH 2/4] tests/avocado: replay_linux.py add replay-dump.py test

2023-08-17 Thread Pavel Dovgalyuk
On 14.08.2023 19:31, Nicholas Piggin wrote: This runs replay-dump.py after recording a trace, and fails the test if the script fails. replay-dump.py is modified to exit with non-zero if an error is encountered while parsing. I would like to have separate test for replay-dump, because

Re: [PATCH 1/4] scripts/replay_dump.sh: Update to current rr record format

2023-08-17 Thread Pavel Dovgalyuk
On 14.08.2023 19:31, Nicholas Piggin wrote: This thing seems to have fallen by the wayside. This gets it working with the current format, although does not quite implement all events. Signed-off-by: Nicholas Piggin The code looks ok, therefore Rewieved-by: Pavel Dovgalyuk However

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

2023-08-11 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 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

[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 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

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

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

2023-08-04 Thread Pavel Dovgalyuk
with. When loading a snapshot for record-replay, the machine is reset again, and that tries to consume the random event record again, crashing due to inconsistent record Fix this by saving the seed to populate the device tree with, and skipping the rng on snapshot load. Cc: Pavel Dovgalyuk Signed-off

Re: [PATCH 7/7] tests/avocado: ppc64 reverse debugging tests for pseries and powernv

2023-07-31 Thread Pavel Dovgalyuk
Reviewed-by: Pavel Dovgalyuk On 26.07.2023 21:35, Nicholas Piggin wrote: These machines run reverse-debugging well enough to pass basic tests. Wire them up. Cc: Pavel Dovgalyuk Signed-off-by: Nicholas Piggin --- tests/avocado/reverse_debugging.py | 29 + 1

Re: [PATCH 6/7] tests/avocado: reverse-debugging cope with re-executing breakpoints

2023-07-31 Thread Pavel Dovgalyuk
Reviewed-by: Pavel Dovgalyuk On 26.07.2023 21:35, Nicholas Piggin wrote: The reverse-debugging test creates a trace, then replays it and: 1. Steps the first 10 instructions and records their addresses. 2. Steps backward and verifies their addresses match. 3. Runs to (near) the end

Re: [PATCH 5/7] tests/avocado: boot ppc64 pseries replay-record test to Linux VFS mount

2023-07-31 Thread Pavel Dovgalyuk
Acked-by: Pavel Dovgalyuk On 26.07.2023 21:35, Nicholas Piggin wrote: This the ppc64 record-replay test is able to replay the full kernel boot so try enabling it. Cc: Pavel Dovgalyuk Signed-off-by: Nicholas Piggin --- tests/avocado/replay_kernel.py | 3 +-- 1 file changed, 1 insertion

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

2023-07-31 Thread Pavel Dovgalyuk
Acked-by: Pavel Dovgalyuk On 26.07.2023 21:35, Nicholas Piggin wrote: spapr_machine_reset gets a random number to populate the device-tree rng seed with. When loading a snapshot for record-replay, the machine is reset again, and that tries to consume the random event record again, crashing due

[PATCH] tests/avocado: fix waiting for vm shutdown in replay_linux This patch fixes the race condition in waiting for shutdown of the replay linux test.

2023-07-31 Thread pavel . dovgalyuk
From: Pavel Dovgalyuk 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/replay_linux.py b/tests/avocado/replay_linux.py index a76dd507fc..270ccc1eae 100644 --- a/tests

Re: tests/avocado/replay_kernel: ReplayKernelNormal.test_aarch64_virt failing

2023-07-10 Thread Pavel Dovgalyuk
On 10.07.2023 20:14, Philippe Mathieu-Daudé wrote: Hi, Per tests/avocado/replay_kernel.py:     def test_aarch64_virt(self):     ...     console_pattern = 'VFS: Cannot open root device' the test is succeeding, but Avocado reports an error. Does the emulator exit when error "Cannot

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

2023-06-26 Thread Pavel Dovgalyuk
e500 has the same problem, I think, according to this issue: https://gitlab.com/qemu-project/qemu/-/issues/1634 Btw, ARM virt platform rebuilds fdt only at initialization phase, not when reset. Isn't this behavior correct? Shouldn't PPC platforms do the similar thing? On 23.06.2023 15:57,

Re: [PATCH 5/7] target/ppc: Fix timebase reset with record-replay

2023-06-26 Thread Pavel Dovgalyuk
Reviewed-by: Pavel Dovgalyuk On 23.06.2023 15:57, Nicholas Piggin wrote: Timebase save uses a random number for a legacy vmstate field, which makes rr snapshot loading unbalanced. The easiest way to deal with this is just to skip the rng if record-replay is active. Signed-off-by: Nicholas

Re: [PATCH 7/7] tests/avocado: ppc64 pseries reverse debugging test

2023-06-26 Thread Pavel Dovgalyuk
On 23.06.2023 15:57, Nicholas Piggin wrote: pseries can run reverse-debugging well enough to pass basic tests. There is strangeness with reverse-continue possibly relating to a bp being set on the first instruction or on a snapshot, that causes the PC to be reported on the first instruction

Re: [PATCH 1/7] target/ppc: Fix CPU reservation migration for record-replay

2023-06-26 Thread Pavel Dovgalyuk
Acked-by: Pavel Dovgalyuk On 23.06.2023 15:57, Nicholas Piggin wrote: ppc only migrates reserve_addr, so the destination machine can get a valid reservation with an incorrect reservation value of 0. Prior to commit 392d328abe753 ("target/ppc: Ensure stcx size matches larx"), this co

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

[PATCH v2 2/5] target/avr: implement small RAM/large RAM feature

2023-01-23 Thread Pavel Dovgalyuk
in xmega controllers, that could be added later. For the currently supported MCUs this feature is disabled and RAMPZ is not used for RAM access. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson --- target/avr/cpu.h |2 ++ target/avr/translate.c | 63

[PATCH v2 1/5] target/avr: fix long address calculation

2023-01-23 Thread Pavel Dovgalyuk
of deposit tcg instructions. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson Reviewed-by: Michael Rolnik --- target/avr/translate.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/avr/translate.c b/target/avr/translate.c index 2bed56f135..552f739b3d

[PATCH v2 4/5] target/avr: fix interrupt processing

2023-01-23 Thread Pavel Dovgalyuk
Interrupt bit vector has 64 bits, but interrupt vector is found with ctz32 function. This patch replaces it with ctz64. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/avr/helper.c |4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v2 0/5] AVR target fixes

2023-01-23 Thread Pavel Dovgalyuk
This set of patches includes multiple changes for AVR target. v2 changes: - fixed instruction translation in icount mode --- Pavel Dovgalyuk (5): target/avr: fix long address calculation target/avr: implement small RAM/large RAM feature target/avr: fix avr features processing

[PATCH v2 5/5] target/avr: enable icount mode

2023-01-23 Thread Pavel Dovgalyuk
-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson --- target/avr/translate.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/target/avr/translate.c b/target/avr/translate.c index 40b15d116e..ee137dfe54 100644 --- a/target/avr/translate.c +++ b/target/avr

[PATCH v2 3/5] target/avr: fix avr features processing

2023-01-23 Thread Pavel Dovgalyuk
Bit vector for features has 64 bits. This patch fixes bit shifts in avr_feature and set_avr_feature functions to be 64-bit too. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Michael Rolnik Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/avr/cpu.h |4 ++-- 1

[PATCH v2 1/5] target/avr: fix long address calculation

2023-01-19 Thread Pavel Dovgalyuk
of deposit tcg instructions. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson Reviewed-by: Michael Rolnik --- target/avr/translate.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/avr/translate.c b/target/avr/translate.c index 2bed56f135..552f739b3d

[PATCH v2 2/5] target/avr: implement small RAM/large RAM feature

2023-01-19 Thread Pavel Dovgalyuk
in xmega controllers, that could be added later. For the currently supported MCUs this feature is disabled and RAMPZ is not used for RAM access. Signed-off-by: Pavel Dovgalyuk --- target/avr/cpu.h |2 ++ target/avr/translate.c | 63 ++-- 2 files

[PATCH v2 3/5] target/avr: fix avr features processing

2023-01-19 Thread Pavel Dovgalyuk
Bit vector for features has 64 bits. This patch fixes bit shifts in avr_feature and set_avr_feature functions to be 64-bit too. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Michael Rolnik --- target/avr/cpu.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/avr

[PATCH v2 0/5] AVR target fixes

2023-01-19 Thread Pavel Dovgalyuk
This set of patches includes multiple changes for AVR target. v2 changes: - fixed instruction translation in icount mode --- Pavel Dovgalyuk (5): target/avr: fix long address calculation target/avr: implement small RAM/large RAM feature target/avr: fix avr features processing

Re: reverse-{debugging,continue} not working on v7.2.0, i386 guest

2023-01-19 Thread Pavel Dovgalyuk
On 19.01.2023 07:40, Hyeonggon Yoo wrote: On Wed, Jan 18, 2023 at 12:39:16PM +0300, Pavel Dovgalyuk wrote: Sometimes replay (or reverse debugging) have problems due to incomplete or incorrect virtual device save/load implementation. Can you try removing -cpu from your command line? Or you can

[PATCH v2 4/5] target/avr: fix interrupt processing

2023-01-19 Thread Pavel Dovgalyuk
Interrupt bit vector has 64 bits, but interrupt vector is found with ctz32 function. This patch replaces it with ctz64. Signed-off-by: Pavel Dovgalyuk --- target/avr/helper.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/avr/helper.c b/target/avr/helper.c

[PATCH v2 5/5] target/avr: enable icount mode

2023-01-19 Thread Pavel Dovgalyuk
-by: Pavel Dovgalyuk --- target/avr/translate.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/target/avr/translate.c b/target/avr/translate.c index 40b15d116e..ee137dfe54 100644 --- a/target/avr/translate.c +++ b/target/avr/translate.c @@ -1406,6 +1406,10

Re: reverse-{debugging,continue} not working on v7.2.0, i386 guest

2023-01-18 Thread Pavel Dovgalyuk
, Jan 18, 2023 at 10:12:48AM +0300, Pavel Dovgalyuk wrote: As replay works well, the reverse debugging should be ok too. But for "going back" it needs a VM snapshot that can be used for reload. Snapshots are saved on qcow2 images connected to QEMU. Therefore you need to add an empty qco

Re: reverse-{debugging,continue} not working on v7.2.0, i386 guest

2023-01-17 Thread Pavel Dovgalyuk
As replay works well, the reverse debugging should be ok too. But for "going back" it needs a VM snapshot that can be used for reload. Snapshots are saved on qcow2 images connected to QEMU. Therefore you need to add an empty qcow2 to your command line with the following option: -drive

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 for-7.2] replay: Fix declaration of replay_read_next_clock

2022-11-28 Thread Pavel Dovgalyuk
Reviewed-by: Pavel Dovgalyuk On 29.11.2022 04:05, Richard Henderson wrote: Fixes the build with gcc 13: replay/replay-time.c:34:6: error: conflicting types for \ 'replay_read_next_clock' due to enum/integer mismatch; \ have 'void(ReplayClockKind)' [-Werror=enum-int-mismatch] 34

[PATCH 2/4] target/avr: implement small RAM/large RAM feature

2022-11-18 Thread Pavel Dovgalyuk
in xmega controllers, that could be added later. For the currently supported MCUs this feature is disabled and RAMPZ is not used for RAM access. Signed-off-by: Pavel Dovgalyuk --- target/avr/cpu.h |2 ++ target/avr/translate.c | 63 ++-- 2 files

[PATCH 1/4] target/avr: fix long address calculation

2022-11-18 Thread Pavel Dovgalyuk
of deposit tcg instructions. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson Reviewed-by: Michael Rolnik --- target/avr/translate.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/avr/translate.c b/target/avr/translate.c index e65b6008c0..c9a0a39c2d

[PATCH 4/4] target/avr: fix interrupt processing

2022-11-18 Thread Pavel Dovgalyuk
Interrupt bit vector has 64 bits, but interrupt vector is found with ctz32 function. This patch replaces it with ctz64. Signed-off-by: Pavel Dovgalyuk --- target/avr/helper.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/avr/helper.c b/target/avr/helper.c

[PATCH 3/4] target/avr: fix avr features processing

2022-11-18 Thread Pavel Dovgalyuk
Bit vector for features has 64 bits. This patch fixes bit shifts in avr_feature and set_avr_feature functions to be 64-bit too. Signed-off-by: Pavel Dovgalyuk --- target/avr/cpu.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/avr/cpu.h b/target/avr/cpu.h

[PATCH 0/4] AVR target fixes

2022-11-18 Thread Pavel Dovgalyuk
--- Pavel Dovgalyuk (4): target/avr: fix long address calculation target/avr: implement small RAM/large RAM feature target/avr: fix avr features processing target/avr: fix interrupt processing target/avr/cpu.h | 6 ++-- target/avr/helper.c| 4 +-- target/avr

[PATCH] target/avr: fix long address calculation

2022-11-17 Thread Pavel Dovgalyuk
of deposit tcg instructions. Signed-off-by: Pavel Dovgalyuk --- target/avr/translate.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/avr/translate.c b/target/avr/translate.c index e65b6008c0..c9a0a39c2d 100644 --- a/target/avr/translate.c +++ b/target/avr

[PATCH] tests/avocado: using several workers while testing

2022-11-16 Thread Pavel Dovgalyuk
rom other make tasks. Signed-off-by: Maksim Bakulin Signed-off-by: Pavel Dovgalyuk --- tests/Makefile.include | 20 ++-- tests/jobs.py | 42 ++ tests/requirements.txt |2 +- 3 files changed, 61 insertions(+), 3 deletions(-)

Re: Intermittent hang on x86 replay avocado test?

2022-11-06 Thread Pavel Dovgalyuk
ber 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

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

2022-10-31 Thread Pavel Dovgalyuk
MU 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: Richard Henderson --- t

[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 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

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

2022-10-11 Thread Pavel Dovgalyuk
re 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] tests/avocado: fix replay-linux test

2022-08-02 Thread Pavel Dovgalyuk
Last line of the test is missing by accident. This patch fixes the script. Signed-off-by: Pavel Dovgalyuk --- tests/avocado/replay_linux.py |1 + 1 file changed, 1 insertion(+) diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_linux.py index 40e4f6908e..e1f9981a34 100644

Re: [PATCH for-7.1] icount: Take iothread lock when running QEMU timers

2022-08-02 Thread Pavel Dovgalyuk
Tested-by: Pavel Dovgalyuk On 01.08.2022 19:45, Peter Maydell wrote: The function icount_prepare_for_run() is called with the iothread unlocked, but it can call icount_notify_aio_contexts() which will run qemu timer handlers. Those are supposed to be run only with the iothread lock held, so

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 found SDK

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 compared

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

2022-07-04 Thread Pavel Dovgalyuk
ping This is the only non-reviewed patch in the series. On 20.06.2022 15:05, Pavel Dovgalyuk wrote: 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

[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

[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 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/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 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 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

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 on us

[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

[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 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 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

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 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

[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 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 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

  1   2   3   4   5   6   7   8   9   10   >