From: Markus Armbruster <armbru@redhat.com>
To: Jonathan Cameron <Jonathan.Cameron@huawei.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,
"Ira Weiny" <ira.weiny@intel.com>,
"Michael Roth" <michael.roth@amd.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Dave Jiang" <dave.jiang@intel.com>,
"Daniel P . Berrangé" <berrange@redhat.com>,
"Eric Blake" <eblake@redhat.com>,
"Mike Maslenkin" <mike.maslenkin@gmail.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Thomas Huth" <thuth@redhat.com>
Subject: Re: [PATCH v7 5/7] hw/cxl/events: Add injection of General Media Events
Date: Fri, 26 May 2023 15:19:17 +0200 [thread overview]
Message-ID: <87353j9qne.fsf@pond.sub.org> (raw)
In-Reply-To: <20230522150947.11546-6-Jonathan.Cameron@huawei.com> (Jonathan Cameron's message of "Mon, 22 May 2023 16:09:45 +0100")
Jonathan Cameron <Jonathan.Cameron@huawei.com> writes:
> From: Ira Weiny <ira.weiny@intel.com>
>
> To facilitate testing provide a QMP command to inject a general media
> event. The event can be added to the log specified.
>
> Signed-off-by: Ira Weiny <ira.weiny@intel.com>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> ---
> v7: Various docs updates and field renames including a lot more
> specification references.
> ---
> qapi/cxl.json | 79 +++++++++++++++++++++++++
> include/hw/cxl/cxl_events.h | 20 +++++++
> hw/mem/cxl_type3.c | 111 ++++++++++++++++++++++++++++++++++++
> hw/mem/cxl_type3_stubs.c | 10 ++++
> 4 files changed, 220 insertions(+)
>
> diff --git a/qapi/cxl.json b/qapi/cxl.json
> index 4849fca776..7700e26a0d 100644
> --- a/qapi/cxl.json
> +++ b/qapi/cxl.json
> @@ -5,6 +5,85 @@
> # = CXL devices
> ##
>
> +##
> +# @CxlEventLog:
> +#
> +# CXL has a number of separate event logs for different types of
> +# events. Each such event log is handled and signaled independently.
Two spaces between sentences please, for consistency.
> +#
> +# @informational: Information Event Log
> +#
> +# @warning: Warning Event Log
> +#
> +# @failure: Failure Event Log
> +#
> +# @fatal: Fatal Event Log
> +#
> +# Since: 8.1
> +##
> +{ 'enum': 'CxlEventLog',
> + 'data': ['informational',
> + 'warning',
> + 'failure',
> + 'fatal']
> + }
> +
> +##
> +# @cxl-inject-general-media-event:
> +#
> +# Inject an event record for a General Media Event (CXL r3.0
> +# 8.2.9.2.1.1) This event type is reported via one of the event logs
Period at end of sentence, please:
# 8.2.9.2.1.1). This event type is reported via one of the event logs
> +# specified via the log parameter.
> +#
> +# @path: CXL type 3 device canonical QOM path
> +#
> +# @log: event log to add the event to
> +#
> +# @flags: Event Record Flags. See CXL r3.0 Table 8-42 Common Event
> +# Record Format, Event Record Flags for subfield definitions.
> +#
> +# @dpa: Device Physical Address (relative to @path device). Note lower
> +# bits include some flags. See CXL r3.0 Table 8-43 General Media
> +# Event Record, Physical Address.
> +#
> +# @descriptor: Memory Event Descriptor with additional memory
> +# event information. See CXL r3.0 Table 8-43 General
> +# Media Event Record, Memory Event Descriptor for bit
> +# definitions.
> +#
> +# @type: Type of memory event that occurred. See CXL r3.0 Table 8-43
> +# General Media Event Record, Memory Event Type for possible
> +# values.
> +#
> +# @transaction-type: Type of first transaction that caused the event
> +# to occur. See CXL r3.0 Table 8-43 General Media
> +# Event Record, Transaction Type for possible
> +# values.
> +#
> +# @channel: The channel of the memory event location. A channel is
> +# an interface that can be independently accessed for a
> +# transaction.
> +#
> +# @rank: The rank of the memory event location. A rank is a set of
> +# memory devices on a channel that together execute a
> +# transaction.
> +#
> +# @device: Bitmask that represents all devices in the rank associated
> +# with the memory event location.
> +#
> +# @component-id: Device specific component identifier for the event.
> +# May describe a field replaceable sub-component of
> +# the device.
Please format like
# @flags: Event Record Flags. See CXL r3.0 Table 8-42 Common Event
# Record Format, Event Record Flags for subfield definitions.
#
# @dpa: Device Physical Address (relative to @path device). Note
# lower bits include some flags. See CXL r3.0 Table 8-43 General
# Media Event Record, Physical Address.
#
# @descriptor: Memory Event Descriptor with additional memory event
# information. See CXL r3.0 Table 8-43 General Media Event
# Record, Memory Event Descriptor for bit definitions.
#
# @type: Type of memory event that occurred. See CXL r3.0 Table 8-43
# General Media Event Record, Memory Event Type for possible
# values.
#
# @transaction-type: Type of first transaction that caused the event
# to occur. See CXL r3.0 Table 8-43 General Media Event Record,
# Transaction Type for possible values.
#
# @channel: The channel of the memory event location. A channel is an
# interface that can be independently accessed for a transaction.
#
# @rank: The rank of the memory event location. A rank is a set of
# memory devices on a channel that together execute a transaction.
#
# @device: Bitmask that represents all devices in the rank associated
# with the memory event location.
#
# @component-id: Device specific component identifier for the event.
# May describe a field replaceable sub-component of the device.
to blend in with recent commit a937b6aa739 (qapi: Reformat doc comments
to conform to current conventions).
> +#
> +# Since: 8.1
> +##
> +{ 'command': 'cxl-inject-general-media-event',
> + 'data': { 'path': 'str', 'log': 'CxlEventLog', 'flags': 'uint8',
> + 'dpa': 'uint64', 'descriptor': 'uint8',
> + 'type': 'uint8', 'transaction-type': 'uint8',
> + '*channel': 'uint8', '*rank': 'uint8',
> + '*device': 'uint32', '*component-id': 'str' } }
> +
> ##
> # @cxl-inject-poison:
> #
With these tweaks
Acked-by: Markus Armbruster <armbru@redhat.com>
[...]
next prev parent reply other threads:[~2023-05-26 13:20 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-22 15:09 [PATCH v7 0/7] QEMU CXL Provide mock CXL events and irq support Jonathan Cameron
2023-05-22 15:09 ` Jonathan Cameron via
2023-05-22 15:09 ` [PATCH v7 1/7] hw/cxl/events: Add event status register Jonathan Cameron
2023-05-22 15:09 ` Jonathan Cameron via
2023-05-22 18:33 ` Fan Ni
2023-05-22 15:09 ` [PATCH v7 2/7] hw/cxl: Move CXLRetCode definition to cxl_device.h Jonathan Cameron
2023-05-22 15:09 ` Jonathan Cameron via
2023-05-22 18:38 ` Fan Ni
2023-05-22 15:09 ` [PATCH v7 3/7] hw/cxl/events: Wire up get/clear event mailbox commands Jonathan Cameron
2023-05-22 15:09 ` Jonathan Cameron via
2023-05-22 19:50 ` Fan Ni
2023-05-23 10:39 ` Jonathan Cameron
2023-05-23 10:39 ` Jonathan Cameron via
2023-05-23 14:26 ` Ira Weiny
2023-05-22 15:09 ` [PATCH v7 4/7] hw/cxl/events: Add event interrupt support Jonathan Cameron
2023-05-22 15:09 ` Jonathan Cameron via
2023-05-22 22:41 ` Fan Ni
2023-05-23 18:37 ` Davidlohr Bueso
2023-05-22 15:09 ` [PATCH v7 5/7] hw/cxl/events: Add injection of General Media Events Jonathan Cameron
2023-05-22 15:09 ` Jonathan Cameron via
2023-05-22 23:19 ` Fan Ni
2023-05-26 13:19 ` Markus Armbruster [this message]
2023-05-22 15:09 ` [PATCH v7 6/7] hw/cxl/events: Add injection of DRAM events Jonathan Cameron
2023-05-22 15:09 ` Jonathan Cameron via
2023-05-23 21:52 ` Fan Ni
2023-05-26 13:25 ` Markus Armbruster
2023-05-22 15:09 ` [PATCH v7 7/7] hw/cxl/events: Add injection of Memory Module Events Jonathan Cameron
2023-05-22 15:09 ` Jonathan Cameron via
2023-05-23 21:53 ` Fan Ni
2023-05-26 13:28 ` Markus Armbruster
2023-05-26 17:10 ` Jonathan Cameron
2023-05-26 17:10 ` Jonathan Cameron via
2023-05-26 20:32 ` Markus Armbruster
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=87353j9qne.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=berrange@redhat.com \
--cc=dave.jiang@intel.com \
--cc=eblake@redhat.com \
--cc=fan.ni@samsung.com \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=marcandre.lureau@redhat.com \
--cc=michael.roth@amd.com \
--cc=mike.maslenkin@gmail.com \
--cc=mst@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.