Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/3] drm/xe/migrate: Atomicize CCS copy command setup
@ 2025-10-10 12:39 Satyanarayana K V P
  2025-10-10 12:39 ` [PATCH v6 1/3] " Satyanarayana K V P
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Satyanarayana K V P @ 2025-10-10 12:39 UTC (permalink / raw)
  To: intel-xe; +Cc: Satyanarayana K V P

The CCS copy command is a 5-dword sequence. If the vCPU halts during
save/restore while this sequence is being programmed, partial writes may
trigger page faults when saving IGPU CCS metadata. Use the VMOVDQU
instruction to write the sequence atomically. Since VMOVDQU operates on
256-bit chunks, update EMIT_COPY_CCS_DW to emit 8 dwords instead of 5
dwords. Update emit_flush_invalidate() to use VMOVDQU operating	with
128-bit chunks.

The MI_STORE_DATA_IMM instruction header is quad dword in size. If the
vCPU halts during save/restore while this sequence is being programmed,
partial writes may trigger page faults when saving IGPU CCS metadata.
Update instruction header atomically.

Clear the contents of the CCS read/write batch buffer, ensuring no page
faults / GPU hang occur if migration happens midway.

---
V5 -> V6:
- Used xe_gt_assert() instead of xe_assert() (Matt B).
- Use emit_atomic() function to write MI_STORE_DATA_IMM instruction
(Matt B).
- Fixed review comments (Rodrigo)

V4 -> V5:
- Fixed review comments (Matt B)

V3 -> V4:
- Fixed review comments (Wajdeczko)
- Fix issues reported by patchworks.

V2 -> V3:
- Added support for 128 bit and 256 bit instructions with memcpy_vmovdqu
- Updated emit_flush_invalidate() to use vmovdqu instruction.

V1 -> V2:
- Use memcpy_vmovdqu only for x86 arch and for VF. Else use memcpy
(Auld, Matthew)
- Fix issues reported by patchworks.

Satyanarayana K V P (3):
  drm/xe/migrate: Atomicize CCS copy command setup
  drm/xe/migrate: Make emit_pte() header write atomic
  drm/xe/vf: Clear CCS read/write buffers in atomic way

 drivers/gpu/drm/xe/xe_migrate.c      | 253 ++++++++++++++++++++++++---
 drivers/gpu/drm/xe/xe_migrate.h      |   3 +
 drivers/gpu/drm/xe/xe_sriov_vf_ccs.c |   5 +-
 3 files changed, 236 insertions(+), 25 deletions(-)

-- 
2.51.0


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

end of thread, other threads:[~2025-10-16 12:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-10 12:39 [PATCH v6 0/3] drm/xe/migrate: Atomicize CCS copy command setup Satyanarayana K V P
2025-10-10 12:39 ` [PATCH v6 1/3] " Satyanarayana K V P
2025-10-16 12:15   ` Rodrigo Vivi
2025-10-10 12:39 ` [PATCH v6 2/3] drm/xe/migrate: Make emit_pte() header write atomic Satyanarayana K V P
2025-10-10 12:39 ` [PATCH v6 3/3] drm/xe/vf: Clear CCS read/write buffers in atomic way Satyanarayana K V P
2025-10-10 14:19 ` ✗ CI.KUnit: failure for drm/xe/migrate: Atomicize CCS copy command setup Patchwork

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