Linux CXL
 help / color / mirror / Atom feed
From: Robert Richter <rrichter@amd.com>
To: Alison Schofield <alison.schofield@intel.com>
Cc: Vishal Verma <vishal.l.verma@intel.com>,
	Ira Weiny <ira.weiny@intel.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Jonathan Cameron <jonathan.cameron@huawei.com>,
	Dave Jiang <dave.jiang@intel.com>,
	Davidlohr Bueso <dave@stgolabs.net>,
	linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/5] Address translation for HDM decoding
Date: Thu, 11 Jul 2024 21:03:09 +0200	[thread overview]
Message-ID: <ZpAsbceUL-D7YJSR@rric.localdomain> (raw)
In-Reply-To: <Zo8hJm7y9VIwhiDk@aschofie-mobl2>

Alison,

On 10.07.24 17:02:46, Alison Schofield wrote:
> This HPA->SPA work needs to be done for addresses reported directly by
> devices, ie DPAs in poison and other events - right?

we need it to translate the base address of the HDM decoder cap
registers or the range registers to an HPA when accessing it.

> For the XOR case, we discover the need for HPA->SPA while parsing the
> CFMWS and add a cxl_hpa_to_spa_fn to the struct cxl_root_decoder. Later,

As some platforms allow an even more fine grained HPA/SPA mapping that
may devide a memory domain in separate SPA ranges we might just want
to move it directly into struct cxl_decoder so that endpoints or
switches can use it too.

> when the driver wants to translate a DPA (to include in a TRACE_EVENT)
> it uses that 'extra mile' HPA->SPA function.
> 
> See Patch 2 in this series:
> https://lore.kernel.org/cover.1719980933.git.alison.schofield@intel.com/T/#m9206e1f872ef252dbb54ce7f0365f0b267179fda
> 
> It seems the Zen4 extra mile is a simple offset from the base calc.
> Do you think a zen4 hpa->spa function will fit in with what I've done?

Thanks for the pointer, I will take look into the details here and try
to reuse most of that infrastructure.

> 
> FWIW I took this code for a spin through cxl-test on it's own and combined
> w the xor address tranlation patch set and no collisions, all humming along
> nicely (for non-zen config).

Thanks,

-Robert

  parent reply	other threads:[~2024-07-11 19:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-01 17:47 [PATCH v2 0/5] Address translation for HDM decoding Robert Richter
2024-07-01 17:47 ` [PATCH v2 1/5] cxl/hdm: Moving HDM specific code to core/hdm.c Robert Richter
2024-07-12  0:32   ` Dan Williams
2024-07-01 17:47 ` [PATCH v2 2/5] cxl/hdm: Implement address translation for HDM decoding Robert Richter
2024-07-12  1:03   ` Dan Williams
2024-07-13  7:40     ` Robert Richter
2024-07-01 17:47 ` [PATCH v2 3/5] cxl/acpi: Add platform flag for HPA address translation Robert Richter
2024-07-12  1:27   ` Dan Williams
2024-07-13  7:41     ` Robert Richter
2024-07-01 17:47 ` [PATCH v2 4/5] cxl/hdm: Setup HPA base for address translation using the HPA window in CFMWS Robert Richter
2024-07-01 17:47 ` [PATCH v2 5/5] cxl/acpi: Enable address translation for Zen4 platforms Robert Richter
2024-07-11  0:02 ` [PATCH v2 0/5] Address translation for HDM decoding Alison Schofield
2024-07-11  0:26   ` Alison Schofield
2024-07-11 19:03   ` Robert Richter [this message]
2024-07-25 22:00 ` Gregory Price
2024-08-06 10:54   ` Robert Richter
2024-08-16 18:32 ` Gregory Price

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZpAsbceUL-D7YJSR@rric.localdomain \
    --to=rrichter@amd.com \
    --cc=alison.schofield@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=ira.weiny@intel.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vishal.l.verma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox