From patchwork Thu Jun 16 13:55:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmytro Semenets X-Patchwork-Id: 12883916 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 162E8C43334 for ; Thu, 16 Jun 2022 14:07:08 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.350629.577080 (Exim 4.92) (envelope-from ) id 1o1q92-0002uZ-TT; Thu, 16 Jun 2022 14:06:48 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 350629.577080; Thu, 16 Jun 2022 14:06:48 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o1q92-0002uS-Qc; Thu, 16 Jun 2022 14:06:48 +0000 Received: by outflank-mailman (input) for mailman id 350629; Thu, 16 Jun 2022 13:57:25 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o1pzw-0001j4-Um for xen-devel@lists.xenproject.org; Thu, 16 Jun 2022 13:57:24 +0000 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [2a00:1450:4864:20::135]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 3f578ffc-ed7c-11ec-bd2c-47488cf2e6aa; Thu, 16 Jun 2022 15:57:23 +0200 (CEST) Received: by mail-lf1-x135.google.com with SMTP id p18so2378446lfr.1 for ; Thu, 16 Jun 2022 06:57:23 -0700 (PDT) Received: from localhost.localdomain ([91.219.254.75]) by smtp.gmail.com with ESMTPSA id a14-20020a19e30e000000b0047255d2119csm247998lfh.203.2022.06.16.06.57.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jun 2022 06:57:22 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 3f578ffc-ed7c-11ec-bd2c-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ANBsMVrpOfPHJzpBSaRzY2rH8VlpLm1cTHGBO/4dLYw=; b=o8QT9fCMAbLqvgsY43URvSBp8El0higCNMiWpPwvSAndk98VIzqw8MboBtu27S/BoO EPeruhLLIp48iFMAkh3AnuRrJWhBsyor/Vbmb3UjQS7DWSsUXDFjIQ19Aq0yCNwiSnLV CGrQhjJ08zzvGykyvjh+vhycUXAJ9OpVeCtHPr/LWWPJBhqOZbucrwBE35FrsissMpsL Vr5sRCi72/tnWm4vZFanhAHYiUKLYxGRxTf7xMsbuQjuKZsut79i0IbnPnBGPZIRf8Xm NiU3zCXGjNYMMpsz7TZhjpQ1qBK3w/IK9dHFr+1MEJRU6OwFL0OEGbgUjec1TloasWQ6 l8vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ANBsMVrpOfPHJzpBSaRzY2rH8VlpLm1cTHGBO/4dLYw=; b=6vQrGzttFDOckb1etzURf7yW57oSVOLE/13EqwKb8PE3WbAKgy/sqmbvNq/MVF+9vG yT2lsBGi6UASuAYRW4WTUuqfe3KN09E8B01MLpEI/YbZZlYC2tREkzdT248MaJ/BDPV2 LeE6b25ix7KGQZccQs1id0sqdrn+qXsCLaxQWuU0YkysQ43ZiSvnhfXyCmqSp7uJkXbw TJ15mSpmfZpdcE7WToT/AmtPh6dqV9pd/FK8uyzUQmqdBDE+9S4XmTRgmM/zZGPAJRWR yDDhRW5Sp7/g1i6xgEPzE7tBf4sCp0kuGysXlXsX6ZGLlk2vvgICuPpqXvmmxDcNvY7C RZ7A== X-Gm-Message-State: AJIora/PPhrgzAm+3xSiM8Rk8ow1keav1RNOpY21kkl24Su1jxTb/JQz ukAgNJEtWOJ8JQM3DZ5t5VIbCW1hMetfXw== X-Google-Smtp-Source: AGRyM1tfcSG6v/Y1mxyIKgQusuV7BJdQ9SFFJInnpvCu/6k9QEXdec/CjffsGBXxXPGZOS/jrDvAxQ== X-Received: by 2002:a05:6512:3408:b0:479:5933:fb7 with SMTP id i8-20020a056512340800b0047959330fb7mr2735242lfr.300.1655387842753; Thu, 16 Jun 2022 06:57:22 -0700 (PDT) From: dmitry.semenets@gmail.com To: xen-devel@lists.xenproject.org Cc: Dmytro Semenets , Stefano Stabellini , Julien Grall , Bertrand Marquis , Volodymyr Babchuk , Volodymyr Babchuk Subject: [PATCH] xen: Don't call panic if ARM TF cpu off returns DENIED Date: Thu, 16 Jun 2022 16:55:41 +0300 Message-Id: <20220616135541.3333760-1-dmitry.semenets@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 From: Dmytro Semenets According to PSCI specification ARM TF can return DENIED on CPU OFF. This patch brings the hypervisor into compliance with the PSCI specification. Refer to "Arm Power State Coordination Interface (DEN0022D.b)" section 5.5.2 Signed-off-by: Dmytro Semenets Reviewed-by: Volodymyr Babchuk --- xen/arch/arm/psci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/psci.c b/xen/arch/arm/psci.c index 0c90c2305c..55787fde58 100644 --- a/xen/arch/arm/psci.c +++ b/xen/arch/arm/psci.c @@ -63,8 +63,9 @@ void call_psci_cpu_off(void) /* If successfull the PSCI cpu_off call doesn't return */ arm_smccc_smc(PSCI_0_2_FN32_CPU_OFF, &res); - panic("PSCI cpu off failed for CPU%d err=%d\n", smp_processor_id(), - PSCI_RET(res)); + if ( PSCI_RET(res) != PSCI_DENIED ) + panic("PSCI cpu off failed for CPU%d err=%d\n", smp_processor_id(), + PSCI_RET(res)); } }