From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: Ira Weiny <ira.weiny@intel.com>
Cc: Michael Tsirkin <mst@redhat.com>,
Ben Widawsky <bwidawsk@kernel.org>, <qemu-devel@nongnu.org>,
<linux-cxl@vger.kernel.org>,
Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [PATCH v2 8/8] hw/cxl/events: Add in inject general media event
Date: Thu, 12 Jan 2023 15:34:51 +0000 [thread overview]
Message-ID: <20230112153451.00005fb4@huawei.com> (raw)
In-Reply-To: <20221221-ira-cxl-events-2022-11-17-v2-8-2ce2ecc06219@intel.com>
On Wed, 21 Dec 2022 20:24:38 -0800
Ira Weiny <ira.weiny@intel.com> wrote:
> 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>
Hi Ira,
One thing inline that kind of came out of Philippe's review of
the earlier cleanup patches.
>
> ---
> Changes from RFC:
> Add all fields for this event
> irq happens automatically when log transitions from 0 to 1
> ---
> hw/mem/cxl_type3.c | 93 +++++++++++++++++++++++++++++++++++++++++++++
> hw/mem/cxl_type3_stubs.c | 8 ++++
> include/hw/cxl/cxl_events.h | 20 ++++++++++
> qapi/cxl.json | 25 ++++++++++++
> 4 files changed, 146 insertions(+)
>
> diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c
> index a43949cab120..bedd09e500ba 100644
> --- a/hw/mem/cxl_type3.c
> +++ b/hw/mem/cxl_type3.c
> @@ -916,6 +916,99 @@ static CXLPoisonList *get_poison_list(CXLType3Dev *ct3d)
> return &ct3d->poison_list;
> }
>
> +static void cxl_assign_event_header(struct cxl_event_record_hdr *hdr,
> + QemuUUID *uuid, uint8_t flags,
make that const QemuUUID *uuid
and ...
> + uint8_t length)
> +{
> + hdr->flags[0] = flags;
> + hdr->length = length;
> + memcpy(&hdr->id, uuid, sizeof(hdr->id));
> + hdr->timestamp = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
> +}
> +
static const
> +QemuUUID gen_media_uuid = {
> + .data = UUID(0xfbcd0a77, 0xc260, 0x417f,
> + 0x85, 0xa9, 0x08, 0x8b, 0x16, 0x21, 0xeb, 0xa6),
> +};
WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron via <qemu-devel@nongnu.org>
To: Ira Weiny <ira.weiny@intel.com>
Cc: Michael Tsirkin <mst@redhat.com>,
Ben Widawsky <bwidawsk@kernel.org>, <qemu-devel@nongnu.org>,
<linux-cxl@vger.kernel.org>,
Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [PATCH v2 8/8] hw/cxl/events: Add in inject general media event
Date: Thu, 12 Jan 2023 15:34:51 +0000 [thread overview]
Message-ID: <20230112153451.00005fb4@huawei.com> (raw)
In-Reply-To: <20221221-ira-cxl-events-2022-11-17-v2-8-2ce2ecc06219@intel.com>
On Wed, 21 Dec 2022 20:24:38 -0800
Ira Weiny <ira.weiny@intel.com> wrote:
> 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>
Hi Ira,
One thing inline that kind of came out of Philippe's review of
the earlier cleanup patches.
>
> ---
> Changes from RFC:
> Add all fields for this event
> irq happens automatically when log transitions from 0 to 1
> ---
> hw/mem/cxl_type3.c | 93 +++++++++++++++++++++++++++++++++++++++++++++
> hw/mem/cxl_type3_stubs.c | 8 ++++
> include/hw/cxl/cxl_events.h | 20 ++++++++++
> qapi/cxl.json | 25 ++++++++++++
> 4 files changed, 146 insertions(+)
>
> diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c
> index a43949cab120..bedd09e500ba 100644
> --- a/hw/mem/cxl_type3.c
> +++ b/hw/mem/cxl_type3.c
> @@ -916,6 +916,99 @@ static CXLPoisonList *get_poison_list(CXLType3Dev *ct3d)
> return &ct3d->poison_list;
> }
>
> +static void cxl_assign_event_header(struct cxl_event_record_hdr *hdr,
> + QemuUUID *uuid, uint8_t flags,
make that const QemuUUID *uuid
and ...
> + uint8_t length)
> +{
> + hdr->flags[0] = flags;
> + hdr->length = length;
> + memcpy(&hdr->id, uuid, sizeof(hdr->id));
> + hdr->timestamp = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
> +}
> +
static const
> +QemuUUID gen_media_uuid = {
> + .data = UUID(0xfbcd0a77, 0xc260, 0x417f,
> + 0x85, 0xa9, 0x08, 0x8b, 0x16, 0x21, 0xeb, 0xa6),
> +};
next prev parent reply other threads:[~2023-01-12 15:44 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-22 4:24 [PATCH v2 0/8] QEMU CXL Provide mock CXL events and irq support Ira Weiny
2022-12-22 4:24 ` [PATCH v2 1/8] qemu/bswap: Add const_le64() Ira Weiny
2022-12-22 4:24 ` [PATCH v2 2/8] qemu/uuid: Add UUID static initializer Ira Weiny
2022-12-22 4:24 ` [PATCH v2 3/8] hw/cxl/mailbox: Use new UUID network order define for cel_uuid Ira Weiny
2023-01-03 16:30 ` Jonathan Cameron
2023-01-03 16:30 ` Jonathan Cameron via
2022-12-22 4:24 ` [PATCH v2 4/8] hw/cxl/events: Add event status register Ira Weiny
2023-01-03 16:36 ` Jonathan Cameron
2023-01-03 16:36 ` Jonathan Cameron via
2022-12-22 4:24 ` [PATCH v2 5/8] hw/cxl/events: Wire up get/clear event mailbox commands Ira Weiny
2023-01-04 18:07 ` Jonathan Cameron
2023-01-04 18:07 ` Jonathan Cameron via
2023-01-24 17:04 ` Jonathan Cameron
2023-01-24 17:04 ` Jonathan Cameron via
2022-12-22 4:24 ` [PATCH v2 6/8] hw/cxl/events: Add event interrupt support Ira Weiny
2022-12-22 4:24 ` [PATCH v2 7/8] bswap: Add the ability to store to an unaligned 24 bit field Ira Weiny
2023-01-03 17:14 ` Jonathan Cameron
2023-01-03 17:14 ` Jonathan Cameron via
2022-12-22 4:24 ` [PATCH v2 8/8] hw/cxl/events: Add in inject general media event Ira Weiny
2023-01-03 18:07 ` Jonathan Cameron
2023-01-03 18:07 ` Jonathan Cameron via
2023-01-09 19:15 ` Ira Weiny
2023-01-10 15:38 ` Jonathan Cameron
2023-01-10 15:38 ` Jonathan Cameron via
2023-01-11 14:05 ` Jonathan Cameron
2023-01-11 14:05 ` Jonathan Cameron via
2023-01-12 15:34 ` Jonathan Cameron [this message]
2023-01-12 15:34 ` 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=20230112153451.00005fb4@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=bwidawsk@kernel.org \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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 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.