VF SAVE RESTORE OF COMPRESSION META DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:


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