Commit b721b65a authored by Xiong Zhang's avatar Xiong Zhang Committed by Zhenyu Wang

drm/i915/gvt: Correct ADDR_4K/2M/1G_MASK definition

For ADDR_4K_MASK, bit[45..12] should be 1, all other bits
should be 0. The current definition wrongly set bit[46] as 1
also. This path fixes this.

v2: Add commit message, fixes and cc stable.(Zhenyu)

Fixes: 2707e444("drm/i915/gvt: vGPU graphics memory virtualization")
Signed-off-by: default avatarXiong Zhang <xiong.y.zhang@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
parent 7e605902
...@@ -311,9 +311,9 @@ static inline int gtt_set_entry64(void *pt, ...@@ -311,9 +311,9 @@ static inline int gtt_set_entry64(void *pt,
#define GTT_HAW 46 #define GTT_HAW 46
#define ADDR_1G_MASK (((1UL << (GTT_HAW - 30 + 1)) - 1) << 30) #define ADDR_1G_MASK (((1UL << (GTT_HAW - 30)) - 1) << 30)
#define ADDR_2M_MASK (((1UL << (GTT_HAW - 21 + 1)) - 1) << 21) #define ADDR_2M_MASK (((1UL << (GTT_HAW - 21)) - 1) << 21)
#define ADDR_4K_MASK (((1UL << (GTT_HAW - 12 + 1)) - 1) << 12) #define ADDR_4K_MASK (((1UL << (GTT_HAW - 12)) - 1) << 12)
static unsigned long gen8_gtt_get_pfn(struct intel_gvt_gtt_entry *e) static unsigned long gen8_gtt_get_pfn(struct intel_gvt_gtt_entry *e)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment