1 /* SPDX-License-Identifier: MIT */ 2 /* 3 * Copyright © 2023-2025 Intel Corporation 4 */ 5 6 #ifndef _XE_SRIOV_PF_TYPES_H_ 7 #define _XE_SRIOV_PF_TYPES_H_ 8 9 #include <linux/mutex.h> 10 #include <linux/types.h> 11 12 #include "xe_sriov_pf_service_types.h" 13 14 /** 15 * struct xe_sriov_metadata - per-VF device level metadata 16 */ 17 struct xe_sriov_metadata { 18 /** @version: negotiated VF/PF ABI version */ 19 struct xe_sriov_pf_service_version version; 20 }; 21 22 /** 23 * struct xe_device_pf - Xe PF related data 24 * 25 * The data in this structure is valid only if driver is running in the 26 * @XE_SRIOV_MODE_PF mode. 27 */ 28 struct xe_device_pf { 29 /** @device_total_vfs: Maximum number of VFs supported by the device. */ 30 u16 device_total_vfs; 31 32 /** @driver_max_vfs: Maximum number of VFs supported by the driver. */ 33 u16 driver_max_vfs; 34 35 /** @master_lock: protects all VFs configurations across GTs */ 36 struct mutex master_lock; 37 38 /** @service: device level service data. */ 39 struct xe_sriov_pf_service service; 40 41 /** @vfs: metadata for all VFs. */ 42 struct xe_sriov_metadata *vfs; 43 }; 44 45 #endif 46