Linux CXL
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@stgolabs.net>
To: Jonathan.Cameron@huawei.com
Cc: alison.schofield@intel.com, ira.weiny@intel.com,
	dan.j.williams@intel.com, fan.ni@samsung.com,
	a.manzanares@samsung.com, dave@stgolabs.net,
	linux-cxl@vger.kernel.org
Subject: [PATCH -qemu rfc 0/3] hw/cxl: Add support for Scan Media
Date: Tue, 25 Apr 2023 19:14:15 -0700	[thread overview]
Message-ID: <20230426021418.10186-1-dave@stgolabs.net> (raw)

Hi,

The following is a very early rfc for supporting the rest of the Media an Poison
mailbox commands, extending what is currently there for background command support
and making use of the poison list infrastructure. The kernel is also pretty much
at the same point, for which the motivation of this series is to help aid any
incoming driver support. Similarly testing is 0 but sending this early hoping for
feedback to at least know if I'm going in the right direction while the kernel bits
are developed.

A few general notes:
 o I have no particular affinity to the values provided for media scan hinting times.
   Feel free to suggest new ones.
 
 o Scan Media will directly update the poison list, with its own special type,
   based on random values (number of new poison entries and actual dpa).
   
 o As with the current poison commands, this needs proper checking of input dpa
   ranges to: 1) ensure it fits within the actual address space of the device
   (ie: compare query_start/len to memdev's  mr->addr through cxl_dstate->mem_size
   ranges). And 2) ensure that the passed range does not span both ram and pmem
   devices, albeit unlikely for the qemu cases.

 o DRAM Event Logs are not generated for every new poisoned dpa. afaict we will
   need to have a scan media version of the qmp event error injection interface,
   as I don't see qmp being usable for scan media.
 
 o Getting the scan results inherits the current get poison list limitations,
   such as limited number of records, so only one call is necessary.

Series applies on top of Jonathan's 'cxl-2023-04-19' branch, which fyi has the
v1 version of the bg cmd support (required for this series), so will require
rebasing eventually:
	https://gitlab.com/jic23/qemu/-/tree/cxl-2023-04-19

Thanks!

Davidlohr Bueso (3):
  hw/cxl: Add get scan media capabilities mailbox command support
  hw/cxl: Add scan media mailbox command support
  hw/cxl: Add scan media mailbox command support

 hw/cxl/cxl-mailbox-utils.c  | 225 +++++++++++++++++++++++++++++++++++-
 hw/mem/cxl_type3.c          |   3 +
 include/hw/cxl/cxl_device.h |   8 ++
 3 files changed, 233 insertions(+), 3 deletions(-)

--
2.40.0


             reply	other threads:[~2023-04-26  2:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-26  2:14 Davidlohr Bueso [this message]
2023-04-26  2:14 ` [PATCH 1/3] hw/cxl: Add get scan media capabilities mailbox command support Davidlohr Bueso
2023-04-28 16:18   ` Fan Ni
2023-04-28 15:49     ` Davidlohr Bueso
2023-05-15 11:01   ` Jonathan Cameron
2023-04-26  2:14 ` [PATCH 2/3] hw/cxl: Add scan media " Davidlohr Bueso
2023-04-28 16:42   ` Fan Ni
2023-04-28 19:45     ` Davidlohr Bueso
2023-05-15 11:49   ` Jonathan Cameron
2023-04-26  2:14 ` [PATCH 3/3] " Davidlohr Bueso
2023-04-28 17:00   ` Fan Ni
2023-04-28 19:30     ` Davidlohr Bueso
2023-05-15 12:04   ` Jonathan Cameron
2023-04-26  2:16 ` [PATCH -qemu rfc 0/3] hw/cxl: Add support for Scan Media Davidlohr Bueso
2023-05-15 12:01 ` Jonathan Cameron

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=20230426021418.10186-1-dave@stgolabs.net \
    --to=dave@stgolabs.net \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=a.manzanares@samsung.com \
    --cc=alison.schofield@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=fan.ni@samsung.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    /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