[SWDEV-462952] Options enabled for GPU passthrough scenarios
Added Dynamic Passthrough detection Signed-off-by: Pham, Gabriel <Gabriel.Pham@amd.com> Signed-off-by: Arif, Maisam <Maisam.Arif@amd.com> Co-authored-by: Arif, Maisam <Maisam.Arif@amd.com>
This commit is contained in:
@@ -1680,6 +1680,17 @@ typedef struct {
|
||||
uint64_t reserved[15];
|
||||
} amdsmi_topology_nearest_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief This structure contains information about passthrough mode in guest systems.
|
||||
*/
|
||||
typedef struct {
|
||||
uint32_t device_id;
|
||||
uint32_t rev_id;
|
||||
uint32_t vendor_id;
|
||||
uint64_t ids_flags;
|
||||
} amdsmi_passthrough_info_t;
|
||||
|
||||
//! Place-holder "variant" for functions that have don't have any variants,
|
||||
//! but do have monitors or sensors.
|
||||
#define AMDSMI_DEFAULT_VARIANT 0xFFFFFFFFFFFFFFFF
|
||||
@@ -5321,6 +5332,10 @@ amdsmi_get_link_topology_nearest(amdsmi_processor_handle processor_handle,
|
||||
amdsmi_link_type_t link_type,
|
||||
amdsmi_topology_nearest_t* topology_nearest_info);
|
||||
|
||||
amdsmi_status_t
|
||||
amdsmi_get_gpu_passthrough_info(amdsmi_processor_handle processor_handle,
|
||||
amdsmi_passthrough_info_t* info);
|
||||
|
||||
#ifdef ENABLE_ESMI_LIB
|
||||
/*****************************************************************************/
|
||||
/** @defgroup energyinfo Energy information (RAPL MSR)
|
||||
|
||||
@@ -730,6 +730,18 @@ struct drm_amdgpu_cs_chunk_data {
|
||||
*/
|
||||
#define AMDGPU_IDS_FLAGS_FUSION 0x1
|
||||
#define AMDGPU_IDS_FLAGS_PREEMPTION 0x2
|
||||
#define AMDGPU_IDS_FLAGS_TMZ 0x4
|
||||
#define AMDGPU_IDS_FLAGS_CONFORMANT_TRUNC_COORD 0x8
|
||||
|
||||
/*
|
||||
* Query h/w info: Flag identifying VF/PF/PT mode
|
||||
*
|
||||
*/
|
||||
#define AMDGPU_IDS_FLAGS_MODE_MASK 0x300
|
||||
#define AMDGPU_IDS_FLAGS_MODE_SHIFT 0x8
|
||||
#define AMDGPU_IDS_FLAGS_MODE_PF 0x0
|
||||
#define AMDGPU_IDS_FLAGS_MODE_VF 0x1
|
||||
#define AMDGPU_IDS_FLAGS_MODE_PT 0x2
|
||||
|
||||
/* indicate if acceleration can be working */
|
||||
#define AMDGPU_INFO_ACCEL_WORKING 0x00
|
||||
@@ -1059,7 +1071,7 @@ struct drm_amdgpu_info_device {
|
||||
__u32 num_rb_pipes;
|
||||
__u32 num_hw_gfx_contexts;
|
||||
__u32 _pad;
|
||||
__u64 ids_flags;
|
||||
__u64 ids_flags; // Relevant info here REMOVE LATER
|
||||
/** Starting virtual address for UMDs. */
|
||||
__u64 virtual_address_offset;
|
||||
/** The maximum virtual address */
|
||||
|
||||
Viittaa uudesa ongelmassa
Block a user