Linux CXL
 help / color / mirror / Atom feed
From: Alison Schofield <alison.schofield@intel.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
	Jonathan Cameron <jonathan.cameron@huawei.com>,
	Dave Jiang <dave.jiang@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Ira Weiny <ira.weiny@intel.com>,
	linux-cxl@vger.kernel.org
Subject: Re: [PATCH] cxl/mbox: Check enabled_cmds before sending SET_SHUTDOWN_STATE
Date: Fri, 7 Feb 2025 13:19:38 -0800	[thread overview]
Message-ID: <Z6Z46ua77FuWRi_p@aschofie-mobl2.lan> (raw)
In-Reply-To: <67a667af363d5_2d2c29477@dwillia2-xfh.jf.intel.com.notmuch>

On Fri, Feb 07, 2025 at 12:06:07PM -0800, Dan Williams wrote:
> alison.schofield@ wrote:
> > From: Alison Schofield <alison.schofield@intel.com>
> > 
> > The CXL specification defines CXL_MBOX_OP_SET_SHUTDOWN_STATE as
> > optional. Check the enabled_cmds bitmap before sending to device.
> 
> Table 8-126 defines it as mandatory for devices that support PMEM, see
> the "PM" in the "Mailbox" column.
> 
> > This appeared with cxl-test where mock support for this command
> > is not present and -EIO is returned, leading to a WARN_ONCE()
> > stack trace and dev_warn()'s on every cxl_nvdimm_probe.
> 
> Davidlohr and I talked about this here:
> 
> http://lore.kernel.org/679430b145dc0_20fa2947b@dwillia2-xfh.jf.intel.com.notmuch
> 
> The plan was to follow up with mock device support... oh, that came in
> on Tuesday, I need to go take a look at that:
> 
> http://lore.kernel.org/20250205040842.1253616-1-dave@stgolabs.net

Ah, I see it now. I saw the GPF patch in cxl/next and didn't want
to dilly-dally! Should've dillied a bit.

I'll try out your cxl-test patch David.

--Alison


> 
> > Signed-off-by: Alison Schofield <alison.schofield@intel.com>
> > ---
> > 
> > Not sure what we actually want to do when not supported.
> > Most cmds just return 0, like I did here, but maybe for
> > this functionality something more is warranted.
> > 
> > wrt cxl-test support, also not sure if this feature wants some
> > round-trip testing support via cxl-test mocking. I do like the
> > -EIO from cxl-test as a loud reminder when running cxl-test 
> > that something new has come in that cxl-test doesn't know about.
> 
> Have a look at that follow-up series and see if it addresses the
> concerns.
> 

      reply	other threads:[~2025-02-07 21:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-07 19:34 [PATCH] cxl/mbox: Check enabled_cmds before sending SET_SHUTDOWN_STATE alison.schofield
2025-02-07 20:06 ` Dan Williams
2025-02-07 21:19   ` Alison Schofield [this message]

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=Z6Z46ua77FuWRi_p@aschofie-mobl2.lan \
    --to=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=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