// SPDX-License-Identifier: MIT /* * Copyright © 2023-2024 Intel Corporation */ #include "abi/guc_actions_sriov_abi.h" #include "abi/guc_messages_abi.h" #include "xe_gt_sriov_pf_config.h" #include "xe_gt_sriov_pf_helpers.h" #include "xe_gt_sriov_pf_monitor.h" #include "xe_gt_sriov_printk.h" #include "xe_guc_klv_helpers.h" #include "xe_guc_klv_thresholds_set.h" /** * xe_gt_sriov_pf_monitor_flr - Cleanup VF data after VF FLR. * @gt: the &xe_gt * @vfid: the VF identifier * * On FLR this function will reset all event data related to the VF. * This function is for PF only. */ void xe_gt_sriov_pf_monitor_flr(struct xe_gt *gt, u32 vfid) { … } static void pf_update_event_counter(struct xe_gt *gt, u32 vfid, enum xe_guc_klv_threshold_index e) { … } static int pf_handle_vf_threshold_event(struct xe_gt *gt, u32 vfid, u32 threshold) { … } /** * xe_gt_sriov_pf_monitor_process_guc2pf - Handle adverse event notification from the GuC. * @gt: the &xe_gt * @msg: G2H event message * @len: length of the message * * This function is intended for PF only. * * Return: 0 on success or a negative error code on failure. */ int xe_gt_sriov_pf_monitor_process_guc2pf(struct xe_gt *gt, const u32 *msg, u32 len) { … } /** * xe_gt_sriov_pf_monitor_print_events - Print adverse events counters. * @gt: the &xe_gt to print events from * @p: the &drm_printer * * Print adverse events counters for all VFs. * VFs with no events are not printed. * * This function can only be called on PF. */ void xe_gt_sriov_pf_monitor_print_events(struct xe_gt *gt, struct drm_printer *p) { … }