<feed xmlns='http://www.w3.org/2005/Atom'>
<title>laptop-kernel/include/linux/cxl-event.h, branch master</title>
<subtitle>Linux kernel tree for laptop</subtitle>
<id>https://git.zx2c4.com/laptop-kernel/atom/include/linux/cxl-event.h?h=master</id>
<link rel='self' href='https://git.zx2c4.com/laptop-kernel/atom/include/linux/cxl-event.h?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/'/>
<updated>2024-09-09T22:47:59Z</updated>
<entry>
<title>cxl: move cxl headers to new include/cxl/ directory</title>
<updated>2024-09-09T22:47:59Z</updated>
<author>
<name>Dave Jiang</name>
<email>dave.jiang@intel.com</email>
</author>
<published>2024-09-05T22:35:45Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=40a895fd9a358eea16901026360bd2cd3ca691a7'/>
<id>urn:sha1:40a895fd9a358eea16901026360bd2cd3ca691a7</id>
<content type='text'>
Group all cxl related kernel headers into include/cxl/ directory.

Reviewed-by: Alison Schofield &lt;alison.schofield@intel.com&gt;
Reviewed-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Link: https://patch.msgid.link/20240905223711.1990186-2-dave.jiang@intel.com
Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
</content>
</entry>
<entry>
<title>cxl/events: Use a common struct for DRAM and General Media events</title>
<updated>2024-07-02T19:52:25Z</updated>
<author>
<name>Fabio M. De Francesco</name>
<email>fabio.m.de.francesco@linux.intel.com</email>
</author>
<published>2024-06-07T14:43:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=675e979db473d08be346a3190c5f0db095a57153'/>
<id>urn:sha1:675e979db473d08be346a3190c5f0db095a57153</id>
<content type='text'>
cxl_event_common was an unfortunate naming choice and caused confusion with
the existing Common Event Record. Furthermore, its fields didn't map all
the common information between DRAM and General Media Events.

Remove cxl_event_common and introduce cxl_event_media_hdr to record common
information between DRAM and General Media events.

cxl_event_media_hdr, which is embedded in both cxl_event_gen_media and
cxl_event_dram, leverages the commonalities between the two events to
simplify their respective handling.

Suggested-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Reviewed-by: Alison Schofield &lt;alison.schofield@intel.com&gt;
Reviewed-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Reviewed-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Signed-off-by: Fabio M. De Francesco &lt;fabio.m.de.francesco@linux.intel.com&gt;
Reviewed-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Link: https://lore.kernel.org/r/20240607144423.48681-1-fabio.m.de.francesco@linux.intel.com
Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
</content>
</entry>
<entry>
<title>cxl/cper: Fix non-ACPI-APEI-GHES build</title>
<updated>2024-05-02T19:12:08Z</updated>
<author>
<name>Ira Weiny</name>
<email>ira.weiny@intel.com</email>
</author>
<published>2024-05-01T18:40:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=55111470b4416a6225abfdb4e1f0b8a8c8c52fdc'/>
<id>urn:sha1:55111470b4416a6225abfdb4e1f0b8a8c8c52fdc</id>
<content type='text'>
If ACPI_APEI_GHES is not configured the [un]register work functions are
not properly declared.

0day notices that the cxl_cper_register_work() declaration in the
CONFIG_ACPI_APEI_GHES=n is broken, fix it to be typical nop stub.

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Closes: http://lore.kernel.org/r/202405012230.6kXItWen-lkp@intel.com
Reviewed-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Link: https://lore.kernel.org/r/20240501-cper-fix-0day-v1-1-c0b0056eafbc@intel.com
Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'cxl/for-6.10/cper' into cxl-for-next</title>
<updated>2024-05-01T16:53:32Z</updated>
<author>
<name>Dave Jiang</name>
<email>dave.jiang@intel.com</email>
</author>
<published>2024-05-01T16:53:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=df2a8f4b444f92152a9e981d9b0eb0776130892a'/>
<id>urn:sha1:df2a8f4b444f92152a9e981d9b0eb0776130892a</id>
<content type='text'>
Add support to send CPER records to CXL for more detailed parsing.
</content>
</entry>
<entry>
<title>acpi/ghes: Process CXL Component Events</title>
<updated>2024-05-01T16:24:08Z</updated>
<author>
<name>Ira Weiny</name>
<email>ira.weiny@intel.com</email>
</author>
<published>2024-04-27T03:34:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=5e4a264bf8b55d5a1b4c8cd96ac10b99f98d7487'/>
<id>urn:sha1:5e4a264bf8b55d5a1b4c8cd96ac10b99f98d7487</id>
<content type='text'>
BIOS can configure memory devices as firmware first.  This will send CXL
events to the firmware instead of the OS.  The firmware can then inform
the OS of these events via UEFI.

UEFI v2.10 section N.2.14 defines a Common Platform Error Record (CPER)
format for CXL Component Events.  The format is mostly the same as the
CXL Common Event Record Format.  The difference lies in the use of a
GUID as the CPER Section Type which matches the UUID defined in CXL 3.1
Table 8-43.

Currently a configuration such as this will trace a non standard event
in the log omitting useful details of the event.  In addition the CXL
sub-system contains additional region and HPA information useful to the
user.[0]

The CXL code is required to be called from process context as it needs
to take a device lock.  The GHES code may be in interrupt context.  This
complicated the use of a callback.  Dan Williams suggested the use of
work items as an atomic way of switching between the callback execution
and a default handler.[1]

The use of a kfifo simplifies queue processing by providing lock free
fifo operations.  cxl_cper_kfifo_get() allows easier management of the
kfifo between the ghes and cxl modules.

CXL 3.1 Table 8-127 requires a device to have a queue depth of 1 for
each of the four event logs.  A combined queue depth of 32 is chosen to
provide room for 8 entries of each log type.

Add GHES support to detect CXL CPER records.  Add the ability for the
CXL sub-system to register a work queue to process the events.

This patch adds back the functionality which was removed to fix the
report by Dan Carpenter[2].

Cc: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Cc: Rafael J. Wysocki &lt;rafael@kernel.org&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Suggested-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Suggested-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Link: http://lore.kernel.org/r/cover.1711598777.git.alison.schofield@intel.com [0]
Link: http://lore.kernel.org/r/65d111eb87115_6c745294ac@dwillia2-xfh.jf.intel.com.notmuch [1]
Link: http://lore.kernel.org/r/b963c490-2c13-4b79-bbe7-34c6568423c7@moroto.mountain [2]
Reviewed-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Reviewed-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Reviewed-by: Tony Luck &lt;tony.luck@intel.com&gt;
Tested-by: Smita Koralahalli &lt;Smita.KoralahalliChannabasappa@amd.com&gt;
Link: https://lore.kernel.org/r/20240426-cxl-cper3-v4-1-58076cce1624@intel.com
Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'cxl/for-6.10/dpa-to-hpa' into cxl-for-next</title>
<updated>2024-04-30T20:45:43Z</updated>
<author>
<name>Dave Jiang</name>
<email>dave.jiang@intel.com</email>
</author>
<published>2024-04-30T20:45:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=660c0a8679e57e9147c27962605e8f94bd520b5e'/>
<id>urn:sha1:660c0a8679e57e9147c27962605e8f94bd520b5e</id>
<content type='text'>
Support for HPA to DPA translation for CXL events cxl_dram and
cxl_general_media.
</content>
</entry>
<entry>
<title>cxl/core: Add region info to cxl_general_media and cxl_dram events</title>
<updated>2024-04-30T19:24:44Z</updated>
<author>
<name>Alison Schofield</name>
<email>alison.schofield@intel.com</email>
</author>
<published>2024-04-30T17:28:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=6aec00139d3a83e2394d4bcb0084e872b4036e8f'/>
<id>urn:sha1:6aec00139d3a83e2394d4bcb0084e872b4036e8f</id>
<content type='text'>
User space may need to know which region, if any, maps the DPAs
(device physical addresses) reported in a cxl_general_media or
cxl_dram event. Since the mapping can change, the kernel provides
this information at the time the event occurs. This informs user
space that at event &lt;timestamp&gt; this &lt;region&gt; mapped this &lt;DPA&gt;
to this &lt;HPA&gt;.

Add the same region info that is included in the cxl_poison trace
event: the DPA-&gt;HPA translation, region name, and region uuid.

The new fields are inserted in the trace event and no existing
fields are modified. If the DPA is not mapped, user will see:
hpa=ULLONG_MAX, region="", and uuid=0

This work must be protected by dpa_rwsem &amp; region_rwsem since
it is looking up region mappings.

Signed-off-by: Alison Schofield &lt;alison.schofield@intel.com&gt;
Reviewed-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Reviewed-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Reviewed-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Link: https://lore.kernel.org/r/dd8d708b7a7ebfb64a27020a5eb338091336b34d.1714496730.git.alison.schofield@intel.com
Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
</content>
</entry>
<entry>
<title>cxl/cxl-event: include missing &lt;linux/types.h&gt; and &lt;linux/uuid.h&gt;</title>
<updated>2024-04-30T17:44:45Z</updated>
<author>
<name>Sangyun Kim</name>
<email>sangyun.kim@snu.ac.kr</email>
</author>
<published>2024-04-17T03:50:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=0e081a0ec04df58ac9caec1916ae6d9d048d50a7'/>
<id>urn:sha1:0e081a0ec04df58ac9caec1916ae6d9d048d50a7</id>
<content type='text'>
The linux/cxl-event.h header file uses the u8, u16, and uuid_t types,
but it doesn't include the necessary header files,
&lt;linux/types.h&gt; and &lt;linux/uuid.h&gt;.

Currently, cxl-event.h is only used by drivers/cxl/cxlmem.h,
and it doesn't cause any errors because cxlmem.h indirectly
includes the required types.

However, cxl-event.h may be used by other CXL-related code in the future,
so it's important to fix this issue by including the missing header files
directly in cxl-event.h.

Signed-off-by: Sangyun Kim &lt;sangyun.kim@snu.ac.kr&gt;
Reviewed-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Link: https://lore.kernel.org/r/20240417035043.2791431-1-sangyun.kim@snu.ac.kr
Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
</content>
</entry>
<entry>
<title>acpi/ghes: Remove CXL CPER notifications</title>
<updated>2024-02-21T06:50:52Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2024-02-18T22:28:57Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=f3e6b3ae9cfc128af11b665c6ef4022ba2683778'/>
<id>urn:sha1:f3e6b3ae9cfc128af11b665c6ef4022ba2683778</id>
<content type='text'>
Initial tests with the CXL CPER implementation identified that error
reports were being duplicated in the log and the trace event [1].  Then
it was discovered that the notification handler took sleeping locks
while the GHES event handling runs in spin_lock_irqsave() context [2]

While the duplicate reporting was fixed in v6.8-rc4, the fix for the
sleeping-lock-vs-atomic collision would enjoy more time to settle and
gain some test cycles.  Given how late it is in the development cycle,
remove the CXL hookup for now and try again during the next merge
window.

Note that end result is that v6.8 does not emit CXL CPER payloads to the
kernel log, but this is in line with the CXL trend to move error
reporting to trace events instead of the kernel log.

Cc: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Cc: Rafael J. Wysocki &lt;rafael@kernel.org&gt;
Cc: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Reviewed-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Link: http://lore.kernel.org/r/20240108165855.00002f5a@Huawei.com [1]
Closes: http://lore.kernel.org/r/b963c490-2c13-4b79-bbe7-34c6568423c7@moroto.mountain [2]
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>cxl/pci: Register for and process CPER events</title>
<updated>2024-01-09T23:41:23Z</updated>
<author>
<name>Ira Weiny</name>
<email>ira.weiny@intel.com</email>
</author>
<published>2023-12-21T00:17:36Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=dc97f6344f205b0dfa144e1b3e16d6dc05383d57'/>
<id>urn:sha1:dc97f6344f205b0dfa144e1b3e16d6dc05383d57</id>
<content type='text'>
If the firmware has configured CXL event support to be firmware first
the OS can process those events through CPER records.  The CXL layer has
unique DPA to HPA knowledge and standard event trace parsing in place.

CPER records contain Bus, Device, Function information which can be used
to identify the PCI device which is sending the event.

Change the PCI driver registration to include registration of a CXL
CPER callback to process events through the trace subsystem.

Use new scoped based management to simplify the handling of the PCI
device object.

Tested-by: Smita-Koralahalli &lt;Smita.KoralahalliChannabasappa@amd.com&gt;
Reviewed-by: Smita-Koralahalli &lt;Smita.KoralahalliChannabasappa@amd.com&gt;
Link: https://lore.kernel.org/r/20231220-cxl-cper-v5-9-1bb8a4ca2c7a@intel.com
Signed-off-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
[djbw: use new pci_dev guard, flip init order]
Reviewed-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Acked-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
</feed>
