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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91CE0C48BEB for ; Thu, 15 Feb 2024 12:27:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 291E38D0006; Thu, 15 Feb 2024 07:27:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 240F68D0001; Thu, 15 Feb 2024 07:27:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 10A2E8D0006; Thu, 15 Feb 2024 07:27:03 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 028D08D0001 for ; Thu, 15 Feb 2024 07:27:02 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id C5A904052C for ; Thu, 15 Feb 2024 12:27:02 +0000 (UTC) X-FDA: 81793962684.13.5EBB91B Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by imf09.hostedemail.com (Postfix) with ESMTP id 9ED5A140005 for ; Thu, 15 Feb 2024 12:26:59 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=none; spf=pass (imf09.hostedemail.com: domain of jonathan.cameron@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708000020; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7RCHtYe0q3v3aIbi12frsg30ZTExvq4N4K5fn/CYiw4=; b=UpGdK7d2znqT3oCXuaf9MBoo75AScFwdgjQbw6sYWKQXC36JAcfbJ2dCCKW2RwDV3ywvEv rtQSH1KIjntMqdONj1br55R61K43nuOTVHu4xUE+W0PvocYqa2uJnEe3v4Y9vfDH+shtVO FH3s1Ii0ZCm1dr8eZkOYCWwpAulnpUU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708000020; a=rsa-sha256; cv=none; b=3lMeDOhZxYKYKE3oYCjbh5aiMk4HLepe8yu+mw/RnM3kNwBcVJlRueFMt7QyOr+T4gnpPZ lWSrTn2f+CxIhQ2hrEy9qu0+UhpVy+O7w2yZWBJPqQyYKjUOjJ97JG5HYpmzJC+FXrHXLN Ea4WFU5Jd8LGaVYTOCI62oC6WpYUbzI= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=none; spf=pass (imf09.hostedemail.com: domain of jonathan.cameron@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4TbDjp48H4z6897v; Thu, 15 Feb 2024 20:23:10 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id B1CFD140B55; Thu, 15 Feb 2024 20:26:54 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 15 Feb 2024 12:26:54 +0000 Date: Thu, 15 Feb 2024 12:26:53 +0000 From: Jonathan Cameron To: Srinivasulu Opensrc CC: "linux-cxl@vger.kernel.org" , "linux-mm@kvack.org" , "dan.j.williams@intel.com" , "john@jagalactic.com" , Eishan Mirakhur , Ajay Joshi , Ravis OpenSrc , Srinivasulu Thanneeru , "shiju.jose@huawei.com" Subject: Re: [EXT] Re: [PATCH] cxl/mbox: Add Get Log Capabilities, Clear Log and Get Supported Logs Sub-List commands Message-ID: <20240215122653.00005ce2@Huawei.com> In-Reply-To: <834c6fec2ed74f9da7643ee61843373d@micron.com> References: <20240207103634.199-1-sthanneeru.opensrc@micron.com> <20240208125713.00004776@Huawei.com> <834c6fec2ed74f9da7643ee61843373d@micron.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml500006.china.huawei.com (7.191.161.198) To lhrpeml500005.china.huawei.com (7.191.163.240) X-Stat-Signature: t4yychzbd6xq6rw9o8emuqkx7jh1zfyd X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 9ED5A140005 X-Rspam-User: X-HE-Tag: 1708000019-959436 X-HE-Meta: U2FsdGVkX1/Yi88hoZxMbL42hwGV3LwWe0XiPPmpbOeEWpM134uuMlvPPkW+4/G+nKXuW+8JUFX5/fXBzfeKYbYB2wZ8xfHUwW8Mctj6EjBEGw/SrP26HHmoz9u2YPhALFJ4TsJAEvbRBMY1UYAmGJx6tUdlBGRerWhD7VNUfjEdLhsWby6I8OTMCZLLIMbYsRQB4xBDuw65JgfLisb7zXbddAZ5VsGdvWNKYY3EErzm3o1ojYCnZDvkIq2vH8e872S/i/5wmGywOSW3FXl1xYI4X19JYOGGDjk2SrgCeQqPDfdMLOauaD2LfQmoGNb5sIPwAxnn5P/V8Y5Kg6pfzITMsOpyLn8GRGTmNyXYGMjRiK3l9gKUS9kyTvqTi4FmdRWc68HGfxKH4jOd2gzG5L96ad6oq9uf+gF6vuYnCHLYbkEB8ECUAFRsIHSSmrbUuFEpCtaKgq2yoGUZP03162LjgHaS0amCqop9A4TMG8vHJI3zxlE2qsjtFuI+3uRWZYfQFHP0Bq0MOICKO8KERcsDI1/WSevMcpRh6yPAruY6edmmhmrllPebfjU0bA2hvNczMz0AwEX894PIaGyoYUysXSaTvz7TVlOF42RLjbftlqgQr4202rSrLk4Ct2lHwemQI2cahsc+kjX5MAxJALh3/YNOPEkv+mE9N8Eh5HB94w5hybrf1u2/YRkzYl0gQHito+ybBLUXaM1zSvvXPGZaLB1dVRDgVY2xQzulPvL43Fly1qqnLx06o7qMMSKiGhiwIrr9ErFX3z31CW4fl2CEYsDkuJHMLhjcSF9he3lWAML8ljX1TaQrFPdK4EJ7EocQ/y9U01rAY1zMn7Ldw5dI0kzpu+xd2aeZ3fW3Nnk2i0HrZgIP3Vx+T+GmXEZD51Effi4Wb73oVd6KNhItLUe/hYUU6Q7YD95Z98sQkQ4= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Wed, 14 Feb 2024 16:09:01 +0000 Srinivasulu Opensrc wrote: > > -----Original Message----- > > From: Jonathan Cameron > > Sent: Thursday, February 8, 2024 6:27 PM > > To: Srinivasulu Opensrc > > Cc: linux-cxl@vger.kernel.org; linux-mm@kvack.org; > > dan.j.williams@intel.com; john@jagalactic.com; Eishan Mirakhur > > ; Ajay Joshi ; Ravis > > OpenSrc ; Srinivasulu Thanneeru > > ; shiju.jose@huawei.com > > Subject: [EXT] Re: [PATCH] cxl/mbox: Add Get Log Capabilities, Clear Log and > > Get Supported Logs Sub-List commands > > > > CAUTION: EXTERNAL EMAIL. Do not click links or open attachments unless > > you recognize the sender and were expecting this message. > > > > > > On Wed, 7 Feb 2024 16:06:34 +0530 > > wrote: > > > > > From: Srinivasulu Thanneeru > > > > > > Adding UAPI support for > > > 1. CXL r3.1 8.2.9.5.3 Get Log Capabilities. > > > 2. CXL r3.1 8.2.9.5.4 Clear Log commands. > > > 3. CXL r3.1 8.2.9.5.6 Get Supported Logs Sub-List. > > > > > > Signed-off-by: Srinivasulu Thanneeru > > > > Hi Srinivasulu, > > > > Whilst I can conjecture some valid reasons to expose these to > > userspace, can you add some examples to this patch description? > > > > We might want to filter the clear in particular to avoid a clash > > with the driver log handling. That is only allow it for vendor > > logs. > > Are you suggesting that I should restrict the "Vendor Debug Log" functionality to > only apply to Vendor logs.? Why not include Component State Dumps logs that > support the clear log feature? > > I might be overlooking something; please enlighten me. I had an old copy of the spec open. Indeed component state dumps should be safe to expose as well. > > For example, following both supports Clear log in our setups. > * 5e1819d9-11a9-400c-811f-d60719403d86 - Vendor Debug Log > * b3fab4cf-01b6-4332-943e-5e9962f23567 - Component State Dump Log > > > > > Perhaps split the patch into 2 parts. The less controversial > > GET_LOG_CAPS and GET_LOG_SUBLIST, followed by a patch for the > > destructive clear log. > > > > The memory scrub handling might well > > access the ECS log for example (I don't think the current proposal > > yet does this). > > > > Jonathan > > > > > > > --- > > > drivers/cxl/core/mbox.c | 3 +++ > > > drivers/cxl/cxlmem.h | 3 +++ > > > include/uapi/linux/cxl_mem.h | 3 +++ > > > 3 files changed, 9 insertions(+) > > > > > > diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c > > > index 27166a411705..64a44e286488 100644 > > > --- a/drivers/cxl/core/mbox.c > > > +++ b/drivers/cxl/core/mbox.c > > > @@ -64,6 +64,9 @@ static struct cxl_mem_command > > cxl_mem_commands[CXL_MEM_COMMAND_ID_MAX] = { > > > CXL_CMD(SET_SHUTDOWN_STATE, 0x1, 0, 0), > > > CXL_CMD(GET_SCAN_MEDIA_CAPS, 0x10, 0x4, 0), > > > CXL_CMD(GET_TIMESTAMP, 0, 0x8, 0), > > > + CXL_CMD(GET_LOG_CAPS, 0x10, 0x4, 0), > > > + CXL_CMD(CLEAR_LOG, 0x10, 0, 0), > > > + CXL_CMD(GET_LOG_SUBLIST, 0x2, CXL_VARIABLE_PAYLOAD, 0), > > > }; > > > > > > /* > > > diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h > > > index 5303d6942b88..4128c810051c 100644 > > > --- a/drivers/cxl/cxlmem.h > > > +++ b/drivers/cxl/cxlmem.h > > > @@ -529,6 +529,9 @@ enum cxl_opcode { > > > CXL_MBOX_OP_SET_TIMESTAMP = 0x0301, > > > CXL_MBOX_OP_GET_SUPPORTED_LOGS = 0x0400, > > > CXL_MBOX_OP_GET_LOG = 0x0401, > > > + CXL_MBOX_OP_GET_LOG_CAPS = 0x0402, > > > + CXL_MBOX_OP_CLEAR_LOG = 0x0403, > > > + CXL_MBOX_OP_GET_LOG_SUBLIST = 0x0405, > > > > Name should include something to make it clear this is getting > > sublist of 'supported' logs. Not the log. > > > > > CXL_MBOX_OP_IDENTIFY = 0x4000, > > > CXL_MBOX_OP_GET_PARTITION_INFO = 0x4100, > > > CXL_MBOX_OP_SET_PARTITION_INFO = 0x4101, > > > diff --git a/include/uapi/linux/cxl_mem.h b/include/uapi/linux/cxl_mem.h > > > index 42066f4eb890..d2df9782a5ef 100644 > > > --- a/include/uapi/linux/cxl_mem.h > > > +++ b/include/uapi/linux/cxl_mem.h > > > @@ -47,6 +47,9 @@ > > > ___DEPRECATED(SCAN_MEDIA, "Scan Media"), \ > > > ___DEPRECATED(GET_SCAN_MEDIA, "Get Scan Media Results"), \ > > > ___C(GET_TIMESTAMP, "Get Timestamp"), \ > > > + ___C(GET_LOG_CAPS, "Get Log Capabilities"), \ > > > + ___C(CLEAR_LOG, "Clear Log"), \ > > > + ___C(GET_LOG_SUBLIST, "Get Log Sublist"), \ > > > > Likewise, mention it's list of supported logs. > > > > > ___C(MAX, "invalid / last command") > > > > > > #define ___C(a, b) CXL_MEM_COMMAND_ID_##a >