From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: <ira.weiny@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>,
Davidlohr Bueso <dave@stgolabs.net>,
Bjorn Helgaas <helgaas@kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Alison Schofield <alison.schofield@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Dave Jiang <dave.jiang@intel.com>, <linux-kernel@vger.kernel.org>,
<linux-pci@vger.kernel.org>, <linux-acpi@vger.kernel.org>,
<linux-cxl@vger.kernel.org>
Subject: Re: [PATCH V4 3/9] cxl/mem: Wire up event interrupts
Date: Fri, 16 Dec 2022 18:42:15 +0000 [thread overview]
Message-ID: <20221216184215.000015dd@Huawei.com> (raw)
In-Reply-To: <20221216142438.00006588@Huawei.com>
On Fri, 16 Dec 2022 14:24:38 +0000
Jonathan Cameron <Jonathan.Cameron@Huawei.com> wrote:
> On Sun, 11 Dec 2022 23:06:21 -0800
> ira.weiny@intel.com wrote:
>
> > From: Davidlohr Bueso <dave@stgolabs.net>
> >
> > Currently the only CXL features targeted for irq support require their
> > message numbers to be within the first 16 entries. The device may
> > however support less than 16 entries depending on the support it
> > provides.
> >
> > Attempt to allocate these 16 irq vectors. If the device supports less
> > then the PCI infrastructure will allocate that number. Upon successful
> > allocation, users can plug in their respective isr at any point
> > thereafter.
> >
> > CXL device events are signaled via interrupts. Each event log may have
> > a different interrupt message number. These message numbers are
> > reported in the Get Event Interrupt Policy mailbox command.
> >
> > Add interrupt support for event logs. Interrupts are allocated as
> > shared interrupts. Therefore, all or some event logs can share the same
> > message number.
> >
> > In addition all logs are queried on any interrupt in order of the most
> > to least severe based on the status register.
> >
> > Cc: Bjorn Helgaas <helgaas@kernel.org>
> > Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Co-developed-by: Ira Weiny <ira.weiny@intel.com>
> > Signed-off-by: Ira Weiny <ira.weiny@intel.com>
> > Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
> >
>
> > +/**
> > + * Event Interrupt Policy
> > + *
> > + * CXL rev 3.0 section 8.2.9.2.4; Table 8-52
> > + */
> > +enum cxl_event_int_mode {
> > + CXL_INT_NONE = 0x00,
> > + CXL_INT_MSI_MSIX = 0x01,
> > + CXL_INT_FW = 0x02
> > +};
> > +struct cxl_event_interrupt_policy {
> > + u8 info_settings;
> > + u8 warn_settings;
> > + u8 failure_settings;
> > + u8 fatal_settings;
>
> This is an issue for your QEMU code which has this set at 5 bytes.
> Guess our handling of record lengths needs updating now we have two different
> spec versions to support and hence these can have multiple lengths.
>
> Btw, do you have an updated version of the QEMU patches you can share?
Note that I'm happy to take your QEMU series forwards, just don't want to duplicate
stuff you have already done!
Jonathan
> I was planning on just doing the AER type RAS stuff for the first pull this cycle
> but given this set means we never reach that code I probably need to do QEMU
> support for this and the stuff to support those all in one go - otherwise
> no one will be able to test it :) We rather optimistically have the OSC set
> to say the OS can have control of these, but upstream code doesn't emulate
> anything yet. Oops. Should have pretended the hardware was handling them
> until we had this support in place in QEMU.
>
> Jonathan
>
> > +} __packed;
> > +
> > /**
> > * struct cxl_event_state - Event log driver state
> > *
> > @@ -288,6 +305,8 @@ enum cxl_opcode {
> > CXL_MBOX_OP_RAW = CXL_MBOX_OP_INVALID,
> > CXL_MBOX_OP_GET_EVENT_RECORD = 0x0100,
> > CXL_MBOX_OP_CLEAR_EVENT_RECORD = 0x0101,
> > + CXL_MBOX_OP_GET_EVT_INT_POLICY = 0x0102,
> > + CXL_MBOX_OP_SET_EVT_INT_POLICY = 0x0103,
> > CXL_MBOX_OP_GET_FW_INFO = 0x0200,
> > CXL_MBOX_OP_ACTIVATE_FW = 0x0202,
> > CXL_MBOX_OP_GET_SUPPORTED_LOGS = 0x0400,
next prev parent reply other threads:[~2022-12-16 18:42 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-12 7:06 [PATCH V4 0/9] CXL: Process event logs ira.weiny
2022-12-12 7:06 ` [PATCH V4 1/9] PCI/CXL: Export native CXL error reporting control ira.weiny
2022-12-13 19:12 ` Dan Williams
2022-12-16 14:09 ` Jonathan Cameron
2023-01-05 3:16 ` Ira Weiny
2023-01-05 16:56 ` Bjorn Helgaas
2022-12-12 7:06 ` [PATCH V4 2/9] cxl/mem: Read, trace, and clear events on driver load ira.weiny
2022-12-13 6:49 ` johnny
2022-12-13 18:56 ` Ira Weiny
2022-12-16 15:39 ` Jonathan Cameron
2022-12-16 21:54 ` Ira Weiny
2022-12-17 16:38 ` Jonathan Cameron
2022-12-18 0:21 ` Ira Weiny
2022-12-18 15:52 ` Jonathan Cameron
2022-12-18 0:25 ` johnny
2022-12-18 15:55 ` Jonathan Cameron
2023-01-04 23:53 ` Ira Weiny
2022-12-12 7:06 ` [PATCH V4 3/9] cxl/mem: Wire up event interrupts ira.weiny
2022-12-13 20:15 ` Dan Williams
2022-12-16 14:24 ` Jonathan Cameron
2022-12-16 18:42 ` Jonathan Cameron [this message]
2022-12-16 21:28 ` Ira Weiny
2022-12-17 16:40 ` Jonathan Cameron
2022-12-16 18:21 ` Jonathan Cameron
2022-12-16 21:33 ` Ira Weiny
2022-12-17 16:43 ` Jonathan Cameron
2022-12-12 7:06 ` [PATCH V4 4/9] cxl/mem: Trace General Media Event Record ira.weiny
2022-12-12 7:06 ` [PATCH V4 5/9] cxl/mem: Trace DRAM " ira.weiny
2022-12-12 7:06 ` [PATCH V4 6/9] cxl/mem: Trace Memory Module " ira.weiny
2022-12-12 7:06 ` [PATCH V4 7/9] cxl/test: Add generic mock events ira.weiny
2022-12-12 7:06 ` [PATCH V4 8/9] cxl/test: Add specific events ira.weiny
2022-12-12 7:06 ` [PATCH V4 9/9] cxl/test: Simulate event log overflow ira.weiny
2022-12-16 12:25 ` [PATCH V4 0/9] CXL: Process event logs Jonathan Cameron
2022-12-16 17:01 ` Dan Williams
2022-12-16 18:15 ` Ira Weiny
2022-12-16 18:39 ` Jonathan Cameron
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=20221216184215.000015dd@Huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=alison.schofield@intel.com \
--cc=bhelgaas@google.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=helgaas@kernel.org \
--cc=ira.weiny@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=vishal.l.verma@intel.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