From 2c531aa7ae99deed787d77ba8b778da96e8d8a6a Mon Sep 17 00:00:00 2001 From: Hector Martin Date: Mon, 22 May 2023 00:27:08 +0900 Subject: [PATCH] hv_exc: Remove PMC0 CNT enable shadowing from fast sysreg path This is outside the hv_exc_entry/hv_exc_exit bracketing now, so modify the register directly. We only stop the PMCs when we go into the slowpath. Signed-off-by: Hector Martin --- src/hv_exc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/hv_exc.c b/src/hv_exc.c index deae7ae2..0f5e13af 100644 --- a/src/hv_exc.c +++ b/src/hv_exc.c @@ -283,13 +283,11 @@ static bool hv_handle_msr_unlocked(struct exc_info *ctx, u64 iss) case SYSREG_ISS(SYS_IMP_APL_PMCR0): if (is_read) { u64 val = (mrs(SYS_IMP_APL_PMCR0) & ~PMCR0_IMODE_MASK) | PERCPU(pmc_irq_mode); - regs[rt] = - val | (PERCPU(pmc_pending) ? PMCR0_IACT : 0) | PERCPU(exc_entry_pmcr0_cnt); + regs[rt] = val | (PERCPU(pmc_pending) ? PMCR0_IACT : 0); } else { PERCPU(pmc_pending) = !!(regs[rt] & PMCR0_IACT); PERCPU(pmc_irq_mode) = regs[rt] & PMCR0_IMODE_MASK; - PERCPU(exc_entry_pmcr0_cnt) = regs[rt] & PMCR0_CNT_MASK; - msr(SYS_IMP_APL_PMCR0, regs[rt] & ~PERCPU(exc_entry_pmcr0_cnt)); + msr(SYS_IMP_APL_PMCR0, regs[rt]); } return true;