Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4051206iog; Tue, 28 Jun 2022 08:04:47 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t/V7zQ3VxN1OKddnZNWoCssn33sbGklvjS/MKkGvJfDCYHUlMb0HKrtfHKIMWfScnrZWSf X-Received: by 2002:a62:5a81:0:b0:525:301a:1445 with SMTP id o123-20020a625a81000000b00525301a1445mr4087297pfb.53.1656428687567; Tue, 28 Jun 2022 08:04:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656428687; cv=none; d=google.com; s=arc-20160816; b=DWMZIB5c0mgsAWr/myAJwbyKe9edUqQ6r4t0CBgJ9wVM2ig172B2a7ouWSGL5/MBQJ EhHqwtI06AMq0eBpBCRtZzF0GFptuQ24f3cvm2HVzumc6IlX80x8VOkM+pJn6texdO0E lJLKUz5rT/dQQDfXapOfanDNrh+5A7Vhv7GdkjRX8z5Ut+xT5hND8MbLDcvVEHalc0pi pVD1HzZqF6XBDng5yALLWVN3p1BtcTq4MNTeCG1+jefXo8uJOvW6RJHeSfaf/CdeTpuk RWZzTf76mlZgBD7nSHnDDEH/9jgo0L5IEJwc9cinCIg7lrSlclwp+50JQKtz84cozhZN YT4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=Ov5c9T1OZr32ZPsoSUV5fttll62dZUMaPrkH0iwsnR8=; b=YoHGycQNHfucjbFGpJPXhVaka/5BVIbQDRI/+lxcoTD1h9vKIhZOil1V2IyXdnwJaF 2rQs/a4DGemaheNQn4y/77PWEvcuhSP9TQA00hv+N34W5YJex/VUTmdD5mqr2weAcxsL y0QXuyuxxOat5oaYSrsEad0OwdRclV/N5x+J2ME5Jd1rj39CKJaySV76sNDbcC18rBkH 16oK76JLYJPk6AdDs7hUr97OQM1Y672kWYhyz6FZQuPVnwWDt0znmzpA6Ux+jQfFhhcu Y3NmeE0x7nPy/ZpKS1qFYtvZ0adPnCX7cdg7+ZyScpEvGV1WWYj8/ld9ksbdN+ABJvM3 k1Gg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i62-20020a639d41000000b0040d5fd66d7csi21105924pgd.456.2022.06.28.08.04.30; Tue, 28 Jun 2022 08:04:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347280AbiF1PAL (ORCPT + 99 others); Tue, 28 Jun 2022 11:00:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346504AbiF1PAI (ORCPT ); Tue, 28 Jun 2022 11:00:08 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79B432B273; Tue, 28 Jun 2022 08:00:06 -0700 (PDT) Received: from fraeml734-chm.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4LXSMk5xCqz6H73l; Tue, 28 Jun 2022 22:56:02 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by fraeml734-chm.china.huawei.com (10.206.15.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 28 Jun 2022 17:00:04 +0200 Received: from localhost (10.202.226.42) 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.2375.24; Tue, 28 Jun 2022 16:00:03 +0100 Date: Tue, 28 Jun 2022 16:00:01 +0100 From: Jonathan Cameron To: CC: Dan Williams , Bjorn Helgaas , Lukas Wunner , Alison Schofield , Vishal Verma , "Dave Jiang" , Ben Widawsky , , , Subject: Re: [PATCH V12 9/9] cxl/port: Parse out DSMAS data from CDAT table Message-ID: <20220628160001.000021c5@Huawei.com> In-Reply-To: <20220628041527.742333-10-ira.weiny@intel.com> References: <20220628041527.742333-1-ira.weiny@intel.com> <20220628041527.742333-10-ira.weiny@intel.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.29; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.226.42] X-ClientProxiedBy: lhreml712-chm.china.huawei.com (10.201.108.63) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 27 Jun 2022 21:15:27 -0700 ira.weiny@intel.com wrote: > From: Ira Weiny > > CXL Ports with memory devices attached need the information from the > Device Scoped Memory Affinity Structure (DSMAS). This information is > contained within the CDAT table buffer which is cached in the port > device. > > If CDAT data is available, parse and cache DSMAS data from the table. > Store this data in unmarshaled struct dsmas data structures for ease of > use later. Ensure DSMAS headers are not malicious or ill formed so as > to cause buffer overflow errors. > > Signed-off-by: Ira Weiny > Looks good to me. Was kind of expecting yet another xarray :) Reviewed-by: Jonathan Cameron