From: "Fabio M. De Francesco" <fabio.m.de.francesco@linux.intel.com>
To: Robert Richter <rrichter@amd.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
Dave Jiang <dave.jiang@intel.com>,
Alison Schofield <alison.schofield@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
Dan Williams <dan.j.williams@intel.com>,
ming.li@zohomail.com, linux-kernel@vger.kernel.org,
linux-cxl@vger.kernel.org
Subject: Re: [PATCH 4/4 v3] cxl/test: Simulate an x86 Low Memory Hole for tests
Date: Wed, 26 Mar 2025 17:58:50 +0100 [thread overview]
Message-ID: <7393617.eO5KgaWL5Y@fdefranc-mobl3> (raw)
In-Reply-To: <Z91CgQjzXzKWNXPX@rric.localdomain>
[-- Attachment #1: Type: text/plain, Size: 2215 bytes --]
On Friday, March 21, 2025 11:42:09 AM Central European Standard Time Robert Richter wrote:
> On 14.03.25 12:36:33, Fabio M. De Francesco wrote:
> > Simulate an x86 Low Memory Hole for the CXL tests by changing the first
> > mock CFMWS range size to 768MB and the CXL Endpoint Decoder HPA range sizes
> > to 1GB.
> >
> > Since the auto-created region of cxl-test uses mock_cfmws[0], whose range
> > base address is typically different from the one published by the BIOS on
> > real hardware, the driver would fail to create and attach CXL Regions if
> > it was run on the mock environment created by cxl-tests.
> >
> > Therefore, save the mock_cfmsw[0] range base_hpa and reuse it to match CXL
> > Root Decoders and Regions with Endpoint Decoders when the driver is run on
> > mock devices.
> >
> > Since the auto-created region of cxl-test uses mock_cfmws[0], the
> > LMH path in the CXL Driver will be exercised every time the cxl-test
> > module is loaded. Executing unit test: cxl-topology.sh, confirms the
> > region created successfully with a LMH.
> >
> > Cc: Alison Schofield <alison.schofield@intel.com>
> > Cc: Dan Williams <dan.j.williams@intel.com>
> > Cc: Ira Weiny <ira.weiny@intel.com>
> > Signed-off-by: Fabio M. De Francesco <fabio.m.de.francesco@linux.intel.com>
> > ---
> > drivers/cxl/core/lmh.c | 35 ++++++++++++++++++++++++----
> > drivers/cxl/core/lmh.h | 2 ++
>
> Can you take a look to move all those changes to testing/? This
> indicates the interface of your mock functions need improvement.
>
> -Robert
>
> > tools/testing/cxl/cxl_core_exports.c | 2 ++
> > tools/testing/cxl/test/cxl.c | 10 ++++++++
> > 4 files changed, 45 insertions(+), 4 deletions(-)
>
Your comment is not very detailed but I think you are suggesting to
override the lmh functions in testing. If that is the case, I don't think
that any function which is exported from and also called by cxl-core
can be override by testing with the strong/weak mechanism.
But I'm not an expert of linker related topics and not even sure that I
understood what you suggested.
Would you please elaborate more?
Thanks,
Fabio
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2025-03-26 16:58 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-14 11:36 [PATCH 0/4 v3] cxl/core: Enable Region creation on x86 with Low Mem Hole Fabio M. De Francesco
2025-03-14 11:36 ` [PATCH 1/4 v3] cxl/core: Change match_*_by_range() calling convention Fabio M. De Francesco
2025-03-21 15:43 ` Dave Jiang
2025-03-14 11:36 ` [PATCH 2/4 v3] cxl/core: Add helpers to detect Low memory Holes on x86 Fabio M. De Francesco
2025-03-18 15:15 ` Ira Weiny
2025-03-21 10:21 ` Robert Richter
2025-03-26 16:47 ` Fabio M. De Francesco
2025-03-28 10:26 ` Robert Richter
2025-03-28 23:40 ` Dan Williams
2025-03-29 10:05 ` Fabio M. De Francesco
2025-03-14 11:36 ` [PATCH 3/4 v3] cxl/core: Enable Region creation on x86 with Low Memory Hole Fabio M. De Francesco
2025-03-18 20:35 ` Ira Weiny
2025-03-21 10:29 ` Robert Richter
2025-03-14 11:36 ` [PATCH 4/4 v3] cxl/test: Simulate an x86 Low Memory Hole for tests Fabio M. De Francesco
2025-03-18 21:16 ` Ira Weiny
2025-03-21 10:42 ` Robert Richter
2025-03-26 16:58 ` Fabio M. De Francesco [this message]
2025-03-28 10:52 ` Robert Richter
2025-03-28 23:40 ` Dan Williams
2025-03-29 10:16 ` Fabio M. De Francesco
2025-03-29 22:01 ` Fabio M. De Francesco
2025-04-03 4:00 ` Dan Williams
2025-03-20 1:46 ` [PATCH 0/4 v3] cxl/core: Enable Region creation on x86 with Low Mem Hole Alison Schofield
2025-03-26 16:23 ` Fabio M. De Francesco
2025-03-20 18:10 ` Alison Schofield
2025-03-26 16:24 ` Fabio M. De Francesco
2025-03-21 10:34 ` Robert Richter
2025-03-25 16:13 ` Fabio M. De Francesco
2025-03-28 9:02 ` Robert Richter
2025-03-28 21:10 ` Dave Jiang
2025-04-02 11:51 ` Robert Richter
2025-04-02 15:31 ` Dave Jiang
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=7393617.eO5KgaWL5Y@fdefranc-mobl3 \
--to=fabio.m.de.francesco@linux.intel.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=ming.li@zohomail.com \
--cc=rrichter@amd.com \
--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