All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ting-Wei Lan <lantw44@gmail.com>
To: Juergen Gross <jgross@suse.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: xen-devel@lists.xen.org
Subject: Re: Is: graphics corruption with 'xen: Support Xen pv-domains using PAT." Was:Re: [BUG] Characters on the screen are broken on Linux >= 3.19 with VT-d enabled
Date: Sun, 28 Jun 2015 05:15:28 +0800	[thread overview]
Message-ID: <1435439728.4171.9.camel@gmail.com> (raw)
In-Reply-To: <557FF360.2010808@suse.com>

於 二,2015-06-16 於 11:58 +0200,Juergen Gross 提到:
> On 06/16/2015 11:32 AM, 藍挺瑋 wrote:
> > 於 二,2015-06-16 於 11:06 +0200,Juergen Gross 提到:
> > > On 06/16/2015 10:55 AM, Ting-Wei Lan wrote:
> > > > Juergen Gross 於 西元2015年06月16日 12:30 寫道:
> > > > > On 06/15/2015 09:03 PM, Ting-Wei Lan wrote:
> > > > > > 於 一,2015-06-15 於 14:55 -0400,Konrad Rzeszutek Wilk 提到:
> > > > > > > On Sat, Jun 13, 2015 at 12:43:14AM +0800, Ting-Wei Lan 
> > > > > > > wrote:
> > > > > > > > When using Linux >= 3.19 as the dom0 kernel, characters 
> > > > > > > > on
> > > > > > > > the
> > > > > > > > screen become
> > > > > > > > broken after the graphic driver is loaded. The commit 
> > > > > > > > that
> > > > > > > > breaks
> > > > > > > > it is
> > > > > > > > (found by git bisect):
> > > > > > > > 
> > > > > > > > 
> > > > > > > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/l
> > > > > > > > inux
> > > > > > > > .git/com
> > > > > > > > mit/?id=47591df
> > > > > > > 
> > > > > > > Lets CC Juergen
> > > > > > > > 
> > > > > > > > 
> > > > > > > > Screenshot when the system run in single user mode:
> > > > > > > > 
> > > > > > > >     
> > > > > > > > https://bugs.freedesktop.org/attachment.cgi?id=115079
> > > > > 
> > > > > Are those messages to be expected:
> > > > > 
> > > > > (XEN) Scrubbing Free RAM on 1 nodes using 2 CPUs
> > > > > (XEN) [VT-D]DMAR:[DMA Write] Request device [0000:00:02.0] 
> > > > > fault
> > > > > addr
> > > > > b61eef000, iommu reg = ffff82c000203000
> > > > > (XEN) [VT-D]DMAR: reason 05 - PTE Write access is not set
> > > > > (XEN)
> > > > > .............................................................
> > > > > ....
> > > > > .done.
> > > > > 
> > > > > I'm not familiar with VT-D internals, but seeing these 
> > > > > messages
> > > > > for the
> > > > > video device during RAM scrubbing makes wonder if everything 
> > > > > is
> > > > > correct
> > > > > regarding the VT-D and memory setup...
> > > ...
> > > > > > > > I still remember that there was a similar problem found 
> > > > > > > > two
> > > > > > > > years
> > > > > > > > ago on the
> > > > > > > > same hardware with similar broken screen output and it 
> > > > > > > > also
> > > > > > > > crashed
> > > > > > > > after
> > > > > > > > Xorg was started, but I cannot confirm that they are 
> > > > > > > > the
> > > > > > > > same
> > > > > > > > problems. I
> > > > > > > > don't know whether error messages are simliar.
> > > > > > > > 
> > > > > > > > The old problem happens on Linux 3.7 ~ 3.10 with VT-d
> > > > > > > > enabled. It
> > > > > > > > only
> > > > > > > > happened when not using Xen, so I added 
> > > > > > > > 'intel_iommu=off'
> > > > > > > > to Linux
> > > > > > > > boot
> > > > > > > > arguments to workaround it.
> > > > > 
> > > > > Hmm, do you see any chance in finding the commit which made 
> > > > > it
> > > > > working
> > > > > again? Perhaps there was some workaround for this hardware 
> > > > > which
> > > > > is
> > > > > missing in Xen now...
> > > > 
> > > > After some tests, I found the information I provided before was
> > > > incorrect. It seems the problem happens on all Linux >= 3.7,
> > > > including
> > > > Linux 4.0.5, so the old problem was never fixed. Here are some
> > > > 'dmesg |
> > > > grep -i iommu' outputs.
> > > 
> > > So a Xen-specific error is rather improbable, correct?
> > 
> > But Linux provides 'intel_iommu=igfx_off' to workaround the 
> > problem.
> > Does Xen provide similar things?
> 
> Not that I know of. The question is whether you really need VT-d, and 
> if
> yes, why. You could still switch the iommu off for dom0 by setting
> iommu=dom0-passthrough in the Xen command line (your hardware might 
> not
> support it, though).

iommu=dom0-passthrough doesn't work on my hardware.

I found a workaround for my hardware:

diff --git a/xen/drivers/passthrough/vtd/quirks.c
b/xen/drivers/passthrough/vtd/quirks.c
index 69d29ab..b937ad0 100644
--- a/xen/drivers/passthrough/vtd/quirks.c
+++ b/xen/drivers/passthrough/vtd/quirks.c
@@ -74,6 +74,7 @@ int is_igd_vt_enabled_quirk(void)
 
     if ( !IS_ILK(ioh_id) )
         return 1;
+    return 0;
 
     /* integrated graphics on Intel platforms is located at 0:2.0 */
     ggc = pci_conf_read16(0, 0, IGD_DEV, 0, GGC);


This workaround is silimar to intel_iommu=igfx_off in Linux. I found
silimar code in function quirk_calpella_no_shadow_gtt in
drivers/iommu/intel-iommu.c.


I reported the graphics corruption problems on Linux >= 3.7 here:
https://bugs.freedesktop.org/show_bug.cgi?id=91127

And here is the bug link of Xen and Linux >= 3.19 (the bug we are
discussing here):
https://bugs.freedesktop.org/show_bug.cgi?id=90037

I hope we can get a real fix.


> 
> 
> Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2015-06-27 21:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-12 16:43 [BUG] Characters on the screen are broken on Linux >= 3.19 with VT-d enabled Ting-Wei Lan
2015-06-15 18:55 ` Is: graphics corruption with 'xen: Support Xen pv-domains using PAT." Was:Re: " Konrad Rzeszutek Wilk
2015-06-15 19:03   ` Ting-Wei Lan
2015-06-16  4:30     ` Juergen Gross
2015-06-16  8:55       ` Ting-Wei Lan
2015-06-16  9:06         ` Juergen Gross
2015-06-16  9:32           ` 藍挺瑋
2015-06-16  9:58             ` Juergen Gross
2015-06-27 21:15               ` Ting-Wei Lan [this message]
2015-06-29 14:20                 ` Work-arounds in Xen code for Intel GFX?Re: " Konrad Rzeszutek Wilk
2015-07-16 15:35                   ` Ting-Wei Lan
2015-07-16 18:24                     ` Konrad Rzeszutek Wilk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1435439728.4171.9.camel@gmail.com \
    --to=lantw44@gmail.com \
    --cc=jgross@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.