1 /* SPDX-License-Identifier: MIT */ 2 /* 3 * Copyright © 2025 Intel Corporation 4 */ 5 6 #ifndef _XE_SRIOV_PACKET_H_ 7 #define _XE_SRIOV_PACKET_H_ 8 9 #include <linux/types.h> 10 11 struct xe_device; 12 struct xe_sriov_packet; 13 enum xe_sriov_packet_type; 14 15 struct xe_sriov_packet *xe_sriov_packet_alloc(struct xe_device *xe); 16 void xe_sriov_packet_free(struct xe_sriov_packet *data); 17 18 int xe_sriov_packet_init(struct xe_sriov_packet *data, u8 tile_id, u8 gt_id, 19 enum xe_sriov_packet_type, loff_t offset, size_t size); 20 int xe_sriov_packet_init_from_hdr(struct xe_sriov_packet *data); 21 22 ssize_t xe_sriov_packet_read_single(struct xe_device *xe, unsigned int vfid, 23 char __user *buf, size_t len); 24 ssize_t xe_sriov_packet_write_single(struct xe_device *xe, unsigned int vfid, 25 const char __user *buf, size_t len); 26 int xe_sriov_packet_save_init(struct xe_device *xe, unsigned int vfid); 27 int xe_sriov_packet_process_descriptor(struct xe_device *xe, unsigned int vfid, 28 struct xe_sriov_packet *data); 29 30 #endif 31