struct psp_context *psp = &adev->psp;
        int ret;
 
-       ret = psp_init_microcode(psp);
-       if (ret) {
-               DRM_ERROR("Failed to load psp firmware!\n");
-               return ret;
+       if (!amdgpu_sriov_vf(adev)) {
+               ret = psp_init_microcode(psp);
+               if (ret) {
+                       DRM_ERROR("Failed to load psp firmware!\n");
+                       return ret;
+               }
        }
 
        ret = psp_memory_training_init(psp);
 
        struct amdgpu_firmware_info *info = NULL;
        const struct common_firmware_header *header = NULL;
 
+       if (amdgpu_sriov_vf(adev))
+               return 0;
+
        DRM_DEBUG("\n");
 
        switch (adev->asic_type) {
 
        const struct common_firmware_header *header = NULL;
        const struct sdma_firmware_header_v1_0 *hdr;
 
+       if (amdgpu_sriov_vf(adev))
+               return 0;
+
        DRM_DEBUG("\n");
 
        switch (adev->asic_type) {
 
        struct amdgpu_firmware_info *info = NULL;
        const struct common_firmware_header *header = NULL;
 
+       if (amdgpu_sriov_vf(adev))
+               return 0;
+
        DRM_DEBUG("\n");
 
        switch (adev->asic_type) {
 
        int ret;
        struct cgs_firmware_info info = {0};
 
-       ret = cgs_get_firmware_info(hwmgr->device,
-                                   CGS_UCODE_ID_SMU,
-                                   &info);
-       if (ret || !info.kptr)
-               return -EINVAL;
+       if (!amdgpu_sriov_vf((struct amdgpu_device *)hwmgr->adev)) {
+               ret = cgs_get_firmware_info(hwmgr->device,
+                                               CGS_UCODE_ID_SMU,
+                                               &info);
+               if (ret || !info.kptr)
+                       return -EINVAL;
+       }
 
        priv = kzalloc(sizeof(struct vega10_smumgr), GFP_KERNEL);
 
 
 
        smu->smu_dpm.dpm_level = AMD_DPM_FORCED_LEVEL_AUTO;
        smu->smu_dpm.requested_dpm_level = AMD_DPM_FORCED_LEVEL_AUTO;
-       ret = smu_init_microcode(smu);
-       if (ret) {
-               dev_err(adev->dev, "Failed to load smu firmware!\n");
-               return ret;
+
+       if (!amdgpu_sriov_vf(adev)) {
+               ret = smu_init_microcode(smu);
+               if (ret) {
+                       dev_err(adev->dev, "Failed to load smu firmware!\n");
+                       return ret;
+               }
        }
 
        ret = smu_smc_table_sw_init(smu);