From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) (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 83B9C32E12F for ; Mon, 24 Nov 2025 20:10:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764015013; cv=none; b=q6Nd8fTJUrseJvZ5lMVcAE5ZOqp04UoXfsXr+I0T/ftzt3o0wb/Xl6RQcXAJhV1k2qa0+LZqdj5yWLzILVjGj/c2uvS2J9xFGp7QPI/bSWaxKvbKsq8chaWktSvmFwkWuhF533B16k70L0l2jhND0scomnDxmlo7S59BbGcP9uM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764015013; c=relaxed/simple; bh=U4J5LIhPhIUrlIYRlZLmOFMZ7NyIKg4gyAsCshxSUl4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GAGOHuGh+zS+wlD2qlLdIOfL7HtdVgxJNZbGryCAPTY02AiW6bbztHxXVCy1iorXp510yXF48n0yI4nVHu54bUg8jsj5/LItLYv85w+/FMcTmfED8szIAOam6jdLl6yOtOntQaosprLUPE3Fz1cqPsJxs5BWT4MAVWFHQrxhfkg= 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=fI6oKa8j; arc=none smtp.client-ip=209.85.219.42 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="fI6oKa8j" Received: by mail-qv1-f42.google.com with SMTP id 6a1803df08f44-88057f5d041so47522356d6.1 for ; Mon, 24 Nov 2025 12:10:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1764015010; x=1764619810; 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=j5XiJyosyzzMdsKAgW22rJ6x95wdGprLZ6ABeyQ0stk=; b=fI6oKa8jRYFeDkG9IgIn6sY1JyhKNIF7vpuzugWlfN4VUxCfX2y0k3zcZzmtXEXspN v5ZIbVzWctDfpN6+dTT4f0f9EYrFglQbr5ezXwt2seK8kpUCh6IqmYC+iw9zdXLKtqVy bV6wX5lIbmkpV1TTvf3zIeB8oJSNcaaMeeBIhEwnPliTPXcFaRMHoB0rxRip50I3k7Gd SrxZnO9Cqr/iVka9LAOPjtSXypN++BVP2n7nDk5uAaMWCU5iSHnyJ6qHtuR3KQygTOHZ F4leMjk+MvmIyqMLz7rTtZjeONcJpngNDVXCqVkPKTPXAnRpu1/MD4U0FxNFdIFjI290 j5WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764015010; x=1764619810; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=j5XiJyosyzzMdsKAgW22rJ6x95wdGprLZ6ABeyQ0stk=; b=MwYLR2xPExr3DRHxm7CC0mPF7u1/hqqE25pWo8H0mRKAr4pGHASc8Ei7XKRH1UjoTe 2TYbbNyzTSCo/HaST0674+4k2gzdDciA6ly0vKPOBMur1aYkggDlTT67ffnFd9HsHpGS zHQtZzY7sKLNHWuQY72Hkt/Q9bxzJyJ+7EernhigjW0fIQREawKPQjYjGJkK2Rtt4KeI L7seMeIzxRGy1D02qK0AS89X36nkdTN8YAtobyIruS3Mh4qGWXgQsndA8duvRxZioyhy Dp7Q+86Hr6dqfbF0HgTNjYJnS92HGp/T4DLb7GDib/I3xyV//6Dv0iBGCdI/rOONpE6n nGTA== X-Forwarded-Encrypted: i=1; AJvYcCWrUmxVRr6lWb2YERLSTyn6U+jKrPm3bMoewAypMfUHqYEI/V142a9Q6S3MSNuUJrIEX82yeO9bW4zF2J0=@vger.kernel.org X-Gm-Message-State: AOJu0YxFvyk/9UKV4dCvcr+TqcPx10aS25e84p0rJ1obBLOK+YA1IfwF /8Ly4djvBwnnyZ3LS+I6qOU/FiG0bvoal0TUNu/HDMRNC4CDOr7KXV+/eVVCixnorLs= X-Gm-Gg: ASbGncver6XXM62cPpHMIOhHvlpOEE4ZnvIAQclHsVym+GFFTyZ/1KuXH2ieT2Sd0nJ x6Oe7tk7ZWQK/Hd8b/k8tLHZs41rg5r748PWeXj1hLv2cRZm5QLMLRdRZadYF6v6G/KjPnIwG6Y 3SccuFia0hmIo208UGLQWFhrNNkEkQuVyZPjiodzUlM4wtt/Nw0yxG0YQKvQNKefZUV5MBSJ0t9 /YSFLqiUwZV+6+bkRwP2HikdzcfcQcCd+ZenHwltR6XwVdR+UB5ILP8BLACw3uXawB0cApKAZFl NPv274afOxxv28V4JjOdovUEwTccOsvWSHg6K+siqLnzJipZqi3jXfdKbFsYXTJ86v1UdQf4Kz1 pWBKCan8vcjFZ0gWVMpzqK/srFDzjPWl8suDUQYd43HOE2LH9mYuOS3+wdXiY4EUFJX9lIn/J1g cqQVG3ykY5MUmn2W08Ya86GxUWr5pdEhj553hEUo/37MOgi9PL/ZcQU01Mzb9uqdpFZq55v+3wN cXulvCA X-Google-Smtp-Source: AGHT+IH+mBew+wnxqNp4Sf/TKF7NiE8E4GunBikxiZbXLHLCi3YLBaZ7qmkG/PEwSArVFyFllI63hQ== X-Received: by 2002:a05:6214:450b:b0:880:4f97:d17b with SMTP id 6a1803df08f44-8863af15b00mr4041916d6.19.1764015010269; Mon, 24 Nov 2025 12:10:10 -0800 (PST) Received: from gourry-fedora-PF4VCD3F (pool-96-255-20-138.washdc.ftas.verizon.net. [96.255.20.138]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8846e54d13dsm106455586d6.35.2025.11.24.12.10.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Nov 2025 12:10:09 -0800 (PST) Date: Mon, 24 Nov 2025 15:10:07 -0500 From: Gregory Price To: Alison Schofield Cc: Robert Richter , 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 , Joshua Hahn Subject: Re: [PATCH v6 00/11] cxl: ACPI PRM Address Translation Support and AMD Zen5 enablement Message-ID: References: <20251114004021.1310661-1-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: On Sun, Nov 23, 2025 at 05:14:05PM -0800, Alison Schofield wrote: > On Mon, Nov 17, 2025 at 03:58:40PM +0100, Robert Richter wrote: > > On 14.11.25 12:01:29, Alison Schofield wrote: > > > > > Does this work 'as is', no changes required, to support DPA->SPA > > > (used in CXL Events) or SPA->DPA (used in poison by region offset)? > > > > The PRM handler could be used for to-SPA translations, but it might > > not fit well to other users such as profiling, tracing and error > > handling. Those users are executing in a critical path from a > > performance or stability point of view. Performing a firmware call > > could cause problems here. Since the to-DPA translation is missing > > too, a different approach to solve address translation might work > > better, such as examining the region parameters. The kernel's address > > translation library could possibly be extended and used too. That > > needs to be figured out. Also, my main focus for the patches is region > > enablement. > > If address translations are not supported/supportable, a quick exit > on any attempt (DPA->SPA or SPA->DPA) with this config seems needed. > > Better to fail and report ULLONG_MAX than leave open the possibility > of adding the wrong address to trace events or using the wrong address > in poison by region offset action. > > Maybe you already know that it fails gracefully? If so, then it comes > down to documenting the limitation. > IIRC the to_spa() function wouldn't be populated (will be NULL) if this is the case, so you wouldn't even be able to call the translation function. This was hit in a prior version of the set where I saw it fail on a system using System Address mode instead of Normalized Address mode. ~Gregory