From 09a44e5a928d45a1db5e82076bb7a420dc9a2dbb Mon Sep 17 00:00:00 2001 From: Hector Martin Date: Wed, 15 Sep 2021 23:31:54 +0900 Subject: [PATCH] hv_exc: Disable stolen time accounting This doesn't work with SMP. Signed-off-by: Hector Martin --- src/hv_exc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hv_exc.c b/src/hv_exc.c index 82492f13..7d7158fa 100644 --- a/src/hv_exc.c +++ b/src/hv_exc.c @@ -9,6 +9,8 @@ #include "uart.h" #include "uartproxy.h" +//#define TIME_ACCOUNTING + extern spinlock_t bhl; #define _SYSREG_ISS(_1, _2, op0, op1, CRn, CRm, op2) \ @@ -227,9 +229,11 @@ static void hv_exc_exit(u64 *regs) hv_update_fiq(); /* reenable PMU counters */ reg_set(SYS_IMP_APL_PMCR0, PERCPU(exc_entry_pmcr0_cnt)); +#ifdef TIME_ACCOUNTING u64 lost = mrs(CNTPCT_EL0) - exc_entry_time; if (lost > 8) stolen_time += lost - 8; +#endif msr(CNTVOFF_EL2, stolen_time); spin_unlock(&bhl); }