[PATCH v2 00/10] Introduce Relay Communication for SR-IOV

Michal Wajdeczko michal.wajdeczko at intel.com
Thu Jan 4 22:20:21 UTC 2024


There are scenarios where SR-IOV Virtual Function (VF) driver will
need to get additional data that is not available over VF MMIO BAR
nor could be queried from the GuC firmware and must be obtained
from the Physical Function (PF) driver.

The communication between Virtual Function (VF) drivers and Physical
Function (PF) drivers is based on the GuC firmware acting as a proxy
(relay) agent.

  VF                           GuC                            PF
  |                             |                             |
 [ ] VF2GUC_RELAY_TO_PF         |                             |
 [ ]-------------------------> [ ]                            |
 [ ] { rid, msg }              [ ]                            |
 [ ]                           [ ] GUC2PF_RELAY_FROM_VF       |
 [ ]                           [ ]-------------------------> [ ]
 [ ]                            |  { VFID, rid, msg }        [ ]
 [ ]                            |                            [ ]
 [ ]                            |         PF2GUC_RELAY_TO_VF [ ]
 [ ]                           [ ] <-------------------------[ ]
 [ ]                           [ ]      { VFID, rid, reply }  |
 [ ]      GUC2VF_RELAY_FROM_PF [ ]                            |
 [ ] <-------------------------[ ]                            |
  |             { rid, reply }  |                             |
  |                             |                             |

This series only introduces necessary functions (together with basic
kunit tests) to allow use of relay communication by the VFs drivers.
We will start using this functionality in upcoming series.

v2: apply review comments from Piotr

Michal Wajdeczko (10):
  drm/xe: Allocate dedicated workqueue for SR-IOV workers
  drm/xe: Define Virtual Function Identifier
  drm/xe: Introduce GT-oriented SR-IOV logging macros
  drm/xe/guc: Add helpers for HXG messages
  drm/xe/guc: Update few GuC CTB ABI definitions
  drm/xe/guc: Add Relay Communication ABI definitions
  drm/xe/guc: Introduce Relay Communication for SR-IOV
  drm/xe/kunit: Allow to replace xe_guc_ct_send_recv() with stub
  drm/xe/kunit: Add GuC Relay kunit tests
  drm/xe/guc: Start handling GuC Relay event messages

 drivers/gpu/drm/xe/Makefile                   |   1 +
 .../gpu/drm/xe/abi/guc_actions_sriov_abi.h    | 174 ++++
 .../drm/xe/abi/guc_communication_ctb_abi.h    |   3 +-
 .../gpu/drm/xe/abi/guc_relay_actions_abi.h    |  79 ++
 .../drm/xe/abi/guc_relay_communication_abi.h  | 118 +++
 drivers/gpu/drm/xe/tests/xe_guc_relay_test.c  | 522 ++++++++++
 drivers/gpu/drm/xe/xe_device.c                |   4 +
 drivers/gpu/drm/xe/xe_device_types.h          |   2 +
 drivers/gpu/drm/xe/xe_gt_sriov_printk.h       |  34 +
 drivers/gpu/drm/xe/xe_guc.c                   |   5 +
 drivers/gpu/drm/xe/xe_guc_ct.c                |  11 +
 drivers/gpu/drm/xe/xe_guc_hxg_helpers.h       | 108 ++
 drivers/gpu/drm/xe/xe_guc_relay.c             | 941 ++++++++++++++++++
 drivers/gpu/drm/xe/xe_guc_relay.h             |  37 +
 drivers/gpu/drm/xe/xe_guc_relay_types.h       |  36 +
 drivers/gpu/drm/xe/xe_guc_types.h             |   4 +
 drivers/gpu/drm/xe/xe_sriov.c                 |  32 +
 drivers/gpu/drm/xe/xe_sriov.h                 |   1 +
 drivers/gpu/drm/xe/xe_sriov_types.h           |  12 +
 19 files changed, 2123 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/xe/abi/guc_actions_sriov_abi.h
 create mode 100644 drivers/gpu/drm/xe/abi/guc_relay_actions_abi.h
 create mode 100644 drivers/gpu/drm/xe/abi/guc_relay_communication_abi.h
 create mode 100644 drivers/gpu/drm/xe/tests/xe_guc_relay_test.c
 create mode 100644 drivers/gpu/drm/xe/xe_gt_sriov_printk.h
 create mode 100644 drivers/gpu/drm/xe/xe_guc_hxg_helpers.h
 create mode 100644 drivers/gpu/drm/xe/xe_guc_relay.c
 create mode 100644 drivers/gpu/drm/xe/xe_guc_relay.h
 create mode 100644 drivers/gpu/drm/xe/xe_guc_relay_types.h

-- 
2.25.1



More information about the Intel-xe mailing list