From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C391E1A83E1 for ; Tue, 7 Jan 2025 23:09:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736291345; cv=none; b=VVqgb6J3VD8cR11/1ehhRhCF7sNkyTXXsFnwm27xhoz+oRiq+zfBahRKlgdd96NlvQybMNUt9dT2ohP2BJ7PtnP0IGh3/xss/h43NnTl3xf+m9R8IcTAaWXiBtnDbKo9vL2Awa4q9HsAOfUmZvzJKSV0HoddcWRD08rD3Gp7dpw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736291345; c=relaxed/simple; bh=PfkwO8faLiud7byrQVdjPYqIyxgxutA1/x5yQjedIEI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jnnkNqD9cUrb9alFawGOI9On12oVGvUnH82A7s0DgZLLt9yS9v7aEAPDWSfcZuRCYXcOP1FmS7u6MmJNG4WEph9+EaL3KeKna3ZDUw8jNFvrehz2uWomI7hbAf+k9kqL76OlWNTXMXkAVBjWdL7fNl1HiSBhL08pkcNbBOXct84= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net; spf=pass smtp.mailfrom=gourry.net; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b=tdilPgvC; arc=none smtp.client-ip=209.85.222.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gourry.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b="tdilPgvC" Received: by mail-qk1-f176.google.com with SMTP id af79cd13be357-7b6e9586b82so1316975485a.1 for ; Tue, 07 Jan 2025 15:09:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1736291343; x=1736896143; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=MOHJ8z+VZigiYhm0fJ16gfpWojOduZJ7KNV8uUz8tsE=; b=tdilPgvCacN5WLiCVkWtPFBvbad88Gx2Rd4yMhPhYODwmToK9Pa3wB7fH+RdhMD432 toRRNV4VqGxGOS7AiR8zlxUz3fuISmTldRntL6Vx2dBQ6wlxjLrv7v7QCaGGyHkJ27Bc lo1rrCVeGyEXNCddB8aKGYQA+CIeIe0IMZ10it9WdEGZ+y7Z4LvmSX02zBA3AwJ3Raq8 VT3dqW7t8AA5euoxWUeU6m0n3HZDCQuGL/OYqZc6zPwnyUFWGnduH37yOvuPuQCVHHzf yx9ROEOOKy2PzxMoghzSvITVibFQ9fnMQSOcemrY2lDFO6BJHAbzbyrtCICR5zkQ8moO GkFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736291343; x=1736896143; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=MOHJ8z+VZigiYhm0fJ16gfpWojOduZJ7KNV8uUz8tsE=; b=dcywHFRwMp1HYuXUHXwghrD+q1/iMskobHEPeT+oMj0h0nERNFosHXF9K2QCo6xziF Uw5wjd1d8XBFxj/D5TNh4ptOu6+2o8zRJKUenv/Ff6XLS8/5CXU9wRVT3FdgEXJZ86DI CzOcsUrccGVogdZp99tDlBUwxskMxi4LPAJp1a56KKr05Q6ObYL0BlbzFIbUYZku/+6p k1ZmPgDWp+jL5NsLZ3W1Xje6oS6SCC/vyTCGxNrVRUuL3wYxoYsZKSr1c3xhR4ZKFB9G K3K4af5xTwa11H/P+Fek0SFHy2ApuJ2AjWktl+ak9Mc9nOGiGBK22qDyWGHPYZJ8lUa7 gsGA== X-Forwarded-Encrypted: i=1; AJvYcCVUQ0kIrUuRa8oJ2/0J/8BMP9ksFxbW4AjXzrmtTrCXds2FeTaSpD2vcnudwxj0a3DWC5zq3gmmRO6l1Kk=@vger.kernel.org X-Gm-Message-State: AOJu0YxY7uTNnyfLp4hSwRyeKhLeT870IR3UtmOII+vcgs3QyNRFtkSL JO2ZH5zrhif5gJ9Q5BMJDAsB8DKTTgfffVe9Kkn4EzuZpUShkATN1yiUiigqh6s= X-Gm-Gg: ASbGnctIv6BtwVxLtmvarxnBQc4QW3kBRKud0NMh+6Ki0cBKE5sFADZog+ddWRmZa9p 1u7YkMt84FaYmUCl3CG8fa9iEaxwSwB2N8aeTSPLOqSvzvcV9LMrgLud3BZETEwzkpU+VWJtD5y zzKfRYRvTRRU41WSzqMVfwOTenyyOm6y2eS5RfyKPG7JFg9YTa1VtYeezC4BY6thX57iXlIlju8 SjIg54War3F6xutmxph8zlfdW4OV2fBFezAyLDTJEi5xyRidtPpqsTiQU2k2h0gds9L+40aIbLm AUS5Fh8xNeqwpZ/shJwfRlFqFkt9uqi1UxeXcQc= X-Google-Smtp-Source: AGHT+IG02fA/737ZKr+q7e3UvoDWLXu3b1yxK62LwgPWBnyY5//4sdFUZ5gsvVg7SZ7WrVD+qs6K7Q== X-Received: by 2002:a05:620a:2a08:b0:7b6:c92e:2e74 with SMTP id af79cd13be357-7bcd9709396mr93508785a.20.1736291342698; Tue, 07 Jan 2025 15:09:02 -0800 (PST) Received: from gourry-fedora-PF4VCD3F (pool-173-79-56-208.washdc.fios.verizon.net. [173.79.56.208]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7b9ac2bbfc5sm1628638485a.1.2025.01.07.15.09.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2025 15:09:01 -0800 (PST) Date: Tue, 7 Jan 2025 18:08:59 -0500 From: Gregory Price To: Robert Richter Cc: Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Jonathan Cameron , Dave Jiang , Davidlohr Bueso , linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org, "Fabio M. De Francesco" , Terry Bowman Subject: Re: [PATCH v1 22/29] cxl/region: Use translated HPA ranges to create a region Message-ID: References: <20250107141015.3367194-1-rrichter@amd.com> <20250107141015.3367194-23-rrichter@amd.com> 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-Disposition: inline In-Reply-To: <20250107141015.3367194-23-rrichter@amd.com> On Tue, Jan 07, 2025 at 03:10:08PM +0100, Robert Richter wrote: > To create a region, SPA ranges must be used. With address translation > the endpoint's HPA range is not the same as the SPA range. Use the > previously calculated SPA range instead. > > Signed-off-by: Robert Richter Patches 22-25 seem reliant on each other. Should I expect errors if I were to test them individually? The individual changes in 22-24 seem ok, but is spa->* expected to be correct in the absense of the PRMT translation functions when HPA==SPA? ~Gregory > --- > drivers/cxl/core/region.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c > index 681c26abc26e..e218f0be2409 100644 > --- a/drivers/cxl/core/region.c > +++ b/drivers/cxl/core/region.c > @@ -3424,7 +3424,7 @@ static struct cxl_region *construct_region(struct cxl_root_decoder *cxlrd, > { > struct cxl_memdev *cxlmd = cxled_to_memdev(cxled); > struct cxl_port *port = cxlrd_to_port(cxlrd); > - struct range *hpa = &cxled->cxld.hpa_range; > + struct range *spa = &cxled->spa_range; > struct cxl_region_params *p; > struct cxl_region *cxlr; > struct resource *res; > @@ -3462,7 +3462,7 @@ static struct cxl_region *construct_region(struct cxl_root_decoder *cxlrd, > goto err; > } > > - *res = DEFINE_RES_MEM_NAMED(hpa->start, range_len(hpa), > + *res = DEFINE_RES_MEM_NAMED(spa->start, range_len(spa), > dev_name(&cxlr->dev)); > rc = insert_resource(cxlrd->res, res); > if (rc) { > -- > 2.39.5 >