From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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=-15.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 A2A2EC64E8A for ; Thu, 3 Dec 2020 10:48:33 +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 2A552208A9 for ; Thu, 3 Dec 2020 10:48:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2A552208A9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.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:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Wdvtcifo+HdXj1voeW3kZIoo6e3DFJwNB5jFQBcFctM=; b=fv2NSFmLBG8uipiG9/soxJ65/ 1482fosxibs5Xci4R6IOFTT+edwKx0lI+9M+5rAWyKt3Uu0XYvQteuFO1+4RkEqUp8jNpgKfxW4oQ yIIOfmgNeBxMzB0ELoVCvj4pSod9fUtWGzXvx9dEBOyjExi5Kdi7CLblywShml/gtfES7apqRTERE +SRE2GC7z6UlZ4XCSh+657/G2ql8dpkpCmmqjQLSkbh2npolQ2VxLyMin1B6qCwqH0n+Mq+9TkUp6 YS7Q+gRgjoJeXSA7LVGqkd2UPbUUNSUAikjEi51AY/mnc/+R/PFpF4GaQOlc/xp6PG26EyLw3BO/m qkc8MupOA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkm8x-0007Bl-6N; Thu, 03 Dec 2020 10:47:23 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkm8v-0007B8-CA for linux-arm-kernel@lists.infradead.org; Thu, 03 Dec 2020 10:47:22 +0000 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 1C078113E; Thu, 3 Dec 2020 02:47:20 -0800 (PST) Received: from C02TD0UTHF1T.local (unknown [10.57.0.87]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E02FB3F66B; Thu, 3 Dec 2020 02:47:15 -0800 (PST) Date: Thu, 3 Dec 2020 10:47:12 +0000 From: Mark Rutland To: David Brazdil Subject: Re: [PATCH v4 06/26] psci: Add accessor for psci_0_1_function_ids Message-ID: <20201203104712.GC96754@C02TD0UTHF1T.local> References: <20201202184122.26046-1-dbrazdil@google.com> <20201202184122.26046-7-dbrazdil@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201202184122.26046-7-dbrazdil@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201203_054721_516241_E5F85D3F X-CRM114-Status: GOOD ( 20.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lorenzo Pieralisi , kernel-team@android.com, Jonathan Corbet , Catalin Marinas , Suzuki K Poulose , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Sudeep Holla , James Morse , linux-arm-kernel@lists.infradead.org, Marc Zyngier , Tejun Heo , Dennis Zhou , Christoph Lameter , Will Deacon , kvmarm@lists.cs.columbia.edu, Julien Thierry Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Dec 02, 2020 at 06:41:02PM +0000, David Brazdil wrote: > Make it possible to retrieve a copy of the psci_0_1_function_ids struct. > This is useful for KVM if it is configured to intercept host's PSCI SMCs. > > Signed-off-by: David Brazdil Acked-by: Mark Rutland ... just to check, does KVM snapshot which function IDs are valid, or do we want to add that state here too? That can be a follow-up if necessary. Thanks, Mark. > --- > drivers/firmware/psci/psci.c | 12 +++++------- > include/linux/psci.h | 9 +++++++++ > 2 files changed, 14 insertions(+), 7 deletions(-) > > diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c > index 593fdd0e09a2..f5fc429cae3f 100644 > --- a/drivers/firmware/psci/psci.c > +++ b/drivers/firmware/psci/psci.c > @@ -58,15 +58,13 @@ typedef unsigned long (psci_fn)(unsigned long, unsigned long, > unsigned long, unsigned long); > static psci_fn *invoke_psci_fn; > > -struct psci_0_1_function_ids { > - u32 cpu_suspend; > - u32 cpu_on; > - u32 cpu_off; > - u32 migrate; > -}; > - > static struct psci_0_1_function_ids psci_0_1_function_ids; > > +struct psci_0_1_function_ids get_psci_0_1_function_ids(void) > +{ > + return psci_0_1_function_ids; > +} > + > #define PSCI_0_2_POWER_STATE_MASK \ > (PSCI_0_2_POWER_STATE_ID_MASK | \ > PSCI_0_2_POWER_STATE_TYPE_MASK | \ > diff --git a/include/linux/psci.h b/include/linux/psci.h > index 2a1bfb890e58..4ca0060a3fc4 100644 > --- a/include/linux/psci.h > +++ b/include/linux/psci.h > @@ -34,6 +34,15 @@ struct psci_operations { > > extern struct psci_operations psci_ops; > > +struct psci_0_1_function_ids { > + u32 cpu_suspend; > + u32 cpu_on; > + u32 cpu_off; > + u32 migrate; > +}; > + > +struct psci_0_1_function_ids get_psci_0_1_function_ids(void); > + > #if defined(CONFIG_ARM_PSCI_FW) > int __init psci_dt_init(void); > #else > -- > 2.29.2.454.gaff20da3a2-goog > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel