• Y
    drm/i915: Adds graphic address space ballooning logic · 5dda8fa3
    Yu Zhang 提交于
    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: NYu Zhang <yu.c.zhang@linux.intel.com>
    Signed-off-by: NJike Song <jike.song@intel.com>
    Signed-off-by: NZhi Wang <zhi.a.wang@intel.com>
    Signed-off-by: NEddie Dong <eddie.dong@intel.com>
    Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
    Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
    5dda8fa3
i915_gem_gtt.c 61.5 KB