Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
hw/cxl/events: Add event status register
The device status register block was defined. However, there were no individual registers nor any data wired up. Define the event status register [CXL 3.0; 8.2.8.3.1] as part of the device status register block. Wire up the register and initialize the event status for each log. To support CXL 3.0 the version of the device status register block needs to be 2. Change the macro to allow for setting the version. Signed-off-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Fan Ni <fan.ni@samsung.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Message-Id: <20230530133603.16934-2-Jonathan.Cameron@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
- Loading branch information
Showing
3 changed files
with
86 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| /* | ||
| * QEMU CXL Events | ||
| * | ||
| * Copyright (c) 2022 Intel | ||
| * | ||
| * This work is licensed under the terms of the GNU GPL, version 2. See the | ||
| * COPYING file in the top-level directory. | ||
| */ | ||
|
|
||
| #ifndef CXL_EVENTS_H | ||
| #define CXL_EVENTS_H | ||
|
|
||
| /* | ||
| * CXL rev 3.0 section 8.2.9.2.2; Table 8-49 | ||
| * | ||
| * Define these as the bit position for the event status register for ease of | ||
| * setting the status. | ||
| */ | ||
| typedef enum CXLEventLogType { | ||
| CXL_EVENT_TYPE_INFO = 0, | ||
| CXL_EVENT_TYPE_WARN = 1, | ||
| CXL_EVENT_TYPE_FAIL = 2, | ||
| CXL_EVENT_TYPE_FATAL = 3, | ||
| CXL_EVENT_TYPE_DYNAMIC_CAP = 4, | ||
| CXL_EVENT_TYPE_MAX | ||
| } CXLEventLogType; | ||
|
|
||
| #endif /* CXL_EVENTS_H */ |