From: Jonathan Cameron via <qemu-devel@nongnu.org>
To: Dave Jiang <dave.jiang@intel.com>
Cc: qemu-devel@nongnu.org, "Michael Tsirkin" <mst@redhat.com>,
"Ben Widawsky" <bwidawsk@kernel.org>,
linux-cxl@vger.kernel.org, linuxarm@huawei.com,
"Ira Weiny" <ira.weiny@intel.com>,
"Gregory Price" <gourry.memverge@gmail.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Mike Maslenkin" <mike.maslenkin@gmail.com>,
"Markus Armbruster" <armbru@redhat.com>
Subject: Re: [PATCH v4 8/8] hw/mem/cxl_type3: Add CXL RAS Error Injection Support.
Date: Sun, 19 Feb 2023 15:25:27 +0000 [thread overview]
Message-ID: <20230219152527.00005c5f@huawei.com> (raw)
In-Reply-To: <b99089d3-d271-14c5-fb8d-c4f0437847cb@intel.com>
> > static void ct3d_reg_write(void *opaque, hwaddr offset, uint64_t value,
> > unsigned size)
> > {
> > @@ -341,6 +402,83 @@ static void ct3d_reg_write(void *opaque, hwaddr offset, uint64_t value,
> > should_commit = FIELD_EX32(value, CXL_HDM_DECODER0_CTRL, COMMIT);
> > which_hdm = 0;
> > break;
> > + case A_CXL_RAS_UNC_ERR_STATUS:
> > + {
> > + uint32_t capctrl = ldl_le_p(cache_mem + R_CXL_RAS_ERR_CAP_CTRL);
> > + uint32_t fe = FIELD_EX32(capctrl, CXL_RAS_ERR_CAP_CTRL, FIRST_ERROR_POINTER);
> > + CXLError *cxl_err;
> > + uint32_t unc_err;
> > +
> > + /*
> > + * If single bit written that corresponds to the first error
> > + * pointer being cleared, update the status and header log.
> > + */
> > + if (!QTAILQ_EMPTY(&ct3d->error_list)) {
> > + if ((1 << fe) ^ value) {
> > + CXLError *cxl_next;
> > + /*
> > + * Software is using wrong flow for multiple header recording
> > + * Following behaviour in PCIe r6.0 and assuming multiple
> > + * header support. Imdef choice to clear all matching records
>
> What does "Imdef" mean?
Good spot. Should have been Impdef, but there is no reason not to spell it out
as "Implementation defined".
What I'm trying to indicate here is that the PCIe r6.0 base specification lets
hardware do one of several different things. I picked one of those options.
In PCIe it's a little less critical than in CXL as there is an explicit opt in
so you can expect software to do the right thing. Unfortunately not so for
CXL where we have to assume the capability being there means the hardware will
do it. I guess there was no need for backwards compatibility for CXL.
Jonathan
>
> DJ
prev parent reply other threads:[~2023-02-19 15:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 17:29 [PATCH v4 0/8] hw/cxl: RAS error emulation and injection Jonathan Cameron via
2023-02-17 17:29 ` [PATCH v4 1/8] hw/pci/aer: Implement PCI_ERR_UNCOR_MASK register Jonathan Cameron via
2023-02-17 21:10 ` Dave Jiang
2023-02-17 17:29 ` [PATCH v4 2/8] hw/pci/aer: Add missing routing for AER errors Jonathan Cameron via
2023-02-17 21:16 ` Dave Jiang
2023-02-17 17:29 ` [PATCH v4 3/8] hw/pci-bridge/cxl_root_port: Wire up AER Jonathan Cameron via
2023-02-17 21:29 ` Dave Jiang
2023-02-17 17:29 ` [PATCH v4 4/8] hw/pci-bridge/cxl_root_port: Wire up MSI Jonathan Cameron via
2023-02-17 21:38 ` Dave Jiang
2023-02-17 17:29 ` [PATCH v4 5/8] hw/mem/cxl-type3: Add AER extended capability Jonathan Cameron via
2023-02-17 21:47 ` Dave Jiang
2023-02-17 17:29 ` [PATCH v4 6/8] hw/cxl: Fix endian issues in CXL RAS capability defaults / masks Jonathan Cameron via
2023-02-17 21:59 ` Dave Jiang
2023-02-17 17:29 ` [PATCH v4 7/8] hw/pci/aer: Make PCIE AER error injection facility available for other emulation to use Jonathan Cameron via
2023-02-17 22:00 ` Dave Jiang
2023-02-17 17:29 ` [PATCH v4 8/8] hw/mem/cxl_type3: Add CXL RAS Error Injection Support Jonathan Cameron via
2023-02-17 22:20 ` Dave Jiang
2023-02-19 15:25 ` Jonathan Cameron via [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=20230219152527.00005c5f@huawei.com \
--to=qemu-devel@nongnu.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=armbru@redhat.com \
--cc=bwidawsk@kernel.org \
--cc=dave.jiang@intel.com \
--cc=gourry.memverge@gmail.com \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=mike.maslenkin@gmail.com \
--cc=mst@redhat.com \
--cc=philmd@linaro.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;
as well as URLs for NNTP newsgroup(s).