From: Jonathan Cameron via <qemu-devel@nongnu.org>
To: Ira Weiny <ira.weiny@intel.com>
Cc: qemu-devel@nongnu.org, "Michael Tsirkin" <mst@redhat.com>,
"Fan Ni" <fan.ni@samsung.com>,
linux-cxl@vger.kernel.org, linuxarm@huawei.com,
"Alison Schofield" <alison.schofield@intel.com>,
"Michael Roth" <michael.roth@amd.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Dave Jiang" <dave.jiang@intel.com>,
"Markus Armbruster" <armbru@redhat.com>
Subject: Re: [PATCH v3 4/6] hw/cxl: QMP based poison injection support
Date: Fri, 3 Mar 2023 10:03:58 +0000 [thread overview]
Message-ID: <20230303100358.00007f66@Huawei.com> (raw)
In-Reply-To: <6401446d8d8dc_46c602942@iweiny-mobl.notmuch>
> > + memset(out, 0, out_pl_len);
> > + QLIST_FOREACH(ent, poison_list, node) {
> > + uint64_t start, stop;
> > +
> > + /* Check for no overlap */
> > + if (ent->start >= query_start + query_length ||
> > + ent->start + ent->length <= query_start) {
> > + continue;
> > + }
> > +
> > + /* Deal with overlap */
> > + start = MAX(ent->start & 0xffffffffffffffc0, query_start);
> > + stop = MIN((ent->start & 0xffffffffffffffc0) + ent->length,
> > + query_start + query_length);
> > + stq_le_p(&out->records[i].addr, start | (ent->type & 0x3));
>
> Shouldn't the mask here be 0x7? I see we have not define Vendor Specific
> which I think is good but maybe better to allow it here? I'm just not
> sure what is going to happen if someone comes along later and wants to
> use that value.
As things stand there is no way to inject a vendor defined poison entry
so expanding the mask has no affect. However, it'll be one less change needed
if we ever add that support to the qmp interface so I'll make the change
as I'm respinning for your other feedback.
Given we've not supported anything vendor defined yet, I'm not that bothered
about adding the qmp support any time soon ;)
+ where else can poison come from? It's either in the device or it's not
or it doesn't exist and was injected. I'll be interested to see the arguement
for another source unless vendor defined really means 'I don't know'.
Thanks for the review and eagle eyed register checking :)
Jonathan
next prev parent reply other threads:[~2023-03-03 10:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-02 10:17 [PATCH v3 0/6] hw/cxl: Poison get, inject, clear Jonathan Cameron via
2023-03-02 10:17 ` [PATCH v3 1/6] hw/cxl: rename mailbox return code type from ret_code to CXLRetCode Jonathan Cameron via
2023-03-02 10:17 ` [PATCH v3 2/6] hw/cxl: Introduce cxl_device_get_timestamp() utility function Jonathan Cameron via
2023-03-02 10:17 ` [PATCH v3 3/6] bswap: Add the ability to store to an unaligned 24 bit field Jonathan Cameron via
2023-03-02 10:17 ` [PATCH v3 4/6] hw/cxl: QMP based poison injection support Jonathan Cameron via
2023-03-03 0:50 ` Ira Weiny
2023-03-03 10:03 ` Jonathan Cameron via [this message]
2023-03-02 10:17 ` [PATCH v3 5/6] hw/cxl: Add poison injection via the mailbox Jonathan Cameron via
2023-03-03 0:52 ` Ira Weiny
2023-03-02 10:17 ` [PATCH v3 6/6] hw/cxl: Add clear poison mailbox command support Jonathan Cameron via
2023-03-03 1:05 ` Ira Weiny
2023-03-03 9:57 ` 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=20230303100358.00007f66@Huawei.com \
--to=qemu-devel@nongnu.org \
--cc=Jonathan.Cameron@Huawei.com \
--cc=alison.schofield@intel.com \
--cc=armbru@redhat.com \
--cc=dave.jiang@intel.com \
--cc=fan.ni@samsung.com \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=michael.roth@amd.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).