aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2025-08-07 11:18:43 +0000
committerAndrew Turner <andrew@FreeBSD.org>2025-08-07 11:30:59 +0000
commit642c0334f50a089aa0c3a58b0994f35afc638833 (patch)
tree99171df4c062a668154bf4fdee03c060d607c9ed
parent6227d0f81a5e5e2473ceb8b185098ee9a53c82ff (diff)
bhyve/arm64: Implement PSCI_FNID_CPU_OFF
Support PSCI CPU_OFF by suspending the CPU and removing it from the running CPU set. Reviewed by: markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D51768
-rw-r--r--usr.sbin/bhyve/aarch64/vmexit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.sbin/bhyve/aarch64/vmexit.c b/usr.sbin/bhyve/aarch64/vmexit.c
index e6dd4b074d39..3acad4020a3c 100644
--- a/usr.sbin/bhyve/aarch64/vmexit.c
+++ b/usr.sbin/bhyve/aarch64/vmexit.c
@@ -202,7 +202,10 @@ vmexit_smccc(struct vmctx *ctx, struct vcpu *vcpu, struct vm_run *vmrun)
smccc_rv = PSCI_VER(1, 0);
break;
case PSCI_FNID_CPU_SUSPEND:
+ break;
case PSCI_FNID_CPU_OFF:
+ CPU_CLR_ATOMIC(vcpu_id(vcpu), &running_cpumask);
+ vm_suspend_cpu(vcpu);
break;
case PSCI_FNID_CPU_ON:
mpidr = vme->u.smccc_call.args[0];