From nobody Tue Feb 10 00:58:03 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 697F02EBBA1; Thu, 8 Jan 2026 17:59:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767895176; cv=none; b=KmyT7bsJcIxk1dIcKuUDq2G6KkTPLdcH7GhhWejvcO6CKMxP+QC89LAB17vNx1ewq1YxtQDhpC4BjStbK0VNT8t0a0CRIGFr1gu3SNA7xPQhndl00w0YzV0Ewf4xdXvqdYcAzlvBRgL8UXylHKGzKBrnqkWziI1SbmDEd+X6Wik= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767895176; c=relaxed/simple; bh=hpDfcXJ0ERxD9QdxSdOFTgn2JgPNfhZudvBW4grrPzs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HWiqJkN1SnXHuM9iEVNpP/ugW5SGtP//A2vH22x57hOJ3Rx3gkrnFpQlNxesGMYVyUEfzzpFFBV2Tmg7DbFvI1ofdsqZsigbGoeo9V0cRUjZLBeITuXaB/yv7hnjWKY0MkAd6RLiYIhuI/3oE8L3xDXDJpowWQz++FY0uK0kPPs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 321F51682; Thu, 8 Jan 2026 09:59:24 -0800 (PST) Received: from ewhatever.cambridge.arm.com (ewhatever.cambridge.arm.com [10.1.197.1]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 227443F5A1; Thu, 8 Jan 2026 09:59:27 -0800 (PST) From: Suzuki K Poulose To: kvmarm@lists.linux.dev Cc: kvm@vger.kernel.org, maz@kernel.org, will@kernel.org, oupton@kernel.org, aneesh.kumar@kernel.org, steven.price@arm.com, linux-kernel@vger.kernel.org, alexandru.elisei@arm.com, tabba@google.com, Oliver Upton , Suzuki K Poulose Subject: [kvmtool PATCH v5 14/15] arm64: psci: Implement SYSTEM_{OFF,RESET} Date: Thu, 8 Jan 2026 17:57:52 +0000 Message-ID: <20260108175753.1292097-15-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260108175753.1292097-1-suzuki.poulose@arm.com> References: <20260108175753.1292097-1-suzuki.poulose@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Oliver Upton Add support for the PSCI SYSTEM_{OFF,RESET} calls. Match the behavior of the SYSTEM_EVENT based implementation and just terminate the VM. Reviewed-by: Marc Zyngier Signed-off-by: Oliver Upton Signed-off-by: Suzuki K Poulose --- arm64/psci.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arm64/psci.c b/arm64/psci.c index 3deb672e..874ad141 100644 --- a/arm64/psci.c +++ b/arm64/psci.c @@ -33,6 +33,8 @@ static void psci_features(struct kvm_cpu *vcpu, struct ar= m_smccc_res *res) case PSCI_0_2_FN_AFFINITY_INFO: case PSCI_0_2_FN64_AFFINITY_INFO: case PSCI_0_2_FN_MIGRATE_INFO_TYPE: + case PSCI_0_2_FN_SYSTEM_OFF: + case PSCI_0_2_FN_SYSTEM_RESET: case ARM_SMCCC_VERSION_FUNC_ID: res->a0 =3D PSCI_RET_SUCCESS; break; @@ -195,6 +197,10 @@ void handle_psci(struct kvm_cpu *vcpu, struct arm_smcc= c_res *res) /* Trusted OS not present */ res->a0 =3D PSCI_0_2_TOS_MP; break; + case PSCI_0_2_FN_SYSTEM_OFF: + case PSCI_0_2_FN_SYSTEM_RESET: + kvm__reboot(vcpu->kvm); + break; default: res->a0 =3D PSCI_RET_NOT_SUPPORTED; } --=20 2.43.0