Bug 100297 - 4.10.4 guest kernel not working
Summary: 4.10.4 guest kernel not working
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/iGVT-g (show other bugs)
Version: XOrg git
Hardware: Other All
: medium normal
Assignee: Chuanxiao Dong
QA Contact: Terrence Xu
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-21 09:21 UTC by Gerd Hoffmann
Modified: 2017-04-13 07:14 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Gerd Hoffmann 2017-03-21 09:21:41 UTC
4.10.4 kernel doesn't work properly as guest.
Just loading the driver i915.ko  often works.
Trying to start Xorg fails, with both intel + modesetting drivers.
Failure mode looks different each time, I've seen a kernel panic once, but often the guest just hangs instead.
Comment 1 Chuanxiao Dong 2017-03-23 03:34:25 UTC
Looks like this issue is not seen from gvt-staging. Terrence, can you please confirm?
Comment 2 Terrence Xu 2017-03-24 12:05:41 UTC
I tried the 4.10.4 kernel from "http://www.kernel.org/" and it is not not working with printing the "[  759.239502] [drm:intel_vgpu_emulate_mmio_write [i915]] *ERROR*  gvt: guest page write error -22, gfn 0x226b2, pa 0x226b2a0c, var 0x25, len 1" continuously.
But the newest gvt-staging / gvt-stable-4.10 / gvt-testing code as guest kernel from "https://github.com/01org/gvt-linux/" they are all working.
Gerd, can you provide the "gvt-linux" as guest kernel results?
Comment 3 Chuanxiao Dong 2017-03-27 06:02:36 UTC
(In reply to Terrence Xu from comment #2)
> I tried the 4.10.4 kernel from "http://www.kernel.org/" and it is not not
> working with printing the "[  759.239502] [drm:intel_vgpu_emulate_mmio_write
> [i915]] *ERROR*  gvt: guest page write error -22, gfn 0x226b2, pa
> 0x226b2a0c, var 0x25, len 1" continuously.
> But the newest gvt-staging / gvt-stable-4.10 / gvt-testing code as guest
> kernel from "https://github.com/01org/gvt-linux/" they are all working.
> Gerd, can you provide the "gvt-linux" as guest kernel results?

Hi Terrence,

The failure log looks like the issue which can be fixed by below comment:

commit 359b69310014511901bd61cc5f7680cb5de1faef
Author: Xiaoguang Chen <xiaoguang.chen@intel.com>
Date:   Tue Mar 21 10:54:21 2017 +0800

    drm/i915/gvt: set shadow entry to scratch page while p2m failed

Did your host kernel have this patch when testing with 4.10.4 as guest?

Thanks
Chuanxiao
Comment 4 Gerd Hoffmann 2017-03-27 13:03:22 UTC
Updated host to latest gvt-stable-4.10 (which includes the "drm/i915/gvt: set shadow entry to scratch page while p2m failed" patch meanwhile).

Updated guest to 4.10.6.

Problem is still present.
Comment 5 Gerd Hoffmann 2017-03-27 13:17:48 UTC
Using gvt-stable-4.10 on the guest too works.  So apparently there is some guest fix in that branch which fixes it, and which should go into the 4.10.y stable releases.
Comment 6 Chuanxiao Dong 2017-03-28 06:00:02 UTC
Zhi met similar issue with booting 4.10.x guest kernel, and he provided 3 patches to i915 to fix the issues from guest side, which were included into gvt-staging tree already. So far they are not in 4.10.x linux-stable and Zhi is working on this.

Below is the feedback from Zhi:

Actually we need three patches to land in linux-stable-4.10. Before they land in linux-stable branch, they have to be merged in linux-stable master first. The three patches are:

653af93 drm/i915: A hotfix for making aliasing PPGTT work for GVT-g
7f561f0 drm/i915: Let execlist_update_context() cover !FULL_PPGTT mode.
5c7f637 drm/i915: Move the release of PT page to the upper caller

The last one "drm/i915: A hotfix for making aliasing PPGTT work for GVT-g" should be merged last week, but the maintainer met some conflicts. I just re-sent three patches to linux-stable yesterday. Let's see the progress.
Comment 7 Terrence Xu 2017-03-28 06:34:05 UTC
(In reply to Chuanxiao Dong from comment #3)
> (In reply to Terrence Xu from comment #2)
> > I tried the 4.10.4 kernel from "http://www.kernel.org/" and it is not not
> > working with printing the "[  759.239502] [drm:intel_vgpu_emulate_mmio_write
> > [i915]] *ERROR*  gvt: guest page write error -22, gfn 0x226b2, pa
> > 0x226b2a0c, var 0x25, len 1" continuously.
> > But the newest gvt-staging / gvt-stable-4.10 / gvt-testing code as guest
> > kernel from "https://github.com/01org/gvt-linux/" they are all working.
> > Gerd, can you provide the "gvt-linux" as guest kernel results?
> 
> Hi Terrence,
> 
> The failure log looks like the issue which can be fixed by below comment:
> 
> commit 359b69310014511901bd61cc5f7680cb5de1faef
> Author: Xiaoguang Chen <xiaoguang.chen@intel.com>
> Date:   Tue Mar 21 10:54:21 2017 +0800
> 
>     drm/i915/gvt: set shadow entry to scratch page while p2m failed
> 
> Did your host kernel have this patch when testing with 4.10.4 as guest?
> 
> Thanks
> Chuanxiao

I tried to boot up 4.10.4 guest (with this patch) successfully, the issue is gone.
Comment 8 Terrence Xu 2017-03-28 07:18:03 UTC
(In reply to Terrence Xu from comment #7)
> (In reply to Chuanxiao Dong from comment #3)
> > (In reply to Terrence Xu from comment #2)
> > > I tried the 4.10.4 kernel from "http://www.kernel.org/" and it is not not
> > > working with printing the "[  759.239502] [drm:intel_vgpu_emulate_mmio_write
> > > [i915]] *ERROR*  gvt: guest page write error -22, gfn 0x226b2, pa
> > > 0x226b2a0c, var 0x25, len 1" continuously.
> > > But the newest gvt-staging / gvt-stable-4.10 / gvt-testing code as guest
> > > kernel from "https://github.com/01org/gvt-linux/" they are all working.
> > > Gerd, can you provide the "gvt-linux" as guest kernel results?
> > 
> > Hi Terrence,
> > 
> > The failure log looks like the issue which can be fixed by below comment:
> > 
> > commit 359b69310014511901bd61cc5f7680cb5de1faef
> > Author: Xiaoguang Chen <xiaoguang.chen@intel.com>
> > Date:   Tue Mar 21 10:54:21 2017 +0800
> > 
> >     drm/i915/gvt: set shadow entry to scratch page while p2m failed
> > 
> > Did your host kernel have this patch when testing with 4.10.4 as guest?
> > 
> > Thanks
> > Chuanxiao
> 
> I tried to boot up 4.10.4 guest (with this patch) , the issue is
> gone.

Corrected my comments, I attach boot up 4.10.4 guest successfully with guest picked the below patch:

From e81ecb5e31db6c2a259d694738cf620d9fa70861 Mon Sep 17 00:00:00 2001
From: Zhi Wang <zhi.a.wang@intel.com>
Date: Wed, 8 Feb 2017 21:03:33 +0800
Subject: [PATCH] drm/i915: A hotfix for making aliasing PPGTT work for GVT-g

This patch makes PPGTT page table non-shrinkable when using aliasing PPGTT
mode. It's just a temporary solution for making GVT-g work.

Fixes: 2ce5179fe826 ("drm/i915/gtt: Free unused lower-level page tables")
Comment 9 Chuanxiao Dong 2017-04-13 07:14:21 UTC
Below fixes from Zhi are merged into stable 4.10.9 and 4.10.10

653af93 drm/i915: A hotfix for making aliasing PPGTT work for GVT-g
7f561f0 drm/i915: Let execlist_update_context() cover !FULL_PPGTT mode.
5c7f637 drm/i915: Move the release of PT page to the upper caller

move issue to resolve fixed status


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.