]> xenbits.xensource.com Git - xen.git/commitdiff
VT-d: add iommu=igfx option to workaround graphics issues
authorTing-Wei Lan <lantw44@gmail.com>
Wed, 5 Aug 2015 17:10:06 +0000 (01:10 +0800)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 6 Aug 2015 09:03:53 +0000 (10:03 +0100)
When using Linux >= 3.19 (commit 47591df) as dom0 on some Intel Ironlake
devices, It is possible to encounter graphics issues that make screen
unreadable or crash the system. It was reported in freedesktop bugzilla:

https://bugs.freedesktop.org/show_bug.cgi?id=90037

As we still cannot find a proper fix for this problem, this patch adds
iommu=igfx option to control whether Intel graphics IOMMU is enabled.
Running Xen with iommu=no-igfx is similar to running Linux with
intel_iommu=igfx_off, which disables IOMMU for Intel GPU. This can be
used by users to manually workaround the problem before a fix is
available for i915 driver.

Signed-off-by: Ting-Wei Lan <lantw44@gmail.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
docs/misc/xen-command-line.markdown
xen/drivers/passthrough/iommu.c
xen/drivers/passthrough/vtd/quirks.c
xen/include/xen/iommu.h

index 204e7a4f46e5d2a1ef349d4098c85bdc89bfc462..a2e427cb18d27c5295774f3387a3d3b3e6d54be3 100644 (file)
@@ -855,7 +855,7 @@ debug hypervisor only).
 > Default: `new` unless directed-EOI is supported
 
 ### iommu
-> `= List of [ <boolean> | force | required | intremap | qinval | snoop | sharept | dom0-passthrough | dom0-strict | amd-iommu-perdev-intremap | workaround_bios_bug | verbose | debug ]`
+> `= List of [ <boolean> | force | required | intremap | qinval | snoop | sharept | dom0-passthrough | dom0-strict | amd-iommu-perdev-intremap | workaround_bios_bug | igfx | verbose | debug ]`
 
 > Sub-options:
 
@@ -929,6 +929,15 @@ debug hypervisor only).
 >> ignored (normally IOMMU setup fails if any of the devices listed by a DRHD
 >> entry aren't PCI discoverable).
 
+> `igfx` (VT-d)
+
+> Default: `true`
+
+>> Enable IOMMU for Intel graphics devices. The intended usage of this option
+>> is `no-igfx`, which is similar to Linux `intel_iommu=igfx_off` option used
+>> to workaround graphics issues. If adding `no-igfx` fixes anything, you
+>> should file a bug reporting the problem.
+
 > `verbose`
 
 > Default: `false`
index 11d58cc82af3becef043a8af4da0f2b1221f4cc2..fc7831e70a4a78ae4bdc048efe20edb2012845c2 100644 (file)
@@ -46,6 +46,7 @@ bool_t __read_mostly force_iommu;
 bool_t __hwdom_initdata iommu_dom0_strict;
 bool_t __read_mostly iommu_verbose;
 bool_t __read_mostly iommu_workaround_bios_bug;
+bool_t __read_mostly iommu_igfx = 1;
 bool_t __read_mostly iommu_passthrough;
 bool_t __read_mostly iommu_snoop = 1;
 bool_t __read_mostly iommu_qinval = 1;
@@ -86,6 +87,8 @@ static void __init parse_iommu_param(char *s)
             force_iommu = val;
         else if ( !strcmp(s, "workaround_bios_bug") )
             iommu_workaround_bios_bug = val;
+        else if ( !strcmp(s, "igfx") )
+            iommu_igfx = val;
         else if ( !strcmp(s, "verbose") )
             iommu_verbose = val;
         else if ( !strcmp(s, "snoop") )
index 921e16610911dd4f28d9c429efb09792f8a24336..1888843dff2015e6403625afe172e0c95731d1c2 100644 (file)
@@ -71,6 +71,9 @@ int is_igd_vt_enabled_quirk(void)
 {
     u16 ggc;
 
+    if ( !iommu_igfx )
+        return 0;
+
     if ( !IS_ILK(ioh_id) )
         return 1;
 
index 705969b552e8992c64356b1beeaf8ec2fe964747..8f3a20eb32e950b36265ac445214152aaed390aa 100644 (file)
@@ -29,7 +29,7 @@
 
 extern bool_t iommu_enable, iommu_enabled;
 extern bool_t force_iommu, iommu_verbose;
-extern bool_t iommu_workaround_bios_bug, iommu_passthrough;
+extern bool_t iommu_workaround_bios_bug, iommu_igfx, iommu_passthrough;
 extern bool_t iommu_snoop, iommu_qinval, iommu_intremap;
 extern bool_t iommu_hap_pt_share;
 extern bool_t iommu_debug;