Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp150854lqp; Thu, 4 Apr 2024 09:14:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXcU/xFnImZbFefkm3Jh/juQ0obt1JHHWNnhJz8S9/zFSJuApoJBMkvEjato0kS9nnd3BnNzdUQYb35YeFfEA2dDdvBTh5RbF56VQCL9A== X-Google-Smtp-Source: AGHT+IH46uLSDyuw/DWM8mGvWWra2XXfRzBv2i/PR1E96eqFKRG7Ez4iBDL3ALYTCwYacU/U/UlG X-Received: by 2002:a05:6214:4005:b0:699:26d6:d0ab with SMTP id kd5-20020a056214400500b0069926d6d0abmr3383656qvb.9.1712247245322; Thu, 04 Apr 2024 09:14:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712247245; cv=pass; d=google.com; s=arc-20160816; b=bEEgmBaIMGaH+FtbWAp99Xe4nm4Ee/HIf0Hdkq3K4jP+pSjH//6TDVnt+cAlLZEqAK DX1gsELqKkVKmHVd+IvBsBCyYDj6+lIp6dsImkDn0SXxB2M1LM/aqGIUWP+3tNQZJKly K4baAzQPrtNTOxcn3G/hz8gTzmNUOXMcPLhsqK7klPkqU6ZfcuuWH5XgvwrWQa1M1otZ qIo9iGlsg7jIyc7mq/xuGQ85HIbBcQWbayzJmRproTzstym4tySL14aVnh0wS+QvAxgi 7B+unRz5Sfi/Im6LECBYmUKcVpVYZkL7IX8vQBEEdlh7V1A3Ac+2cAWJo5nwUJftMJKg izVg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=S4EPI0ykhMYxusSqgAI8L/F+PYGjH+3Y2IaxvRA663k=; fh=oNisMWpEcvm2DtsgRWUV2Wser7pCk8sGpM8IY4kS9gA=; b=xqfT3AEf3QaNQG9wZC5qxCqIf0Tx7RSm2A5K+QRWa5cZxfpPK4Mg2hCu37B5Mf/a/l 84ZEVedXd67U8OosjVFOqeNwMlfJwClpF93ijv+IO776qkc3IsAWqyaluWHX1izhyiHZ a3HZ4uXhM6qWuHBABpKgYgdcZxyBqhcuu3MRxNbsAGMFhwopEv+dApQ6TrOUaqBQ8Kup Bdz0DPpV+Pyp4UgQTimqHyjibR4G/2YpF9e97BKkRhSEbcs7bCLdnl41YhSwHzfIMFb7 E1J8RlIiMO1zTwIUbr7hOx3pX1wrsDgpev7oPMk6xPmhiIij4cRvcvw1IG4VcoEoFCAS uLnQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-131798-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131798-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x14-20020a0cda0e000000b006992c5d554fsi3093325qvj.546.2024.04.04.09.14.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 09:14:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131798-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-131798-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131798-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0C2DA1C2196C for ; Thu, 4 Apr 2024 16:14:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A0D2A12BEAE; Thu, 4 Apr 2024 16:13:55 +0000 (UTC) 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 9FFCA1BC46; Thu, 4 Apr 2024 16:13:52 +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=1712247235; cv=none; b=NnyU0qL2jeLw3c1NMiOdFiqq2H4+AOzcC3mjP6sc3FtgxggkEi3XdIG1Z91zdAsz7BA1yT39WdHp3ixxoneYZG84J+UTCxMdLSCMp8MCAXYvc1NhFDgpL6mqeLfkoPJGCubTtiM9GfgpfvPty4P4ZG95kBq5KBr85WV8hURc6Jw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712247235; c=relaxed/simple; bh=smLC32iJuY0yye4WDyksXPgIINq4NnqEPI4ivboWM28=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=CzRHX+MjtEhfTvtLrsHb8qrpM28NZ3RDhq3C4iXaywAYj+h1xUHyerEz3CvYXKk8zwaHVecD9eeAvewlBFvptmNNpIr7GSK4scAckWR7N/7JKNRStl6xsu5XnboszZhi7GH2ACjahW8NmLqP1mwfVEj0+FeqH635Ss7IBtU4l1M= 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 4V9RPy0hFNz67kr9; Fri, 5 Apr 2024 00:09:10 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 74C58141546; Fri, 5 Apr 2024 00:13:49 +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; Thu, 4 Apr 2024 17:13:48 +0100 Date: Thu, 4 Apr 2024 17:13:48 +0100 From: Jonathan Cameron To: CC: Dave Jiang , Fan Ni , "Navneet Singh" , Dan Williams , Davidlohr Bueso , Alison Schofield , Vishal Verma , , , Subject: Re: [PATCH 14/26] cxl/region: Read existing extents on region creation Message-ID: <20240404171348.00001cd6@Huawei.com> In-Reply-To: <20240324-dcd-type2-upstream-v1-14-b7b00d623625@intel.com> References: <20240324-dcd-type2-upstream-v1-0-b7b00d623625@intel.com> <20240324-dcd-type2-upstream-v1-14-b7b00d623625@intel.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-kernel@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: lhrpeml100004.china.huawei.com (7.191.162.219) To lhrpeml500005.china.huawei.com (7.191.163.240) > +static bool cxl_dc_extent_in_ed(struct cxl_endpoint_decoder *cxled, > + struct cxl_dc_extent *extent) > +{ > + uint64_t start = le64_to_cpu(extent->start_dpa); > + uint64_t length = le64_to_cpu(extent->length); > + struct range ext_range = (struct range){ space ) { > + .start = start, > + .end = start + length - 1, > + }; > + struct range ed_range = (struct range) { > + .start = cxled->dpa_res->start, > + .end = cxled->dpa_res->end, > + };