Skip to content

Commit c67ea27

Browse files
committed
arm64/vmm: Add missing debug traps
These are features we don't support or advertise to the guest so can safely be trapped. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D52806
1 parent 4aa762f commit c67ea27

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sys/arm64/vmm/vmm_reset.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ reset_vm_el2_regs(void *vcpu)
145145
/* Set the Extended Hypervisor Configuration Register */
146146
el2ctx->hcrx_el2 = 0;
147147
/* TODO: Trap all extensions we don't support */
148-
el2ctx->mdcr_el2 = 0;
148+
el2ctx->mdcr_el2 = MDCR_EL2_TDOSA | MDCR_EL2_TDRA | MDCR_EL2_TPMS |
149+
MDCR_EL2_TTRF;
149150
/* PMCR_EL0.N is read from MDCR_EL2.HPMN */
150151
el2ctx->mdcr_el2 |= (el2ctx->pmcr_el0 & PMCR_N_MASK) >> PMCR_N_SHIFT;
151152

0 commit comments

Comments
 (0)