hv_exc: Disable stolen time accounting

This doesn't work with SMP.

Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
Hector Martin 2021-09-15 23:31:54 +09:00
parent 509481d5d5
commit 09a44e5a92

View file

@ -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);
}