Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/xe/guc: Add GUC2PF_ADVERSE_EVENT to ABI

When thresholds used to monitor VFs activities are configured,
then GuC may send GUC2PF_ADVERSE_EVENT messages informing the
PF driver about exceeded thresholds. Add necessary definitions
to our GuC firmware ABI header.

Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240514190015.2172-7-michal.wajdeczko@intel.com

+30
+30
drivers/gpu/drm/xe/abi/guc_actions_sriov_abi.h
··· 172 172 #define VF2GUC_RELAY_TO_PF_REQUEST_MSG_NUM_RELAY_DATA GUC_RELAY_MSG_MAX_LEN 173 173 174 174 /** 175 + * DOC: GUC2PF_ADVERSE_EVENT 176 + * 177 + * This message is used by the GuC to notify PF about adverse events. 178 + * 179 + * This G2H message must be sent as `CTB HXG Message`_. 180 + * 181 + * +---+-------+--------------------------------------------------------------+ 182 + * | | Bits | Description | 183 + * +===+=======+==============================================================+ 184 + * | 0 | 31 | ORIGIN = GUC_HXG_ORIGIN_GUC_ | 185 + * | +-------+--------------------------------------------------------------+ 186 + * | | 30:28 | TYPE = GUC_HXG_TYPE_EVENT_ | 187 + * | +-------+--------------------------------------------------------------+ 188 + * | | 27:16 | DATA0 = MBZ | 189 + * | +-------+--------------------------------------------------------------+ 190 + * | | 15:0 | ACTION = _`GUC_ACTION_GUC2PF_ADVERSE_EVENT` = 0x5104 | 191 + * +---+-------+--------------------------------------------------------------+ 192 + * | 1 | 31:0 | DATA1 = **VFID** - VF identifier | 193 + * +---+-------+--------------------------------------------------------------+ 194 + * | 2 | 31:0 | DATA2 = **THRESHOLD** - key of the exceeded threshold | 195 + * +---+-------+--------------------------------------------------------------+ 196 + */ 197 + #define GUC_ACTION_GUC2PF_ADVERSE_EVENT 0x5104 198 + 199 + #define GUC2PF_ADVERSE_EVENT_EVENT_MSG_LEN (GUC_HXG_EVENT_MSG_MIN_LEN + 2u) 200 + #define GUC2PF_ADVERSE_EVENT_EVENT_MSG_0_MBZ GUC_HXG_EVENT_MSG_0_DATA0 201 + #define GUC2PF_ADVERSE_EVENT_EVENT_MSG_1_VFID GUC_HXG_EVENT_MSG_n_DATAn 202 + #define GUC2PF_ADVERSE_EVENT_EVENT_MSG_2_THRESHOLD GUC_HXG_EVENT_MSG_n_DATAn 203 + 204 + /** 175 205 * DOC: GUC2PF_VF_STATE_NOTIFY 176 206 * 177 207 * The GUC2PF_VF_STATE_NOTIFY message is used by the GuC to notify PF about change