Message ID | 20201116204318.63987-2-dbrazdil@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=N9fY=EW=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D054C4742C for <linux-arm-kernel@archiver.kernel.org>; Mon, 16 Nov 2020 20:45:20 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 05C662222E for <linux-arm-kernel@archiver.kernel.org>; Mon, 16 Nov 2020 20:45:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Hf2PaDf9"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="t+iNX/pa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 05C662222E Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SNzLkRHt1fuIeDeo8+nneE1JjABDkOWIK588fNWnqME=; b=Hf2PaDf9NcYTjiY5NbbKfEFsr 2F0C3IejWacxFR/Dce9mxofHNGoCspHgQ2gJJDehqpZFKBGSZBoy5IWyVU4p2mX8UnErno9oNidEd WrMPQ+8Aid+3lmiwwKqcnqiv3bLKkcKMAdNubilLwmlHdojxCUuCtwlt6F0No22zJIqr8U9qjQ9N1 OaBz4zC7TcJUzb+oL0R6t5e8lpl/MUUK3AxfNdT4WyWfkRZ2fnxFQ5xZY3W7Zqpu0ryYQiXYNEhrK 9xhH2M+pvKNkJL5/7hcr1TumnMCLwGetcakL/xiEXlynBJ24ArU8kLYivNqVc0xbX4JcNv1j/0Abi gqnHqmW7A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kelLW-0007e0-7q; Mon, 16 Nov 2020 20:43:30 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kelLS-0007cp-Aa for linux-arm-kernel@lists.infradead.org; Mon, 16 Nov 2020 20:43:27 +0000 Received: by mail-wm1-x342.google.com with SMTP id p22so592836wmg.3 for <linux-arm-kernel@lists.infradead.org>; Mon, 16 Nov 2020 12:43:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zcAUCdpGWiuobZn7klovZm7k+zA43w4wed6QHZHKZWs=; b=t+iNX/paL9tpslCZ4CFA0oCR9xlgnZt6fxJdREt7U7vuSjqq/X58AyBogeLhmb/FgA seqQtQzK3lsKx2bZbh9uTqgCQ8BiJKQM1Kkc2l5gBGbgIEIK4ZvLY57zj9qQ575CVNiG 32YGidIbqGAxwSRCkoTBCJTX6Ck5M4kMXTeTIydXYbK7dk4aWmkCMhjTFoM2M1q438vQ eZPIRHbbCtKMUQOnso8i7X8CQ1A5SRPmJh6MDrhmCxrglK8LbcDnHBisKHia+Y65TAWA aK5vNo0NXNX1qC+rBXjlsbA88aDmZKhEObSRb3tTXOeFer1H+YDQ8lWIe+INsuGEW9RO E6ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zcAUCdpGWiuobZn7klovZm7k+zA43w4wed6QHZHKZWs=; b=KMJ6kJw3m4G8iSceZQqEmcBvUwhITN6i7gJD4IwA9Ohsjkl++63nRzkFERGRNGc7q/ 8A7R9ucigVB6XbAX+/S300Vd7PxIKVLC0RD30MqhL1WiVlfDsu6aLSrnZJ5Uf+D4zcRU Uflz30YvvyUBHZ+MIKhye6ceRK0yPHoXDLz17aG9fX+pqY1m2q8dtjztoYgvl1Vdsdj2 dAAQ6aViVzz3p2D1JHwg8jkL1xLCwJ9KsroeWyZjBdr/hGv9e+eXEUduK8gkM3uV7Mbe bi7R8V0XM2jQcYD+Qg8VTjH6lZ60NcxvGCqBoa1cjWxil+VXKA6+gfBMbB8xpD7yr/DB 6fHg== X-Gm-Message-State: AOAM533lPLajuyRCE1vrfudUd5B10YV1eGJI5Oxq94bFJeRs0ZrMNFPb t373AJs+10l+pYbrJzQLPt5shsL2u6H/6XFk/aw= X-Google-Smtp-Source: ABdhPJzgqCTBEHgC/iMbT8zNTaAzAp+KaRl3xN6yFoQabpnmMr3bPo14Jz09qy86PvkRyrjoS3SOvg== X-Received: by 2002:a1c:4485:: with SMTP id r127mr684535wma.177.1605559405139; Mon, 16 Nov 2020 12:43:25 -0800 (PST) Received: from localhost ([2a01:4b00:8523:2d03:bc40:bd71:373a:1b33]) by smtp.gmail.com with ESMTPSA id p4sm623902wmc.46.2020.11.16.12.43.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Nov 2020 12:43:24 -0800 (PST) From: David Brazdil <dbrazdil@google.com> To: kvmarm@lists.cs.columbia.edu Subject: [PATCH v2 01/24] psci: Support psci_ops.get_version for v0.1 Date: Mon, 16 Nov 2020 20:42:55 +0000 Message-Id: <20201116204318.63987-2-dbrazdil@google.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201116204318.63987-1-dbrazdil@google.com> References: <20201116204318.63987-1-dbrazdil@google.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201116_154326_395863_549C9EC3 X-CRM114-Status: GOOD ( 14.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Mark Rutland <mark.rutland@arm.com>, kernel-team@android.com, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>, Andrew Walbran <qwandor@google.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Marc Zyngier <maz@kernel.org>, Quentin Perret <qperret@google.com>, linux-kernel@vger.kernel.org, James Morse <james.morse@arm.com>, linux-arm-kernel@lists.infradead.org, Catalin Marinas <catalin.marinas@arm.com>, Tejun Heo <tj@kernel.org>, Dennis Zhou <dennis@kernel.org>, Christoph Lameter <cl@linux.com>, David Brazdil <dbrazdil@google.com>, Will Deacon <will@kernel.org>, Julien Thierry <julien.thierry.kdev@gmail.com>, Andrew Scull <ascull@google.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
Opt-in always-on nVHE hypervisor
|
expand
|
diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c index 00af99b6f97c..213c68418a65 100644 --- a/drivers/firmware/psci/psci.c +++ b/drivers/firmware/psci/psci.c @@ -146,6 +146,11 @@ static int psci_to_linux_errno(int errno) return -EINVAL; } +static u32 psci_get_version_0_1(void) +{ + return PSCI_VERSION(0, 1); +} + static u32 psci_get_version(void) { return invoke_psci_fn(PSCI_0_2_FN_PSCI_VERSION, 0, 0, 0); @@ -514,6 +519,8 @@ static int __init psci_0_1_init(struct device_node *np) pr_info("Using PSCI v0.1 Function IDs from DT\n"); + psci_ops.get_version = psci_get_version_0_1; + if (!of_property_read_u32(np, "cpu_suspend", &id)) { psci_function_id[PSCI_FN_CPU_SUSPEND] = id; psci_ops.cpu_suspend = psci_cpu_suspend;
KVM's host PSCI SMC filter needs to be aware of the PSCI version of the system but currently it is impossible to distinguish between v0.1 and PSCI disabled because both have get_version == NULL. Populate get_version for v0.1 with a function that returns a constant. psci_opt.get_version is currently unused so this has no effect on existing functionality. Signed-off-by: David Brazdil <dbrazdil@google.com> --- drivers/firmware/psci/psci.c | 7 +++++++ 1 file changed, 7 insertions(+)