• Xiong Zhang's avatar
    drm/i915/gvt: Limit read hw reg to active vgpu · 29f9e425
    Xiong Zhang authored
    mmio_read_from_hw() let vgpu could read hw reg, if vgpu's workload
    is running on hw, things is good. Otherwise vgpu will get other
    vgpu's reg val, it is unsafe.
    
    This patch limit such hw access to active vgpu. If vgpu isn't
    running on hw, the reg read of this vgpu will get the last active
    val which saved at schedule_out.
    
    v2: ring timestamp is walking continuously even if the ring is idle.
        so read hw directly. (Zhenyu)
    Signed-off-by: default avatarXiong Zhang <xiong.y.zhang@intel.com>
    Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
    (cherry picked from commit 295764cd)
    29f9e425
handlers.c 91.9 KB