From e4cd96571f00e290e93dcc65a6d2b616b159dea6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Fri, 31 Mar 2017 16:09:42 +0100 Subject: cpus: don't credit executed instructions before they have run MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Outside of the vCPU thread icount time will only be tracked against timers_state.qemu_icount. We no longer credit cycles until they have completed the run. Inside the vCPU thread we adjust for passage of time by looking at how many have run so far. This is only valid inside the vCPU thread while it is running. Signed-off-by: Alex Bennée --- include/qom/cpu.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/qom') diff --git a/include/qom/cpu.h b/include/qom/cpu.h index c3292ef..5d10359 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -332,6 +332,7 @@ struct CPUState { /* updates protected by BQL */ uint32_t interrupt_request; int singlestep_enabled; + int64_t icount_budget; int64_t icount_extra; sigjmp_buf jmp_env; -- cgit v1.1