/* * Copyright (c) 2018-2021 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
*/
/* * PF2VF history log: * v1 defined in amdgim * v2 current * * VF2PF history log: * v1 defined in amdgim * v2 defined in amdgim * v3 current
*/ #define AMD_SRIOV_MSG_FW_VRAM_PF2VF_VER 2 #define AMD_SRIOV_MSG_FW_VRAM_VF2PF_VER 3
struct amd_sriov_msg_pf2vf_info_header { /* the total structure size in byte */
uint32_t size; /* version of this structure, written by the HOST */
uint32_t version; /* reserved */
uint32_t reserved[2];
};
#define AMD_SRIOV_MSG_PF2VF_INFO_FILLED_SIZE (55) struct amd_sriov_msg_pf2vf_info { /* header contains size and version */ struct amd_sriov_msg_pf2vf_info_header header; /* use private key from mailbox 2 to create checksum */
uint32_t checksum; /* The features flags of the HOST driver supports */ union amd_sriov_msg_feature_flags feature_flags; /* (max_width * max_height * fps) / (16 * 16) */
uint32_t hevc_enc_max_mb_per_second; /* (max_width * max_height) / (16 * 16) */
uint32_t hevc_enc_max_mb_per_frame; /* (max_width * max_height * fps) / (16 * 16) */
uint32_t avc_enc_max_mb_per_second; /* (max_width * max_height) / (16 * 16) */
uint32_t avc_enc_max_mb_per_frame; /* MEC FW position in BYTE from the start of VF visible frame buffer */
uint64_t mecfw_offset; /* MEC FW size in BYTE */
uint32_t mecfw_size; /* UVD FW position in BYTE from the start of VF visible frame buffer */
uint64_t uvdfw_offset; /* UVD FW size in BYTE */
uint32_t uvdfw_size; /* VCE FW position in BYTE from the start of VF visible frame buffer */
uint64_t vcefw_offset; /* VCE FW size in BYTE */
uint32_t vcefw_size; /* Bad pages block position in BYTE */
uint32_t bp_block_offset_low;
uint32_t bp_block_offset_high; /* Bad pages block size in BYTE */
uint32_t bp_block_size; /* frequency for VF to update the VF2PF area in msec, 0 = manual */
uint32_t vf2pf_update_interval_ms; /* identification in ROCm SMI */
uint64_t uuid;
uint32_t fcn_idx; /* flags to indicate which register access method VF should use */ union amd_sriov_reg_access_flags reg_access_flags; /* MM BW management */ struct {
uint32_t decode_max_dimension_pixels;
uint32_t decode_max_frame_pixels;
uint32_t encode_max_dimension_pixels;
uint32_t encode_max_frame_pixels;
} mm_bw_management[AMD_SRIOV_MSG_RESERVE_VCN_INST]; /* UUID info */ struct amd_sriov_msg_uuid_info uuid_info; /* PCIE atomic ops support flag */
uint32_t pcie_atomic_ops_support_flags; /* Portion of GPU memory occupied by VF. MAX value is 65535, but set to uint32_t to maintain alignment with reserved size */
uint32_t gpu_capacity; /* vf bdf on host pci tree for debug only */
uint32_t bdf_on_host;
uint32_t more_bp; //Reserved for future use. union amd_sriov_ras_caps ras_en_caps; union amd_sriov_ras_caps ras_telemetry_en_caps;
struct amd_sriov_msg_vf2pf_info_header { /* the total structure size in byte */
uint32_t size; /* version of this structure, written by the guest */
uint32_t version; /* reserved */
uint32_t reserved[2];
};
#define AMD_SRIOV_MSG_VF2PF_INFO_FILLED_SIZE (73) struct amd_sriov_msg_vf2pf_info { /* header contains size and version */ struct amd_sriov_msg_vf2pf_info_header header;
uint32_t checksum; /* driver version */
uint8_t driver_version[64]; /* driver certification, 1=WHQL, 0=None */
uint32_t driver_cert; /* guest OS type and version */ union amd_sriov_msg_os_info os_info; /* guest fb information in the unit of MB */
uint32_t fb_usage; /* guest gfx engine usage percentage */
uint32_t gfx_usage; /* guest gfx engine health percentage */
uint32_t gfx_health; /* guest compute engine usage percentage */
uint32_t compute_usage; /* guest compute engine health percentage */
uint32_t compute_health; /* guest avc engine usage percentage. 0xffff means N/A */
uint32_t avc_enc_usage; /* guest avc engine health percentage. 0xffff means N/A */
uint32_t avc_enc_health; /* guest hevc engine usage percentage. 0xffff means N/A */
uint32_t hevc_enc_usage; /* guest hevc engine usage percentage. 0xffff means N/A */
uint32_t hevc_enc_health; /* combined encode/decode usage */
uint32_t encode_usage;
uint32_t decode_usage; /* Version of PF2VF that VF understands */
uint32_t pf2vf_version_required; /* additional FB usage */
uint32_t fb_vis_usage;
uint32_t fb_vis_size;
uint32_t fb_size; /* guest ucode data, each one is 1.25 Dword */ struct {
uint8_t id;
uint32_t version;
} ucode_info[AMD_SRIOV_MSG_RESERVE_UCODE];
uint64_t dummy_page_addr; /* FB allocated for guest MES to record UQ info */
uint64_t mes_info_addr;
uint32_t mes_info_size; /* reserved */
uint32_t reserved[256 - AMD_SRIOV_MSG_VF2PF_INFO_FILLED_SIZE];
} __packed;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.