From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ting-Wei Lan Subject: Re: Work-arounds in Xen code for Intel GFX?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: Thu, 16 Jul 2015 23:35:34 +0800 Message-ID: <1437060934.9049.10.camel@gmail.com> References: <557B0C22.7070406@gmail.com> <20150615185517.GA24881@l.oracle.com> <1434395001.4468.15.camel@gmail.com> <557FA65C.9060903@suse.com> <557FE489.5060802@gmail.com> <557FE6FB.5050202@suse.com> <1434447163.5187.4.camel@gmail.com> <557FF360.2010808@suse.com> <1435439728.4171.9.camel@gmail.com> <20150629142037.GD23317@l.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150629142037.GD23317@l.oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk , yang.z.zhang@intel.com, kevin.tian@intel.com Cc: Juergen Gross , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org > > > > 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); > > Lets CC the maintaners of said code. > > > > > > 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. As I don't know how to properly fix the problem, I made a patch to add iommu=igfx_off option to workaround the issue in Xen. https://gist.github.com/lantw44/9f8a94d2eeb846889a5a Is this patch acceptable, or we should wait for a fix instead? > > > > > > I reported the graphics corruption problems on Linux >= 3.7 here: > > https://bugs.freedesktop.org/show_bug.cgi?id=91127 It was partially fixed by this commit (available in Linux 4.2-rc2): https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/ ?id=8b572a4 But it seems it cannot be ported to Xen. > > > > 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