git: e14f3edc16bc - stable/15 - arm64/vmm: Save dbgclaimset_el1
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 09 Oct 2025 16:32:22 UTC
The branch stable/15 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=e14f3edc16bc6f72fe4b8e095b0c1806a5e834f0 commit e14f3edc16bc6f72fe4b8e095b0c1806a5e834f0 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2025-10-02 15:34:43 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2025-10-09 16:31:49 +0000 arm64/vmm: Save dbgclaimset_el1 It may be used by the guest. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D52803 (cherry picked from commit 4954ec00c4200d8bfd29875fc13f541942209824) --- sys/arm64/vmm/arm64.h | 1 + sys/arm64/vmm/vmm_hyp.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/sys/arm64/vmm/arm64.h b/sys/arm64/vmm/arm64.h index f6b14e10c51b..6a4af47ac60a 100644 --- a/sys/arm64/vmm/arm64.h +++ b/sys/arm64/vmm/arm64.h @@ -87,6 +87,7 @@ struct hypctx { uint64_t pmevcntr_el0[31]; uint64_t pmevtyper_el0[31]; + uint64_t dbgclaimset_el1; uint64_t dbgbcr_el1[16]; /* Debug Breakpoint Control Registers */ uint64_t dbgbvr_el1[16]; /* Debug Breakpoint Value Registers */ uint64_t dbgwcr_el1[16]; /* Debug Watchpoint Control Registers */ diff --git a/sys/arm64/vmm/vmm_hyp.c b/sys/arm64/vmm/vmm_hyp.c index 34402d7a4f05..636247c48080 100644 --- a/sys/arm64/vmm/vmm_hyp.c +++ b/sys/arm64/vmm/vmm_hyp.c @@ -108,6 +108,8 @@ vmm_hyp_reg_store(struct hypctx *hypctx, struct hyp *hyp, bool guest) } } + hypctx->dbgclaimset_el1 = READ_SPECIALREG(dbgclaimset_el1); + dfr0 = READ_SPECIALREG(id_aa64dfr0_el1); switch (ID_AA64DFR0_BRPs_VAL(dfr0) - 1) { #define STORE_DBG_BRP(x) \ @@ -390,6 +392,9 @@ vmm_hyp_reg_restore(struct hypctx *hypctx, struct hyp *hyp, bool guest) #undef LOAD_PMU } + WRITE_SPECIALREG(dbgclaimclr_el1, ~0ul); + WRITE_SPECIALREG(dbgclaimclr_el1, hypctx->dbgclaimset_el1); + dfr0 = READ_SPECIALREG(id_aa64dfr0_el1); switch (ID_AA64DFR0_BRPs_VAL(dfr0) - 1) { #define LOAD_DBG_BRP(x) \