[PATCH v11 2/4] drm/xe/vf: Shifting GGTT area post migration
Michal Wajdeczko
michal.wajdeczko at intel.com
Fri Apr 18 12:42:52 UTC 2025
On 18.04.2025 01:42, Tomasz Lis wrote:
> We have only one GGTT for all IOV functions, with each VF having assigned
> a range of addresses for its use. After migration, a VF can receive a
> different range of addresses than it had initially.
>
> This implements shifting GGTT addresses within drm_mm nodes, so that
> VMAs stay valid after migration. This will make the driver use new
> addresses when accessing GGTT from the moment the shifting ends.
>
> By taking the ggtt->lock for the period of VMA fixups, this change
> also adds constraint on that mutex. Any locks used during the recovery
> cannot ever wait for hardware response - because after migration,
> the hardware will not do anything until fixups are finished.
>
> v2: Moved some functs to xe_ggtt.c; moved shift computation to just
> after querying; improved documentation; switched some warns to asserts;
> skipping fixups when GGTT shift eq 0; iterating through tiles (Michal)
> v3: Updated kerneldocs, removed unused funct, properly allocate
> balloning nodes if non existent
> v4: Re-used ballooning functions from VF init, used bool in place of
> standard error codes
> v5: Renamed one function
> v6: Subject tag change, several kerneldocs updated, some functions
> renamed, some moved, added several asserts, shuffled declarations
> of variables, revealed more detail in high level functions
> v7: Fixed typos, added `_locked` suffix to some functs, improved
> readability of asserts, removed unneeded conditional
> v8: Moved one function, removed implementation detail from kerneldoc,
> added asserts
> v9: Code shuffling without much change, and one param rename
> v10: Minor error path change, added printing the shift via debugfs
>
> Signed-off-by: Tomasz Lis <tomasz.lis at intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
> ---
Reviewed-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
More information about the Intel-xe
mailing list