1 /* SPDX-License-Identifier: MIT */ 2 /* 3 * Copyright © 2025 Intel Corporation 4 */ 5 6 #ifndef _XE_SRIOV_VF_CCS_TYPES_H_ 7 #define _XE_SRIOV_VF_CCS_TYPES_H_ 8 9 #include <linux/types.h> 10 11 #define for_each_ccs_rw_ctx(id__) \ 12 for ((id__) = 0; (id__) < XE_SRIOV_VF_CCS_CTX_COUNT; (id__)++) 13 14 enum xe_sriov_vf_ccs_rw_ctxs { 15 XE_SRIOV_VF_CCS_READ_CTX, 16 XE_SRIOV_VF_CCS_WRITE_CTX, 17 XE_SRIOV_VF_CCS_CTX_COUNT 18 }; 19 20 /** 21 * struct xe_sriov_vf_ccs_ctx - VF CCS migration context data. 22 */ 23 struct xe_sriov_vf_ccs_ctx { 24 /** @ctx_id: Id to which context it belongs to */ 25 enum xe_sriov_vf_ccs_rw_ctxs ctx_id; 26 27 /** @mig_q: exec queues used for migration */ 28 struct xe_exec_queue *mig_q; 29 30 /** @mem: memory data */ 31 struct { 32 /** @mem.ccs_bb_pool: Pool from which batch buffers are allocated. */ 33 struct xe_mem_pool *ccs_bb_pool; 34 } mem; 35 }; 36 37 /** 38 * struct xe_sriov_vf_ccs - The VF CCS migration support data. 39 */ 40 struct xe_sriov_vf_ccs { 41 /** @contexts: CCS read and write contexts for VF. */ 42 struct xe_sriov_vf_ccs_ctx contexts[XE_SRIOV_VF_CCS_CTX_COUNT]; 43 44 /** @initialized: Initialization of VF CCS is completed or not. */ 45 bool initialized; 46 }; 47 48 #endif 49