/* SPDX-License-Identifier: MIT */ /* * Copyright © 2023 Intel Corporation */ #ifndef _XE_SRIOV_TYPES_H_ #define _XE_SRIOV_TYPES_H_ #include <linux/build_bug.h> #include <linux/mutex.h> #include <linux/types.h> /** * VFID - Virtual Function Identifier * @n: VF number * * Helper macro to represent Virtual Function (VF) Identifier. * VFID(0) is used as alias to the PFID that represents Physical Function. * * Note: According to PCI spec, SR-IOV VF's numbers are 1-based (VF1, VF2, ...). */ #define VFID(n) … #define PFID … /** * enum xe_sriov_mode - SR-IOV mode * @XE_SRIOV_MODE_NONE: bare-metal mode (non-virtualized) * @XE_SRIOV_MODE_PF: SR-IOV Physical Function (PF) mode * @XE_SRIOV_MODE_VF: SR-IOV Virtual Function (VF) mode */ enum xe_sriov_mode { … }; static_assert(…); /** * struct xe_device_pf - Xe PF related data * * The data in this structure is valid only if driver is running in the * @XE_SRIOV_MODE_PF mode. */ struct xe_device_pf { … }; #endif