Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/linux
File: idxd.h
/* SPDX-License-Identifier: LGPL-2.1 WITH Linux-syscall-note */
[0] Fix | Delete
/* Copyright(c) 2019 Intel Corporation. All rights rsvd. */
[1] Fix | Delete
#ifndef _USR_IDXD_H_
[2] Fix | Delete
#define _USR_IDXD_H_
[3] Fix | Delete
[4] Fix | Delete
#include <stdint.h>
[5] Fix | Delete
[6] Fix | Delete
/* Driver command error status */
[7] Fix | Delete
enum idxd_scmd_stat {
[8] Fix | Delete
IDXD_SCMD_DEV_ENABLED = 0x80000010,
[9] Fix | Delete
IDXD_SCMD_DEV_NOT_ENABLED = 0x80000020,
[10] Fix | Delete
IDXD_SCMD_WQ_ENABLED = 0x80000021,
[11] Fix | Delete
IDXD_SCMD_DEV_DMA_ERR = 0x80020000,
[12] Fix | Delete
IDXD_SCMD_WQ_NO_GRP = 0x80030000,
[13] Fix | Delete
IDXD_SCMD_WQ_NO_NAME = 0x80040000,
[14] Fix | Delete
IDXD_SCMD_WQ_NO_SVM = 0x80050000,
[15] Fix | Delete
IDXD_SCMD_WQ_NO_THRESH = 0x80060000,
[16] Fix | Delete
IDXD_SCMD_WQ_PORTAL_ERR = 0x80070000,
[17] Fix | Delete
IDXD_SCMD_WQ_RES_ALLOC_ERR = 0x80080000,
[18] Fix | Delete
IDXD_SCMD_PERCPU_ERR = 0x80090000,
[19] Fix | Delete
IDXD_SCMD_DMA_CHAN_ERR = 0x800a0000,
[20] Fix | Delete
IDXD_SCMD_CDEV_ERR = 0x800b0000,
[21] Fix | Delete
IDXD_SCMD_WQ_NO_SWQ_SUPPORT = 0x800c0000,
[22] Fix | Delete
IDXD_SCMD_WQ_NONE_CONFIGURED = 0x800d0000,
[23] Fix | Delete
IDXD_SCMD_WQ_NO_SIZE = 0x800e0000,
[24] Fix | Delete
IDXD_SCMD_WQ_NO_PRIV = 0x800f0000,
[25] Fix | Delete
IDXD_SCMD_WQ_IRQ_ERR = 0x80100000,
[26] Fix | Delete
IDXD_SCMD_WQ_USER_NO_IOMMU = 0x80110000,
[27] Fix | Delete
};
[28] Fix | Delete
[29] Fix | Delete
#define IDXD_SCMD_SOFTERR_MASK 0x80000000
[30] Fix | Delete
#define IDXD_SCMD_SOFTERR_SHIFT 16
[31] Fix | Delete
[32] Fix | Delete
/* Descriptor flags */
[33] Fix | Delete
#define IDXD_OP_FLAG_FENCE 0x0001
[34] Fix | Delete
#define IDXD_OP_FLAG_BOF 0x0002
[35] Fix | Delete
#define IDXD_OP_FLAG_CRAV 0x0004
[36] Fix | Delete
#define IDXD_OP_FLAG_RCR 0x0008
[37] Fix | Delete
#define IDXD_OP_FLAG_RCI 0x0010
[38] Fix | Delete
#define IDXD_OP_FLAG_CRSTS 0x0020
[39] Fix | Delete
#define IDXD_OP_FLAG_CR 0x0080
[40] Fix | Delete
#define IDXD_OP_FLAG_CC 0x0100
[41] Fix | Delete
#define IDXD_OP_FLAG_ADDR1_TCS 0x0200
[42] Fix | Delete
#define IDXD_OP_FLAG_ADDR2_TCS 0x0400
[43] Fix | Delete
#define IDXD_OP_FLAG_ADDR3_TCS 0x0800
[44] Fix | Delete
#define IDXD_OP_FLAG_CR_TCS 0x1000
[45] Fix | Delete
#define IDXD_OP_FLAG_STORD 0x2000
[46] Fix | Delete
#define IDXD_OP_FLAG_DRDBK 0x4000
[47] Fix | Delete
#define IDXD_OP_FLAG_DSTS 0x8000
[48] Fix | Delete
[49] Fix | Delete
/* IAX */
[50] Fix | Delete
#define IDXD_OP_FLAG_RD_SRC2_AECS 0x010000
[51] Fix | Delete
#define IDXD_OP_FLAG_RD_SRC2_2ND 0x020000
[52] Fix | Delete
#define IDXD_OP_FLAG_WR_SRC2_AECS_COMP 0x040000
[53] Fix | Delete
#define IDXD_OP_FLAG_WR_SRC2_AECS_OVFL 0x080000
[54] Fix | Delete
#define IDXD_OP_FLAG_SRC2_STS 0x100000
[55] Fix | Delete
#define IDXD_OP_FLAG_CRC_RFC3720 0x200000
[56] Fix | Delete
[57] Fix | Delete
/* Opcode */
[58] Fix | Delete
enum dsa_opcode {
[59] Fix | Delete
DSA_OPCODE_NOOP = 0,
[60] Fix | Delete
DSA_OPCODE_BATCH,
[61] Fix | Delete
DSA_OPCODE_DRAIN,
[62] Fix | Delete
DSA_OPCODE_MEMMOVE,
[63] Fix | Delete
DSA_OPCODE_MEMFILL,
[64] Fix | Delete
DSA_OPCODE_COMPARE,
[65] Fix | Delete
DSA_OPCODE_COMPVAL,
[66] Fix | Delete
DSA_OPCODE_CR_DELTA,
[67] Fix | Delete
DSA_OPCODE_AP_DELTA,
[68] Fix | Delete
DSA_OPCODE_DUALCAST,
[69] Fix | Delete
DSA_OPCODE_CRCGEN = 0x10,
[70] Fix | Delete
DSA_OPCODE_COPY_CRC,
[71] Fix | Delete
DSA_OPCODE_DIF_CHECK,
[72] Fix | Delete
DSA_OPCODE_DIF_INS,
[73] Fix | Delete
DSA_OPCODE_DIF_STRP,
[74] Fix | Delete
DSA_OPCODE_DIF_UPDT,
[75] Fix | Delete
DSA_OPCODE_CFLUSH = 0x20,
[76] Fix | Delete
};
[77] Fix | Delete
[78] Fix | Delete
enum iax_opcode {
[79] Fix | Delete
IAX_OPCODE_NOOP = 0,
[80] Fix | Delete
IAX_OPCODE_DRAIN = 2,
[81] Fix | Delete
IAX_OPCODE_MEMMOVE,
[82] Fix | Delete
IAX_OPCODE_DECOMPRESS = 0x42,
[83] Fix | Delete
IAX_OPCODE_COMPRESS,
[84] Fix | Delete
IAX_OPCODE_CRC64,
[85] Fix | Delete
IAX_OPCODE_ZERO_DECOMP_32 = 0x48,
[86] Fix | Delete
IAX_OPCODE_ZERO_DECOMP_16,
[87] Fix | Delete
IAX_OPCODE_ZERO_COMP_32 = 0x4c,
[88] Fix | Delete
IAX_OPCODE_ZERO_COMP_16,
[89] Fix | Delete
IAX_OPCODE_SCAN = 0x50,
[90] Fix | Delete
IAX_OPCODE_SET_MEMBER,
[91] Fix | Delete
IAX_OPCODE_EXTRACT,
[92] Fix | Delete
IAX_OPCODE_SELECT,
[93] Fix | Delete
IAX_OPCODE_RLE_BURST,
[94] Fix | Delete
IAX_OPCODE_FIND_UNIQUE,
[95] Fix | Delete
IAX_OPCODE_EXPAND,
[96] Fix | Delete
};
[97] Fix | Delete
[98] Fix | Delete
/* Completion record status */
[99] Fix | Delete
enum dsa_completion_status {
[100] Fix | Delete
DSA_COMP_NONE = 0,
[101] Fix | Delete
DSA_COMP_SUCCESS,
[102] Fix | Delete
DSA_COMP_SUCCESS_PRED,
[103] Fix | Delete
DSA_COMP_PAGE_FAULT_NOBOF,
[104] Fix | Delete
DSA_COMP_PAGE_FAULT_IR,
[105] Fix | Delete
DSA_COMP_BATCH_FAIL,
[106] Fix | Delete
DSA_COMP_BATCH_PAGE_FAULT,
[107] Fix | Delete
DSA_COMP_DR_OFFSET_NOINC,
[108] Fix | Delete
DSA_COMP_DR_OFFSET_ERANGE,
[109] Fix | Delete
DSA_COMP_DIF_ERR,
[110] Fix | Delete
DSA_COMP_BAD_OPCODE = 0x10,
[111] Fix | Delete
DSA_COMP_INVALID_FLAGS,
[112] Fix | Delete
DSA_COMP_NOZERO_RESERVE,
[113] Fix | Delete
DSA_COMP_XFER_ERANGE,
[114] Fix | Delete
DSA_COMP_DESC_CNT_ERANGE,
[115] Fix | Delete
DSA_COMP_DR_ERANGE,
[116] Fix | Delete
DSA_COMP_OVERLAP_BUFFERS,
[117] Fix | Delete
DSA_COMP_DCAST_ERR,
[118] Fix | Delete
DSA_COMP_DESCLIST_ALIGN,
[119] Fix | Delete
DSA_COMP_INT_HANDLE_INVAL,
[120] Fix | Delete
DSA_COMP_CRA_XLAT,
[121] Fix | Delete
DSA_COMP_CRA_ALIGN,
[122] Fix | Delete
DSA_COMP_ADDR_ALIGN,
[123] Fix | Delete
DSA_COMP_PRIV_BAD,
[124] Fix | Delete
DSA_COMP_TRAFFIC_CLASS_CONF,
[125] Fix | Delete
DSA_COMP_PFAULT_RDBA,
[126] Fix | Delete
DSA_COMP_HW_ERR1,
[127] Fix | Delete
DSA_COMP_HW_ERR_DRB,
[128] Fix | Delete
DSA_COMP_TRANSLATION_FAIL,
[129] Fix | Delete
};
[130] Fix | Delete
[131] Fix | Delete
enum iax_completion_status {
[132] Fix | Delete
IAX_COMP_NONE = 0,
[133] Fix | Delete
IAX_COMP_SUCCESS,
[134] Fix | Delete
IAX_COMP_PAGE_FAULT_IR = 0x04,
[135] Fix | Delete
IAX_COMP_ANALYTICS_ERROR = 0x0a,
[136] Fix | Delete
IAX_COMP_OUTBUF_OVERFLOW,
[137] Fix | Delete
IAX_COMP_BAD_OPCODE = 0x10,
[138] Fix | Delete
IAX_COMP_INVALID_FLAGS,
[139] Fix | Delete
IAX_COMP_NOZERO_RESERVE,
[140] Fix | Delete
IAX_COMP_INVALID_SIZE,
[141] Fix | Delete
IAX_COMP_OVERLAP_BUFFERS = 0x16,
[142] Fix | Delete
IAX_COMP_INT_HANDLE_INVAL = 0x19,
[143] Fix | Delete
IAX_COMP_CRA_XLAT,
[144] Fix | Delete
IAX_COMP_CRA_ALIGN,
[145] Fix | Delete
IAX_COMP_ADDR_ALIGN,
[146] Fix | Delete
IAX_COMP_PRIV_BAD,
[147] Fix | Delete
IAX_COMP_TRAFFIC_CLASS_CONF,
[148] Fix | Delete
IAX_COMP_PFAULT_RDBA,
[149] Fix | Delete
IAX_COMP_HW_ERR1,
[150] Fix | Delete
IAX_COMP_HW_ERR_DRB,
[151] Fix | Delete
IAX_COMP_TRANSLATION_FAIL,
[152] Fix | Delete
IAX_COMP_PRS_TIMEOUT,
[153] Fix | Delete
IAX_COMP_WATCHDOG,
[154] Fix | Delete
IAX_COMP_INVALID_COMP_FLAG = 0x30,
[155] Fix | Delete
IAX_COMP_INVALID_FILTER_FLAG,
[156] Fix | Delete
IAX_COMP_INVALID_INPUT_SIZE,
[157] Fix | Delete
IAX_COMP_INVALID_NUM_ELEMS,
[158] Fix | Delete
IAX_COMP_INVALID_SRC1_WIDTH,
[159] Fix | Delete
IAX_COMP_INVALID_INVERT_OUT,
[160] Fix | Delete
};
[161] Fix | Delete
[162] Fix | Delete
#define DSA_COMP_STATUS_MASK 0x7f
[163] Fix | Delete
#define DSA_COMP_STATUS_WRITE 0x80
[164] Fix | Delete
[165] Fix | Delete
struct dsa_hw_desc {
[166] Fix | Delete
uint32_t pasid:20;
[167] Fix | Delete
uint32_t rsvd:11;
[168] Fix | Delete
uint32_t priv:1;
[169] Fix | Delete
uint32_t flags:24;
[170] Fix | Delete
uint32_t opcode:8;
[171] Fix | Delete
uint64_t completion_addr;
[172] Fix | Delete
union {
[173] Fix | Delete
uint64_t src_addr;
[174] Fix | Delete
uint64_t rdback_addr;
[175] Fix | Delete
uint64_t pattern;
[176] Fix | Delete
uint64_t desc_list_addr;
[177] Fix | Delete
};
[178] Fix | Delete
union {
[179] Fix | Delete
uint64_t dst_addr;
[180] Fix | Delete
uint64_t rdback_addr2;
[181] Fix | Delete
uint64_t src2_addr;
[182] Fix | Delete
uint64_t comp_pattern;
[183] Fix | Delete
};
[184] Fix | Delete
union {
[185] Fix | Delete
uint32_t xfer_size;
[186] Fix | Delete
uint32_t desc_count;
[187] Fix | Delete
};
[188] Fix | Delete
uint16_t int_handle;
[189] Fix | Delete
uint16_t rsvd1;
[190] Fix | Delete
union {
[191] Fix | Delete
uint8_t expected_res;
[192] Fix | Delete
/* create delta record */
[193] Fix | Delete
struct {
[194] Fix | Delete
uint64_t delta_addr;
[195] Fix | Delete
uint32_t max_delta_size;
[196] Fix | Delete
uint32_t delt_rsvd;
[197] Fix | Delete
uint8_t expected_res_mask;
[198] Fix | Delete
};
[199] Fix | Delete
uint32_t delta_rec_size;
[200] Fix | Delete
uint64_t dest2;
[201] Fix | Delete
/* CRC */
[202] Fix | Delete
struct {
[203] Fix | Delete
uint32_t crc_seed;
[204] Fix | Delete
uint32_t crc_rsvd;
[205] Fix | Delete
uint64_t seed_addr;
[206] Fix | Delete
};
[207] Fix | Delete
/* DIF check or strip */
[208] Fix | Delete
struct {
[209] Fix | Delete
uint8_t src_dif_flags;
[210] Fix | Delete
uint8_t dif_chk_res;
[211] Fix | Delete
uint8_t dif_chk_flags;
[212] Fix | Delete
uint8_t dif_chk_res2[5];
[213] Fix | Delete
uint32_t chk_ref_tag_seed;
[214] Fix | Delete
uint16_t chk_app_tag_mask;
[215] Fix | Delete
uint16_t chk_app_tag_seed;
[216] Fix | Delete
};
[217] Fix | Delete
/* DIF insert */
[218] Fix | Delete
struct {
[219] Fix | Delete
uint8_t dif_ins_res;
[220] Fix | Delete
uint8_t dest_dif_flag;
[221] Fix | Delete
uint8_t dif_ins_flags;
[222] Fix | Delete
uint8_t dif_ins_res2[13];
[223] Fix | Delete
uint32_t ins_ref_tag_seed;
[224] Fix | Delete
uint16_t ins_app_tag_mask;
[225] Fix | Delete
uint16_t ins_app_tag_seed;
[226] Fix | Delete
};
[227] Fix | Delete
/* DIF update */
[228] Fix | Delete
struct {
[229] Fix | Delete
uint8_t src_upd_flags;
[230] Fix | Delete
uint8_t upd_dest_flags;
[231] Fix | Delete
uint8_t dif_upd_flags;
[232] Fix | Delete
uint8_t dif_upd_res[5];
[233] Fix | Delete
uint32_t src_ref_tag_seed;
[234] Fix | Delete
uint16_t src_app_tag_mask;
[235] Fix | Delete
uint16_t src_app_tag_seed;
[236] Fix | Delete
uint32_t dest_ref_tag_seed;
[237] Fix | Delete
uint16_t dest_app_tag_mask;
[238] Fix | Delete
uint16_t dest_app_tag_seed;
[239] Fix | Delete
};
[240] Fix | Delete
[241] Fix | Delete
uint8_t op_specific[24];
[242] Fix | Delete
};
[243] Fix | Delete
} __attribute__((packed));
[244] Fix | Delete
[245] Fix | Delete
struct iax_hw_desc {
[246] Fix | Delete
uint32_t pasid:20;
[247] Fix | Delete
uint32_t rsvd:11;
[248] Fix | Delete
uint32_t priv:1;
[249] Fix | Delete
uint32_t flags:24;
[250] Fix | Delete
uint32_t opcode:8;
[251] Fix | Delete
uint64_t completion_addr;
[252] Fix | Delete
uint64_t src1_addr;
[253] Fix | Delete
uint64_t dst_addr;
[254] Fix | Delete
uint32_t src1_size;
[255] Fix | Delete
uint16_t int_handle;
[256] Fix | Delete
union {
[257] Fix | Delete
uint16_t compr_flags;
[258] Fix | Delete
uint16_t decompr_flags;
[259] Fix | Delete
};
[260] Fix | Delete
uint64_t src2_addr;
[261] Fix | Delete
uint32_t max_dst_size;
[262] Fix | Delete
uint32_t src2_size;
[263] Fix | Delete
uint32_t filter_flags;
[264] Fix | Delete
uint32_t num_inputs;
[265] Fix | Delete
} __attribute__((packed));
[266] Fix | Delete
[267] Fix | Delete
struct dsa_raw_desc {
[268] Fix | Delete
uint64_t field[8];
[269] Fix | Delete
} __attribute__((packed));
[270] Fix | Delete
[271] Fix | Delete
/*
[272] Fix | Delete
* The status field will be modified by hardware, therefore it should be
[273] Fix | Delete
* __volatile__ and prevent the compiler from optimize the read.
[274] Fix | Delete
*/
[275] Fix | Delete
struct dsa_completion_record {
[276] Fix | Delete
__volatile__ uint8_t status;
[277] Fix | Delete
union {
[278] Fix | Delete
uint8_t result;
[279] Fix | Delete
uint8_t dif_status;
[280] Fix | Delete
};
[281] Fix | Delete
uint16_t rsvd;
[282] Fix | Delete
uint32_t bytes_completed;
[283] Fix | Delete
uint64_t fault_addr;
[284] Fix | Delete
union {
[285] Fix | Delete
/* common record */
[286] Fix | Delete
struct {
[287] Fix | Delete
uint32_t invalid_flags:24;
[288] Fix | Delete
uint32_t rsvd2:8;
[289] Fix | Delete
};
[290] Fix | Delete
[291] Fix | Delete
uint32_t delta_rec_size;
[292] Fix | Delete
uint64_t crc_val;
[293] Fix | Delete
[294] Fix | Delete
/* DIF check & strip */
[295] Fix | Delete
struct {
[296] Fix | Delete
uint32_t dif_chk_ref_tag;
[297] Fix | Delete
uint16_t dif_chk_app_tag_mask;
[298] Fix | Delete
uint16_t dif_chk_app_tag;
[299] Fix | Delete
};
[300] Fix | Delete
[301] Fix | Delete
/* DIF insert */
[302] Fix | Delete
struct {
[303] Fix | Delete
uint64_t dif_ins_res;
[304] Fix | Delete
uint32_t dif_ins_ref_tag;
[305] Fix | Delete
uint16_t dif_ins_app_tag_mask;
[306] Fix | Delete
uint16_t dif_ins_app_tag;
[307] Fix | Delete
};
[308] Fix | Delete
[309] Fix | Delete
/* DIF update */
[310] Fix | Delete
struct {
[311] Fix | Delete
uint32_t dif_upd_src_ref_tag;
[312] Fix | Delete
uint16_t dif_upd_src_app_tag_mask;
[313] Fix | Delete
uint16_t dif_upd_src_app_tag;
[314] Fix | Delete
uint32_t dif_upd_dest_ref_tag;
[315] Fix | Delete
uint16_t dif_upd_dest_app_tag_mask;
[316] Fix | Delete
uint16_t dif_upd_dest_app_tag;
[317] Fix | Delete
};
[318] Fix | Delete
[319] Fix | Delete
uint8_t op_specific[16];
[320] Fix | Delete
};
[321] Fix | Delete
} __attribute__((packed));
[322] Fix | Delete
[323] Fix | Delete
struct dsa_raw_completion_record {
[324] Fix | Delete
uint64_t field[4];
[325] Fix | Delete
} __attribute__((packed));
[326] Fix | Delete
[327] Fix | Delete
struct iax_completion_record {
[328] Fix | Delete
__volatile__ uint8_t status;
[329] Fix | Delete
uint8_t error_code;
[330] Fix | Delete
uint16_t rsvd;
[331] Fix | Delete
uint32_t bytes_completed;
[332] Fix | Delete
uint64_t fault_addr;
[333] Fix | Delete
uint32_t invalid_flags;
[334] Fix | Delete
uint32_t rsvd2;
[335] Fix | Delete
uint32_t output_size;
[336] Fix | Delete
uint8_t output_bits;
[337] Fix | Delete
uint8_t rsvd3;
[338] Fix | Delete
uint16_t xor_csum;
[339] Fix | Delete
uint32_t crc;
[340] Fix | Delete
uint32_t min;
[341] Fix | Delete
uint32_t max;
[342] Fix | Delete
uint32_t sum;
[343] Fix | Delete
uint64_t rsvd4[2];
[344] Fix | Delete
} __attribute__((packed));
[345] Fix | Delete
[346] Fix | Delete
struct iax_raw_completion_record {
[347] Fix | Delete
uint64_t field[8];
[348] Fix | Delete
} __attribute__((packed));
[349] Fix | Delete
[350] Fix | Delete
#endif
[351] Fix | Delete
[352] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function