if (!(mapping.valid_mapping))
                return -EINVAL;
 
+       if (amdgpu_sriov_vf(smc->adev) && !mapping.valid_in_vf)
+               return -EACCES;
+
        return mapping.map_to;
 }
 
                return ret;
        }
 
-       if (!num_of_levels) {
-               pr_err("[%s] number of clk levels is invalid!\n", __func__);
-               return -EINVAL;
-       }
-
        single_dpm_table->count = num_of_levels;
        for (i = 0; i < num_of_levels; i++) {
                ret = smu_send_smc_msg_with_param(smu,
                        pr_err("[%s] failed to get dpm freq by index!\n", __func__);
                        return ret;
                }
-               if (!clk) {
-                       pr_err("[%s] clk value is invalid!\n", __func__);
-                       return -EINVAL;
-               }
                single_dpm_table->dpm_levels[i].value = clk;
                single_dpm_table->dpm_levels[i].enabled = true;
        }
 
 
        index = smu_msg_get_index(smu, msg);
        if (index < 0)
-               return index;
+               return index == -EACCES ? 0 : index;
 
        mutex_lock(&smu->message_lock);
        ret = smu_v11_0_wait_for_response(smu);