git: 7f2e6600acc4 - main - arm64/vmm: Remove PMXEVCNTR_EL0 from the switcher
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 04 Nov 2026 16:56:45 UTC
The branch main has been updated by andrew:
URL: https://cgit.FreeBSD.org/src/commit/?id=7f2e6600acc4f6ec6a2049c7816b8a849c9b6773
commit 7f2e6600acc4f6ec6a2049c7816b8a849c9b6773
Author: Kajetan Puchalski <kajetan.puchalski@arm.com>
AuthorDate: 2026-10-21 14:15:28 +0000
Commit: Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2026-11-04 14:56:40 +0000
arm64/vmm: Remove PMXEVCNTR_EL0 from the switcher
PMXEVCNTR_EL0 writes PMEVCNTR<n>_EL0, selected by PMSELR_EL0.SEL.
All the counter registers are saved and restored in their own block, so
at best saving and restoring this register is pointless.
Given that it comes right after writing PMSELR_EL0 with no barrier, at
worst it could break things.
Remove the register from the switcher code.
Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
Reviewed by: andrew
Sponsored by: Arm Ltd
Pull Request: https://github.com/freebsd/freebsd-src/pull/2481
---
sys/arm64/vmm/vmm_hyp.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/sys/arm64/vmm/vmm_hyp.c b/sys/arm64/vmm/vmm_hyp.c
index 99a5b3728192..89f12d5af1e0 100644
--- a/sys/arm64/vmm/vmm_hyp.c
+++ b/sys/arm64/vmm/vmm_hyp.c
@@ -113,8 +113,6 @@ vmm_hyp_reg_store_pmu_debug(struct hypctx *hypctx, bool guest)
READ_SPECIALREG(pmuserenr_el0));
hypctx_write_sys_reg(hypctx, PMSELR_EL0,
READ_SPECIALREG(pmselr_el0));
- hypctx_write_sys_reg(hypctx, PMXEVCNTR_EL0,
- READ_SPECIALREG(pmxevcntr_el0));
hypctx_write_sys_reg(hypctx, PMCNTENSET_EL0,
READ_SPECIALREG(pmcntenset_el0));
hypctx_write_sys_reg(hypctx, PMINTENSET_EL1,
@@ -467,8 +465,6 @@ vmm_hyp_reg_restore_pmu_debug(struct hypctx *hypctx)
hypctx_read_sys_reg(hypctx, PMUSERENR_EL0));
WRITE_SPECIALREG(pmselr_el0,
hypctx_read_sys_reg(hypctx, PMSELR_EL0));
- WRITE_SPECIALREG(pmxevcntr_el0,
- hypctx_read_sys_reg(hypctx, PMXEVCNTR_EL0));
/* Clear all events/interrupts then enable them */
WRITE_SPECIALREG(pmcntenclr_el0, ~0ul);
WRITE_SPECIALREG(pmcntenset_el0,