@@ -1045,21 +1045,26 @@ enum iommu_veventq_flag {
1045
1045
* [0, INT_MAX] where the following index of INT_MAX is 0
1046
1046
*
1047
1047
* Each iommufd_vevent_header reports a sequence index of the following vEVENT:
1048
- * -------------------------------------------------------------------------
1048
+ *
1049
+ * +----------------------+-------+----------------------+-------+---+-------+
1049
1050
* | header0 {sequence=0} | data0 | header1 {sequence=1} | data1 |...| dataN |
1050
- * -------------------------------------------------------------------------
1051
+ * +----------------------+-------+----------------------+-------+---+-------+
1052
+ *
1051
1053
* And this sequence index is expected to be monotonic to the sequence index of
1052
1054
* the previous vEVENT. If two adjacent sequence indexes has a delta larger than
1053
1055
* 1, it means that delta - 1 number of vEVENTs has lost, e.g. two lost vEVENTs:
1054
- * -------------------------------------------------------------------------
1056
+ *
1057
+ * +-----+----------------------+-------+----------------------+-------+-----+
1055
1058
* | ... | header3 {sequence=3} | data3 | header6 {sequence=6} | data6 | ... |
1056
- * -------------------------------------------------------------------------
1059
+ * +-----+----------------------+-------+----------------------+-------+-----+
1060
+ *
1057
1061
* If a vEVENT lost at the tail of the vEVENTQ and there is no following vEVENT
1058
1062
* providing the next sequence index, an IOMMU_VEVENTQ_FLAG_LOST_EVENTS header
1059
1063
* would be added to the tail, and no data would follow this header:
1060
- * ---------------------------------------------------------------------------
1064
+ *
1065
+ * +--+----------------------+-------+-----------------------------------------+
1061
1066
* |..| header3 {sequence=3} | data3 | header4 {flags=LOST_EVENTS, sequence=4} |
1062
- * -- -------------------------------------------------------------------------
1067
+ * +--+ ----------------------+ -------+ -----------------------------------------+
1063
1068
*/
1064
1069
struct iommufd_vevent_header {
1065
1070
__u32 flags ;
@@ -1117,9 +1122,11 @@ struct iommu_vevent_arm_smmuv3 {
1117
1122
*
1118
1123
* Each vEVENT in a vEVENTQ encloses a struct iommufd_vevent_header followed by
1119
1124
* a type-specific data structure, in a normal case:
1120
- * -------------------------------------------------------------
1121
- * || header0 | data0 | header1 | data1 | ... | headerN | dataN ||
1122
- * -------------------------------------------------------------
1125
+ *
1126
+ * +-+---------+-------+---------+-------+-----+---------+-------+-+
1127
+ * | | header0 | data0 | header1 | data1 | ... | headerN | dataN | |
1128
+ * +-+---------+-------+---------+-------+-----+---------+-------+-+
1129
+ *
1123
1130
* unless a tailing IOMMU_VEVENTQ_FLAG_LOST_EVENTS header is logged (refer to
1124
1131
* struct iommufd_vevent_header).
1125
1132
*/
0 commit comments