summary refs log tree commit diff stats
path: root/gitlab/issues/target_missing/host_missing/accel_missing/2703.toml
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab/issues/target_missing/host_missing/accel_missing/2703.toml')
-rw-r--r--gitlab/issues/target_missing/host_missing/accel_missing/2703.toml48
1 files changed, 48 insertions, 0 deletions
diff --git a/gitlab/issues/target_missing/host_missing/accel_missing/2703.toml b/gitlab/issues/target_missing/host_missing/accel_missing/2703.toml
new file mode 100644
index 000000000..b8e7689a5
--- /dev/null
+++ b/gitlab/issues/target_missing/host_missing/accel_missing/2703.toml
@@ -0,0 +1,48 @@
+id = 2703
+title = "ptimer period sporadically too long"
+state = "closed"
+created_at = "2024-11-27T14:19:00.476Z"
+closed_at = "2025-03-09T00:40:01.337Z"
+labels = ["icount"]
+url = "https://gitlab.com/qemu-project/qemu/-/issues/2703"
+host-os = "EndeavourOS"
+host-arch = "x86"
+qemu-version = "9.1.0 (v9.1.0-27-g154e0ea1fe-dirty) // custom device added"
+guest-os = "Linux"
+guest-arch = "x86"
+description = """A ptimer in a custom device with a frequency of 10kHz is sporadically called after more than 100,000ns in virtual time have elapsed.
+
+With a icount shift of 4 or 5 this happens almost everytime before the linux guest can even finish booting.
+
+With a shift of 0 this happens very rarely, but it does occur from time to time."""
+reproduce = """1. setup a ptimer with a frequency of 10kHz and assert that the time passed between callbacks is exactly 100,000ns
+2. run
+3. wait for boom"""
+additional = """```
+// Timer setup
+ptimer_transaction_begin(state->timer);
+
+ptimer_set_freq(state->timer, 10000);
+ptimer_run(state->timer, 0);
+   
+ptimer_transaction_commit(state->timer);
+```
+```
+// timer callback
+int64_t now  = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
+static int64_t last = 0;
+if (last > 0)
+{
+   if (now - last != 100000)
+   {
+       fprintf(stderr, "error tick %ld after %ld is incorrect: %ld\\n", now, last, now - last);
+       assert(0);
+   }
+}
+last = now;
+```
+
+```
+error tick 47867503135 after 47867400000 is incorrect: 103135
+qemu-system-x86_64: ../...file.c:119: timer_callback: Assertion `0' failed.
+```"""