VF SAVE RESTORE OF COMPRESSION META DATA(9)
π VF save/restore of compression Meta Data (9) β Kernel API Manual
okay bestie, sit down, because this page is literally about how a VF keeps its compression meta data alive across a migration and it's giving main character energy ngl β¨
So here's the tea: VF KMD registers two special contexts/LRCAs. Not one. Two. Iconic, I know. π«Ά
- Save Context/LRCA β contain necessary cmds+page table to trigger Meta data / compression control surface (Aka CCS) save in regular System memory in VM. π
- Restore Context/LRCA β contain necessary cmds+page table to trigger Meta data / compression control surface (Aka CCS) Restore from regular System memory in VM to corresponding CCS pool. π¦
Bet you're wondering how these two girlies actually talk to each other. Below diagram explain steps needed for VF save/Restore of compression Meta Data (blame the hardware, not me π):
πΈ the diagram (steps needed for VF save/Restore of compression Meta Data)
CCS Save CCS Restore VF KMD Guc BCS
LRCA LRCA
| | | | |
| | | | |
| | | | |
| Create Save LRCA | | |
[ ]<----------------------------- [ ] | |
| | | | |
| | | | |
| | | Register save LRCA | |
| | | with Guc | |
| | [ ]--------------------------->[ ] |
| | | | |
| | Create restore LRCA | | |
| [ ]<------------------[ ] | |
| | | | |
| | | Register restore LRCA | |
| | | with Guc | |
| | [ ]--------------------------->[ ] |
| | | | |
| | | | |
| | [ ]------------------------- | |
| | [ ] Allocate main memory. | | |
| | [ ] Allocate CCS memory. | | |
| | [ ] Update Main memory & | | |
[ ]<------------------------------[ ] CCS pages PPGTT + BB | | |
| [ ]<------------------[ ] cmds to save & restore.| | |
| | [ ]<------------------------ | |
| | | | |
| | | | |
| | | | |
: : : : :
---------------------------- VF Paused -------------------------------------
| | | | |
| | | | |
| | | |Schedule |
| | | |CCS Save |
| | | | LRCA |
| | | [ ]------>[ ]
| | | | |
| | | | |
| | | |CCS save |
| | | |completed|
| | | [ ]<------[ ]
| | | | |
: : : : :
---------------------------- VM Migrated -----------------------------------
| | | | |
| | | | |
: : : : :
---------------------------- VF Resumed ------------------------------------
| | | | |
| | | | |
| | [ ]-------------- | |
| | [ ] Fix up GGTT | | |
| | [ ]<------------- | |
| | | | |
| | | | |
| | | Notify VF_RESFIX_DONE | |
| | [ ]--------------------------->[ ] |
| | | | |
| | | |Schedule |
| | | |CCS |
| | | |Restore |
| | | |LRCA |
| | | [ ]------>[ ]
| | | | |
| | | | |
| | | |CCS |
| | | |restore |
| | | |completed|
| | | [ ]<------[ ]
| | | | |
| | | | |
| | | VF_RESFIX_DONE complete | |
| | | notification | |
| | [ ]<---------------------------[ ] |
| | | | |
| | | | |
: : : : :
------------------------- Continue VM restore ------------------------------
ngl the diagram is doing the absolute most, but if you follow the |s like a group chat thread you'll get it. Follow the arrows, queen. π
π SEE ALSO
like, go read these next, bestie, they're all connected iykyk:
- Kernel file
./drivers/gpu/drm/xe/xe_sriov_vf_ccs.c xe_sriov_vf_ccs_rebase(9)xe_sriov_vf_ccs_register_context(9)xe_sriov_vf_ccs_init(9)xe_sriov_vf_ccs_attach_bo(9)xe_sriov_vf_ccs_detach_bo(9)xe_sriov_vf_ccs_print(9)
okay that's the whole thing, mwah π this little masterpiece lives at ./drivers/gpu/drm/xe, dropped October 2026, and it's page 9 of the Kernel API Manual β go off, VF save/rest...on Meta Data(9), you ate and left no crumbs. π
β¨π§
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms