From: Jonathan Cameron via <qemu-devel@nongnu.org>
To: <qemu-devel@nongnu.org>, Michael Tsirkin <mst@redhat.com>
Cc: Ben Widawsky <bwidawsk@kernel.org>, <linux-cxl@vger.kernel.org>,
<linuxarm@huawei.com>, Ira Weiny <ira.weiny@intel.com>,
Alison Schofield <alison.schofield@intel.com>
Subject: [RFC PATCH v2 0/3] hw/cxl: Poison get, inject, clear
Date: Wed, 1 Feb 2023 10:03:47 +0000 [thread overview]
Message-ID: <20230201100350.23263-1-Jonathan.Cameron@huawei.com> (raw)
RFC mostly because we already have 4 CXL QEMU series waiting for review
ahead of this and I don't want to distract too much from those.
I posted an RFC of part of this series a long time back [1]. It's been more
or less entirely rewriten since then and gained support for mailbox based
injection and clearing (including writing the cacheline). Note that I still
don't check for poison on direct reads of memory. That may be added in future
but isn't really that useful for testing the kernel code - it will end up
being the same as injecting a Machine Check or equivalent for the Host
Physical Address in question.
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)
4) Clearing of poison injected via either method.
The implementation is meant to be a valid combination of imdef 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).
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!
Tested against Alison's latest kernel patches.
https://lore.kernel.org/linux-cxl/cover.1674070170.git.alison.schofield@intel.com/
https://lore.kernel.org/linux-cxl/cover.1674101475.git.alison.schofield@intel.com/
and set timestamp patch
https://lore.kernel.org/linux-cxl/20230130151327.32415-1-Jonathan.Cameron@huawei.com/
[1] https://lore.kernel.org/linux-cxl/20220620162056.16790-1-Jonathan.Cameron@huawei.com/
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.
hw/cxl/cxl-mailbox-utils.c | 199 ++++++++++++++++++++++++++++++++++++
hw/mem/cxl_type3.c | 92 +++++++++++++++++
hw/mem/cxl_type3_stubs.c | 3 +
hw/mem/meson.build | 2 +
include/hw/cxl/cxl_device.h | 21 ++++
qapi/cxl.json | 11 ++
6 files changed, 328 insertions(+)
--
2.37.2
next reply other threads:[~2023-02-01 10:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-01 10:03 Jonathan Cameron via [this message]
2023-02-01 10:03 ` [RFC PATCH v2 1/3] hw/cxl: QMP based poison injection support Jonathan Cameron via
2023-02-01 12:14 ` Markus Armbruster
2023-02-01 14:45 ` Jonathan Cameron via
2023-02-01 16:10 ` Markus Armbruster
2023-02-01 10:03 ` [RFC PATCH v2 2/3] hw/cxl: Add poison injection via the mailbox Jonathan Cameron via
2023-02-01 10:03 ` [RFC PATCH v2 3/3] hw/cxl: Add clear poison mailbox command support Jonathan Cameron via
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=20230201100350.23263-1-Jonathan.Cameron@huawei.com \
--to=qemu-devel@nongnu.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=alison.schofield@intel.com \
--cc=bwidawsk@kernel.org \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=mst@redhat.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;
as well as URLs for NNTP newsgroup(s).