Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 00/14] Add PXP HWDRM support
@ 2024-07-12 21:28 Daniele Ceraolo Spurio
  2024-07-12 21:28 ` [RFC 01/14] drm/xe: Make exec_queue_kill safe to call twice Daniele Ceraolo Spurio
                   ` (15 more replies)
  0 siblings, 16 replies; 31+ messages in thread
From: Daniele Ceraolo Spurio @ 2024-07-12 21:28 UTC (permalink / raw)
  To: intel-xe
  Cc: Daniele Ceraolo Spurio, José Roberto de Souza, Alan Previn,
	Matthew Brost, Thomas Hellström

PXP (Protected Xe Path) allows execution and flip to display of protected
(i.e. encrypted) objects. The HW supports multiple types of PXP, but
this series only introduces support for PXP HWDRM, which is mainly
targeted at encrypting data that is going to be displayed.

Even though we only plan to support 1 type of PXP for now, the interface
has been designed to allow support for other PXP types to be added at a
later point in time.

A user is expected to mark both BO and exec_queues as using PXP and the
driver will make sure that PXP is running and that the encryption is
valid and that no execution happens with an outdated encryption.

RFC: The series is in a decent state and all my local tests are working
on MTL, but I'm seeing failures on LNL; those are currently trending to
being issues with the contents of the test batch, but I didn't want to
hold the series back until I was sure of that because there are a couple
of choices I made where I'd like feedback, so sending it as a RFC so I
can get that feedback while I complete the debug. The 2 areas in which
I'd like feedback are:

1) VM/BO changes:
    - PXP requires PPGTT submissions from inside the driver, which isn't
      currently supported. I've hooked it up (patch 3), but I'd like an
      expert eye to confirm I didn't do anything stupid.
    - We need to reject submissions using VMs with mapped invalid BOs.
      I've done this by checking all mapped BOs for PXP submissions
      (patch 11), but I'm open to ideas on how to do this differently.

2) API: as mentioned above, I've kept this flexible. Just wanted to
   confirm no one had anything against the approach. See patches 9-11. 

Cc: José Roberto de Souza <jose.souza@intel.com>
Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>

Daniele Ceraolo Spurio (14):
  drm/xe: Make exec_queue_kill safe to call twice
  drm/xe/pxp: Initialize PXP structure and KCR reg
  drm/xe/pxp: Allocate PXP execution resources
  drm/xe/pxp: Add VCS inline termination support
  drm/xe/pxp: Add GSC session invalidation support
  drm/xe/pxp: Handle the PXP termination interrupt
  drm/xe/pxp: Add GSC session initialization support
  drm/xe/pxp: Add hooks to mark an exec queue as using PXP
  drm/xe/pxp: Add API to mark a queue as using PXP
  drm/xe/pxp: add a query for PXP status
  drm/xe/pxp: Add API to mark a BO as using PXP
  drm/xe/pxp: add PXP PM support
  drm/xe/pxp: Add PXP debugfs support
  drm/xe/pxp: Enable PXP for MTL

 drivers/gpu/drm/xe/Makefile                   |   3 +
 drivers/gpu/drm/xe/abi/gsc_pxp_commands_abi.h |  40 +
 .../xe/compat-i915-headers/pxp/intel_pxp.h    |  14 +-
 .../gpu/drm/xe/instructions/xe_instr_defs.h   |   1 +
 .../gpu/drm/xe/instructions/xe_mfx_commands.h |  29 +
 .../gpu/drm/xe/instructions/xe_mi_commands.h  |   5 +
 drivers/gpu/drm/xe/regs/xe_engine_regs.h      |   1 +
 drivers/gpu/drm/xe/regs/xe_gt_regs.h          |   8 +
 drivers/gpu/drm/xe/regs/xe_pxp_regs.h         |  23 +
 drivers/gpu/drm/xe/xe_bo.c                    | 100 ++-
 drivers/gpu/drm/xe/xe_bo.h                    |   5 +
 drivers/gpu/drm/xe/xe_bo_types.h              |   3 +
 drivers/gpu/drm/xe/xe_debugfs.c               |   3 +
 drivers/gpu/drm/xe/xe_device.c                |   6 +
 drivers/gpu/drm/xe/xe_device_types.h          |   8 +-
 drivers/gpu/drm/xe/xe_exec.c                  |   6 +
 drivers/gpu/drm/xe/xe_exec_queue.c            |  48 +-
 drivers/gpu/drm/xe/xe_exec_queue.h            |   5 +
 drivers/gpu/drm/xe/xe_exec_queue_types.h      |   7 +
 drivers/gpu/drm/xe/xe_hw_engine.c             |   2 +-
 drivers/gpu/drm/xe/xe_irq.c                   |  20 +-
 drivers/gpu/drm/xe/xe_lrc.c                   |  14 +-
 drivers/gpu/drm/xe/xe_lrc.h                   |   7 +-
 drivers/gpu/drm/xe/xe_pci.c                   |   3 +
 drivers/gpu/drm/xe/xe_pm.c                    |  42 +-
 drivers/gpu/drm/xe/xe_pxp.c                   | 713 ++++++++++++++++++
 drivers/gpu/drm/xe/xe_pxp.h                   |  32 +
 drivers/gpu/drm/xe/xe_pxp_debugfs.c           | 120 +++
 drivers/gpu/drm/xe/xe_pxp_debugfs.h           |  13 +
 drivers/gpu/drm/xe/xe_pxp_submit.c            | 549 ++++++++++++++
 drivers/gpu/drm/xe/xe_pxp_submit.h            |  20 +
 drivers/gpu/drm/xe/xe_pxp_types.h             | 103 +++
 drivers/gpu/drm/xe/xe_query.c                 |  33 +
 drivers/gpu/drm/xe/xe_ring_ops.c              |   4 +-
 drivers/gpu/drm/xe/xe_vm.c                    | 148 +++-
 drivers/gpu/drm/xe/xe_vm.h                    |   8 +
 drivers/gpu/drm/xe/xe_vm_types.h              |   1 +
 include/uapi/drm/xe_drm.h                     |  83 +-
 38 files changed, 2190 insertions(+), 40 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/instructions/xe_mfx_commands.h
 create mode 100644 drivers/gpu/drm/xe/regs/xe_pxp_regs.h
 create mode 100644 drivers/gpu/drm/xe/xe_pxp.c
 create mode 100644 drivers/gpu/drm/xe/xe_pxp.h
 create mode 100644 drivers/gpu/drm/xe/xe_pxp_debugfs.c
 create mode 100644 drivers/gpu/drm/xe/xe_pxp_debugfs.h
 create mode 100644 drivers/gpu/drm/xe/xe_pxp_submit.c
 create mode 100644 drivers/gpu/drm/xe/xe_pxp_submit.h
 create mode 100644 drivers/gpu/drm/xe/xe_pxp_types.h

-- 
2.43.0


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2024-07-16 20:39 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-12 21:28 [RFC 00/14] Add PXP HWDRM support Daniele Ceraolo Spurio
2024-07-12 21:28 ` [RFC 01/14] drm/xe: Make exec_queue_kill safe to call twice Daniele Ceraolo Spurio
2024-07-12 22:11   ` Matthew Brost
2024-07-12 22:22     ` Daniele Ceraolo Spurio
2024-07-12 22:46       ` Matthew Brost
2024-07-12 21:28 ` [RFC 02/14] drm/xe/pxp: Initialize PXP structure and KCR reg Daniele Ceraolo Spurio
2024-07-12 21:28 ` [RFC 03/14] drm/xe/pxp: Allocate PXP execution resources Daniele Ceraolo Spurio
2024-07-12 22:43   ` Matthew Brost
2024-07-12 23:00     ` Daniele Ceraolo Spurio
2024-07-12 23:14       ` Matthew Brost
2024-07-12 21:28 ` [RFC 04/14] drm/xe/pxp: Add VCS inline termination support Daniele Ceraolo Spurio
2024-07-12 21:28 ` [RFC 05/14] drm/xe/pxp: Add GSC session invalidation support Daniele Ceraolo Spurio
2024-07-12 21:28 ` [RFC 06/14] drm/xe/pxp: Handle the PXP termination interrupt Daniele Ceraolo Spurio
2024-07-12 21:28 ` [RFC 07/14] drm/xe/pxp: Add GSC session initialization support Daniele Ceraolo Spurio
2024-07-12 21:28 ` [RFC 08/14] drm/xe/pxp: Add hooks to mark an exec queue as using PXP Daniele Ceraolo Spurio
2024-07-12 21:28 ` [RFC 09/14] drm/xe/pxp: Add API to mark a " Daniele Ceraolo Spurio
2024-07-12 21:28 ` [RFC 10/14] drm/xe/pxp: add a query for PXP status Daniele Ceraolo Spurio
2024-07-15 17:54   ` Souza, Jose
2024-07-15 18:03     ` Daniele Ceraolo Spurio
2024-07-15 18:41       ` Souza, Jose
2024-07-15 19:38         ` Daniele Ceraolo Spurio
2024-07-15 19:52           ` Souza, Jose
2024-07-15 20:06             ` Daniele Ceraolo Spurio
2024-07-15 20:16               ` Souza, Jose
2024-07-15 20:19                 ` Daniele Ceraolo Spurio
2024-07-12 21:28 ` [RFC 11/14] drm/xe/pxp: Add API to mark a BO as using PXP Daniele Ceraolo Spurio
2024-07-12 21:28 ` [RFC 12/14] drm/xe/pxp: add PXP PM support Daniele Ceraolo Spurio
2024-07-12 21:28 ` [RFC 13/14] drm/xe/pxp: Add PXP debugfs support Daniele Ceraolo Spurio
2024-07-12 21:28 ` [RFC 14/14] drm/xe/pxp: Enable PXP for MTL Daniele Ceraolo Spurio
2024-07-12 21:34 ` ✗ CI.Patch_applied: failure for Add PXP HWDRM support Patchwork
2024-07-16 20:39 ` [RFC 00/14] " Souza, Jose

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox