mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 01:07:57 +00:00
hv: introduce SRIOV interception
VF_ENABLE is one field of SRIOV capability that is used to create or remove VF physical devices. If VF_ENABLE is set, hv can detect if the VF physical devices are ready after waiting 100 ms. v2: Add sanity check for writing NumVFs register, add precondition and application constraints when VF_ENABLE is set and refine code style. Tracked-On: #4433 Signed-off-by: Yuan Liu <yuan1.liu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -86,6 +86,7 @@
|
||||
#define PCIM_BAR_MEM_1MB 0x02U
|
||||
#define PCIM_BAR_MEM_64 0x04U
|
||||
#define PCIM_BAR_MEM_BASE 0xFFFFFFF0U
|
||||
#define PCIV_SUB_VENDOR_ID 0x2CU
|
||||
#define PCIR_CAP_PTR 0x34U
|
||||
#define PCIR_CAP_PTR_CARDBUS 0x14U
|
||||
#define PCI_BASE_ADDRESS_MEM_MASK (~0x0fUL)
|
||||
@@ -114,7 +115,12 @@
|
||||
|
||||
/* SRIOV Definitions */
|
||||
#define PCI_SRIOV_CAP_LEN 0x40U
|
||||
#define PCIR_SRIOV_CONTROL 0x8U
|
||||
#define PCIR_SRIOV_TOTAL_VFS 0xEU
|
||||
#define PCIR_SRIOV_NUMVFS 0x10U
|
||||
#define PCIR_SRIOV_FST_VF_OFF 0x14U
|
||||
#define PCIR_SRIOV_VF_STRIDE 0x16U
|
||||
#define PCIM_SRIOV_VF_ENABLE 0x1U
|
||||
|
||||
/* PCI Message Signalled Interrupts (MSI) */
|
||||
#define PCIR_MSI_CTRL 0x02U
|
||||
|
Reference in New Issue
Block a user