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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B276C433F5 for ; Fri, 28 Jan 2022 17:29:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343584AbiA1R35 (ORCPT ); Fri, 28 Jan 2022 12:29:57 -0500 Received: from frasgout.his.huawei.com ([185.176.79.56]:4552 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343589AbiA1R3z (ORCPT ); Fri, 28 Jan 2022 12:29:55 -0500 Received: from fraeml715-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Jlkrn6SWfz67ydC; Sat, 29 Jan 2022 01:26:17 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by fraeml715-chm.china.huawei.com (10.206.15.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Fri, 28 Jan 2022 18:29:52 +0100 Received: from localhost (10.122.247.231) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Fri, 28 Jan 2022 17:29:51 +0000 Date: Fri, 28 Jan 2022 17:29:50 +0000 From: Jonathan Cameron To: , Marcel Apfelbaum , "Michael S . Tsirkin" , Igor Mammedov CC: , Ben Widawsky , Alex =?ISO-8859-1?Q?Benn=E9e?= , Peter Maydell , , "Shameerali Kolothum Thodi" , Philippe =?ISO-8859-1?Q?Mat?= =?ISO-8859-1?Q?hieu-Daud=E9?= , Saransh Gupta1 , Shreyas Shah , Chris Browy , Samarth Saxena , "Dan Williams" Subject: Re: [PATCH v4 27/42] hw/cxl/device: Implement get/set Label Storage Area (LSA) Message-ID: <20220128172950.00004ddc@huawei.com> In-Reply-To: <20220124171705.10432-28-Jonathan.Cameron@huawei.com> References: <20220124171705.10432-1-Jonathan.Cameron@huawei.com> <20220124171705.10432-28-Jonathan.Cameron@huawei.com> Organization: Huawei Technologies R&D (UK) Ltd. X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.29; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.122.247.231] X-ClientProxiedBy: lhreml740-chm.china.huawei.com (10.201.108.190) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org On Mon, 24 Jan 2022 17:16:50 +0000 Jonathan Cameron wrote: > From: Ben Widawsky > > Implement get and set handlers for the Label Storage Area > used to hold data describing persistent memory configuration > so that it can be ensured it is seen in the same configuration > after reboot. > > Signed-off-by: Ben Widawsky > Signed-off-by: Jonathan Cameron > --- > hw/cxl/cxl-mailbox-utils.c | 54 +++++++++++++++++++++++++++++++++++ > hw/mem/cxl_type3.c | 56 ++++++++++++++++++++++++++++++++++++- > include/hw/cxl/cxl_device.h | 5 ++++ > 3 files changed, 114 insertions(+), 1 deletion(-) > > diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-utils.c > index 4009152b7e..0df2a8492a 100644 > --- a/hw/cxl/cxl-mailbox-utils.c > +++ b/hw/cxl/cxl-mailbox-utils.c > @@ -55,6 +55,8 @@ enum { > #define MEMORY_DEVICE 0x0 > CCLS = 0x41, > #define GET_PARTITION_INFO 0x0 > + #define GET_LSA 0x2 > + #define SET_LSA 0x3 > }; > > /* 8.2.8.4.5.1 Command Return Codes */ > @@ -136,8 +138,11 @@ declare_mailbox_handler(LOGS_GET_SUPPORTED); > declare_mailbox_handler(LOGS_GET_LOG); > declare_mailbox_handler(IDENTIFY_MEMORY_DEVICE); > declare_mailbox_handler(CCLS_GET_PARTITION_INFO); > +declare_mailbox_handler(CCLS_GET_LSA); > +declare_mailbox_handler(CCLS_SET_LSA); > > #define IMMEDIATE_CONFIG_CHANGE (1 << 1) > +#define IMMEDIATE_DATA_CHANGE (1 << 1) Notice whilst reworking this code to drop the macro compexity. This should be (1 << 2) I think as it is bit 2 in the CEL. > #define IMMEDIATE_POLICY_CHANGE (1 << 3) > #define IMMEDIATE_LOG_CHANGE (1 << 4) >