From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 759E212F5B1 for ; Mon, 26 Feb 2024 17:38:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708969113; cv=none; b=pqGpVc6i5/fX40YHJiDJfJSGBeus1faWFAyqFhhL4BAvHc4JuvlKoAg/DuGlCWI/SUxSU/kZkLBs/L1/4Iz7or/U67mqI58u2gRU0sjCJvIEyEpTr7DDzkU48nN1SpLyPgblNN/TiqfVQyGTB7fNk6KLrSs/IORlchearT/CKnk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708969113; c=relaxed/simple; bh=UnE6HLrtfpbuV1jXEBXL+VlgWJBmEqrt3Yh6UnMLnFw=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=QmC96nnp08gl2Tpvo8K81Ip0sXA/Hj5rVp6BdY2NB3DEFI711EBb0CFH1boR5KBRJhPAZtYEtCKHIUftJAcjcUrNT5KTCBWNbHjiyStGtX8XFkh1/zBqX73zpKig6ivtzvC4HZdsQJ2aGFAmEzydjzgdoJUh18ImX57E1UzgHQU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Tk75X5GlFz6K6Jk; Tue, 27 Feb 2024 01:34:08 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id E2185140A35; Tue, 27 Feb 2024 01:38:27 +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_256_GCM_SHA384) id 15.1.2507.35; Mon, 26 Feb 2024 17:38:27 +0000 Date: Mon, 26 Feb 2024 17:38:26 +0000 From: Jonathan Cameron To: CC: , , , , , , , , , Fan Ni Subject: Re: [PATCH v4 04/10] hw/mem/cxl_type3: Add support to create DC regions to type3 memory devices Message-ID: <20240226173826.00003dd8@Huawei.com> In-Reply-To: <20240221182020.1086096-5-nifan.cxl@gmail.com> References: <20240221182020.1086096-1-nifan.cxl@gmail.com> <20240221182020.1086096-5-nifan.cxl@gmail.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-cxl@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml500004.china.huawei.com (7.191.163.9) To lhrpeml500005.china.huawei.com (7.191.163.240) On Wed, 21 Feb 2024 10:15:57 -0800 nifan.cxl@gmail.com wrote: > From: Fan Ni > > With the change, when setting up memory for type3 memory device, we can > create DC regions. > A property 'num-dc-regions' is added to ct3_props to allow users to pass the > number of DC regions to create. To make it easier, other region parameters > like region base, length, and block size are hard coded. If needed, > these parameters can be added easily. > > With the change, we can create DC regions with proper kernel side > support like below: > > region=$(cat /sys/bus/cxl/devices/decoder0.0/create_dc_region) > echo $region > /sys/bus/cxl/devices/decoder0.0/create_dc_region > echo 256 > /sys/bus/cxl/devices/$region/interleave_granularity > echo 1 > /sys/bus/cxl/devices/$region/interleave_ways > > echo "dc0" >/sys/bus/cxl/devices/decoder2.0/mode > echo 0x40000000 >/sys/bus/cxl/devices/decoder2.0/dpa_size > > echo 0x40000000 > /sys/bus/cxl/devices/$region/size > echo "decoder2.0" > /sys/bus/cxl/devices/$region/target0 > echo 1 > /sys/bus/cxl/devices/$region/commit > echo $region > /sys/bus/cxl/drivers/cxl_region/bind > I'd be tempted to delete the rest of this description. > However, we cannot really read/write to the DC regions due to lack of "However, we cannot yet read/write ..." > 1. host backend and address space setup for DC regions; > 2. mailbox command support for adding/releasing DC extents. "This will be added later in the series." > > Signed-off-by: Fan Ni Without the above additions it sounds like this patch series only partly does the job :) A forwards reference is good, or just don't mention it. No guarantee of code doing anything useful, beyond not crashing at mid point of a series. Jonathan