1 /* SPDX-License-Identifier: MIT */ 2 /* 3 * Copyright © 2025 Intel Corporation 4 */ 5 6 #ifndef _XE_SRIOV_PF_PROVISION_H_ 7 #define _XE_SRIOV_PF_PROVISION_H_ 8 9 #include "xe_sriov_pf_provision_types.h" 10 11 struct xe_device; 12 13 int xe_sriov_pf_provision_vfs(struct xe_device *xe, unsigned int num_vfs); 14 int xe_sriov_pf_unprovision_vfs(struct xe_device *xe, unsigned int num_vfs); 15 16 int xe_sriov_pf_provision_set_mode(struct xe_device *xe, enum xe_sriov_provisioning_mode mode); 17 18 /** 19 * xe_sriov_pf_provision_set_custom_mode() - Change VFs provision mode to custom. 20 * @xe: the PF &xe_device 21 * 22 * This function can only be called on PF. 23 * 24 * Return: 0 on success or a negative error code on failure. 25 */ 26 static inline int xe_sriov_pf_provision_set_custom_mode(struct xe_device *xe) 27 { 28 return xe_sriov_pf_provision_set_mode(xe, XE_SRIOV_PROVISIONING_MODE_CUSTOM); 29 } 30 31 #endif 32