Re: [PATCH] drm/i915: Fix vGPU balloon for ggtt guard page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 09, 2017 at 06:25:37PM +0800, Zhenyu Wang wrote:
> From commit a6508ded2a66 ("drm/i915: Use page coloring to provide the guard
> page at the end of the GTT"), we no longer explicitly subtract guard page
> at end for GGTT address space init, so shouldn't subtract that for vGPU
> balloon too, as that will leave that end page to be available for
> vGPU. Change balloon to cover full range too.
> 
> This fixes to use recent drm-intel tip kernel for guest OS. Found by GVT-g
> cmd parser that guest kernel uses end page as scratch then try to run
> MI_STORE_REG_MEM onto it.
> 
> Cc: Terrence Xu <terrence.xu@xxxxxxxxx>
> Signed-off-by: Zhenyu Wang <zhenyuw@xxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/i915_vgpu.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_vgpu.c b/drivers/gpu/drm/i915/i915_vgpu.c
> index 14014068dfcf..e0a3d61bd232 100644
> --- a/drivers/gpu/drm/i915/i915_vgpu.c
> +++ b/drivers/gpu/drm/i915/i915_vgpu.c
> @@ -222,9 +222,9 @@ int intel_vgt_balloon(struct drm_i915_private *dev_priv)
>  	 * No need to partition out the last physical page,
>  	 * because it is reserved to the guard page.
>  	 */

And update the comment.

> -	if (unmappable_end < ggtt_end - PAGE_SIZE) {
> +	if (unmappable_end < ggtt_end) {
>  		ret = vgt_balloon_space(ggtt, &bl_info.space[3],
> -					unmappable_end, ggtt_end - PAGE_SIZE);
> +					unmappable_end, ggtt_end);
>  		if (ret)
>  			goto err;
>  	}

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux