qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7 0/4] hw/cxl: Poison get, inject, clear
@ 2023-05-22 14:50 Jonathan Cameron via
  2023-05-22 14:50 ` [PATCH v7 1/4] bswap: Add the ability to store to an unaligned 24 bit field Jonathan Cameron via
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Jonathan Cameron via @ 2023-05-22 14:50 UTC (permalink / raw)
  To: qemu-devel, Michael Tsirkin, Fan Ni
  Cc: linux-cxl, linuxarm, Ira Weiny, Michael Roth,
	Philippe Mathieu-Daudé, Dave Jiang, Markus Armbruster,
	Daniel P . Berrangé, Eric Blake, Mike Maslenkin,
	Marc-André Lureau, Thomas Huth

Whilst the discussion on naming of the 24 bit bswap is perhaps ongoing, this
version makes the assumption that we'll keep it as originally proposed.
I'm rushing it out a little because I want to send the events series on
top of it so that I can get feedback on the updated docs.

v7:
- Dropped assert in 24 bit bswap
- Added regex to the loads-stores.rst doc
- Reformated the QMP as suggested by Markus
- Used define in place of bare 64.

Precursors now all upstream which make this email easier to write :)

The kernel support for Poison handling is now upstream.

This code has been very useful for testing and helped identify various
corner cases.

Updated cover letter.

The series supports:
1) Injection of variable length poison regions via QMP (to fake real
   memory corruption and ensure we deal with odd overflow corner cases
   such as clearing the middle of a large region making the list overflow
   as we go from one long entry to two smaller entries.
2) Read of poison list via the CXL mailbox.
3) Injection via the poison injection mailbox command (limited to 64 byte
   entries - spec constraint)
4) Clearing of poison injected via either method.

The implementation is meant to be a valid combination of impdef choices
based on what the spec allowed. There are a number of places where it could
be made more sophisticated that we might consider in future:
* Fusing adjacent poison entries if the types match.
* Separate injection list and main poison list, to test out limits on
  injected poison list being smaller than the main list.
* Poison list overflow event (needs event log support in general)
* Connecting up to the poison list error record generation (rather complex
  and not needed for currently kernel handling testing).
* Triggering the synchronous and asynchronous errors that occur on reads
  and writes of the memory when the host receives poison.

As the kernel code is currently fairly simple, it is likely that the above
does not yet matter but who knows what will turn up in future!


Ira Weiny (1):
  bswap: Add the ability to store to an unaligned 24 bit field

Jonathan Cameron (3):
  hw/cxl: QMP based poison injection support
  hw/cxl: Add poison injection via the mailbox.
  hw/cxl: Add clear poison mailbox command support.

 docs/devel/loads-stores.rst |   2 +
 qapi/cxl.json               |  21 ++++
 include/hw/cxl/cxl.h        |   1 +
 include/hw/cxl/cxl_device.h |  21 ++++
 include/qemu/bswap.h        |  25 +++++
 hw/cxl/cxl-mailbox-utils.c  | 214 ++++++++++++++++++++++++++++++++++++
 hw/mem/cxl_type3.c          |  93 ++++++++++++++++
 hw/mem/cxl_type3_stubs.c    |   6 +
 8 files changed, 383 insertions(+)

-- 
2.39.2



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-05-26 13:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-22 14:50 [PATCH v7 0/4] hw/cxl: Poison get, inject, clear Jonathan Cameron via
2023-05-22 14:50 ` [PATCH v7 1/4] bswap: Add the ability to store to an unaligned 24 bit field Jonathan Cameron via
2023-05-22 14:50 ` [PATCH v7 2/4] hw/cxl: QMP based poison injection support Jonathan Cameron via
2023-05-26 12:59   ` Markus Armbruster
2023-05-22 14:50 ` [PATCH v7 3/4] hw/cxl: Add poison injection via the mailbox Jonathan Cameron via
2023-05-22 14:50 ` [PATCH v7 4/4] hw/cxl: Add clear poison mailbox command support Jonathan Cameron via

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).