accel/tcg: Fix icount accounting on CPU reset
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | accel/tcg: Extract icount_cpu_reset() helperaccel/ hw/ include/ +1 more | +13 | 0 replies | |
| 2/2 | accel/tcg: Fix icount accounting on CPU resetaccel/ tests/ tests/ | +131 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] accel/tcg: Fix icount accounting on CPU reset
When TCG runs with '-icount', resetting a vCPU from inside cpu_exec() can advance the virtual clock by the whole unused part of that vCPU's current instruction budget.
Fix by accounting the instructions executed so far immediately before the common CPU reset path clears the decrementer. Resets outside active cpu_exec() remain unchanged.
Philippe Mathieu-Daudé (2):
accel/tcg: Extract icount_cpu_reset() helper
accel/tcg: Fix icount accounting on CPU reset
include/exec/icount.h | 2 + accel/tcg/icount-common.c | 16 +++++ hw/core/cpu-common.c | 4 +- stubs/icount.c | 3 + tests/qtest/icount-x86-test.c | 119 ++++++++++++++++++++++++++++++++++ tests/qtest/meson.build | 2 + 6 files changed, 144 insertions(+), 2 deletions(-) create mode 100644 tests/qtest/icount-x86-test.c
Signature · 1 line
2.55.0