• Yu Zhang's avatar
    drm/i915: Adds graphic address space ballooning logic · 5dda8fa3
    Yu Zhang authored
    With Intel GVT-g, the global graphic memory space is partitioned by
    multiple vGPU instances in different VMs. The ballooning code is called
    in i915_gem_setup_global_gtt(), utilizing the drm mm allocator APIs to
    mark the graphic address space which are partitioned out to other vGPUs
    as reserved. With ballooning, host side does not need to translate a
    grahpic address from guest view to host view. By now, current implementation
    only support the static ballooning, but in the future, with more cooperation
    from guest driver, the same interfaces can be extended to grow/shrink the
    guest graphic memory dynamically.
    
    v2:
    take Chris and Daniel's comments:
    	- no guard page between different VMs
    	- use drm_mm_reserve_node() to do the reservation for ballooning,
    	instead of the previous drm_mm_insert_node_in_range_generic()
    
    v3:
    take Daniel's comments:
    	- move ballooning functions into i915_vgpu.c
    	- add kerneldoc to ballooning functions
    
    v4:
    take Tvrtko's comments:
    	- more accurate comments and commit message
    Signed-off-by: default avatarYu Zhang <yu.c.zhang@linux.intel.com>
    Signed-off-by: default avatarJike Song <jike.song@intel.com>
    Signed-off-by: default avatarZhi Wang <zhi.a.wang@intel.com>
    Signed-off-by: default avatarEddie Dong <eddie.dong@intel.com>
    Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    5dda8fa3
i915_vgpu.h 3.05 KB