From: Ting-Wei Lan <lantw44@gmail.com>
To: xen-devel@lists.xen.org
Cc: Ting-Wei Lan <lantw44@gmail.com>,
Yang Zhang <yang.z.zhang@intel.com>,
Kevin Tian <kevin.tian@intel.com>,
Jan Beulich <jbeulich@suse.com>
Subject: [PATCH] VT-d: add iommu=igfx_off option to workaround graphics issues
Date: Sat, 18 Jul 2015 03:05:52 +0800 [thread overview]
Message-ID: <1437159952-4134-1-git-send-email-lantw44@gmail.com> (raw)
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_off option that is similar to Linux intel_iommu=igfx_off for
users to manually workaround the problem.
Signed-off-by: Ting-Wei Lan <lantw44@gmail.com>
---
docs/misc/xen-command-line.markdown | 10 +++++++++-
xen/drivers/passthrough/iommu.c | 3 +++
xen/drivers/passthrough/vtd/quirks.c | 2 +-
xen/include/xen/iommu.h | 2 +-
4 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown
index 13f03ad..7b61603 100644
--- a/docs/misc/xen-command-line.markdown
+++ b/docs/misc/xen-command-line.markdown
@@ -793,7 +793,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_off | verbose | debug ]`
> Sub-options:
@@ -867,6 +867,14 @@ debug hypervisor only).
>> ignored (normally IOMMU setup fails if any of the devices listed by a DRHD
>> entry aren't PCI discoverable).
+> `igfx_off` (VT-d)
+
+> Default: `false`
+
+>> Workaround graphics issues for Intel Calpella/Ironlake devices. This option
+>> is similar to Linux `intel_iommu=igfx_off`, so if it fixes anything, you
+>> should file a bug reporting the problem.
+
> `verbose`
> Default: `false`
diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index cc12735..2ba8c9d 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -47,6 +47,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_off;
bool_t __read_mostly iommu_passthrough;
bool_t __read_mostly iommu_snoop = 1;
bool_t __read_mostly iommu_qinval = 1;
@@ -87,6 +88,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_off") )
+ iommu_igfx_off = val;
else if ( !strcmp(s, "verbose") )
iommu_verbose = val;
else if ( !strcmp(s, "snoop") )
diff --git a/xen/drivers/passthrough/vtd/quirks.c b/xen/drivers/passthrough/vtd/quirks.c
index 69d29ab..da1d853 100644
--- a/xen/drivers/passthrough/vtd/quirks.c
+++ b/xen/drivers/passthrough/vtd/quirks.c
@@ -77,7 +77,7 @@ int is_igd_vt_enabled_quirk(void)
/* integrated graphics on Intel platforms is located at 0:2.0 */
ggc = pci_conf_read16(0, 0, IGD_DEV, 0, GGC);
- return ( ggc & GGC_MEMORY_VT_ENABLED ? 1 : 0 );
+ return ( ggc & GGC_MEMORY_VT_ENABLED ? 1 : 0 ) && !iommu_igfx_off;
}
/*
diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h
index 8eb764a..2cdb0a9 100644
--- a/xen/include/xen/iommu.h
+++ b/xen/include/xen/iommu.h
@@ -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_off, iommu_passthrough;
extern bool_t iommu_snoop, iommu_qinval, iommu_intremap;
extern bool_t iommu_hap_pt_share;
extern bool_t iommu_debug;
--
2.4.3
next reply other threads:[~2015-07-17 19:05 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-17 19:05 Ting-Wei Lan [this message]
2015-07-17 19:36 ` [PATCH] VT-d: add iommu=igfx_off option to workaround graphics issues Andrew Cooper
2015-07-18 8:46 ` 藍挺瑋
2015-07-19 15:53 ` Julien Grall
2015-07-20 8:27 ` Andrew Cooper
2015-07-20 10:19 ` Julien Grall
2015-07-20 1:28 ` Tian, Kevin
2015-07-20 8:21 ` Andrew Cooper
2015-07-20 10:44 ` Ting-Wei Lan
2015-07-21 0:57 ` Tian, Kevin
2015-07-21 6:56 ` Jan Beulich
2015-07-21 7:05 ` Tian, Kevin
2015-07-21 7:16 ` Jan Beulich
2015-07-21 7:23 ` Tian, Kevin
2015-07-21 7:33 ` Jan Beulich
2015-07-23 16:41 ` Ting-Wei Lan
2015-07-20 8:46 ` Jan Beulich
2015-07-25 16:57 ` [PATCH v2] VT-d: add iommu=igfx " Ting-Wei Lan
2015-07-26 16:47 ` Andrew Cooper
2015-07-31 1:26 ` Tian, Kevin
2015-07-31 8:37 ` Ting-Wei Lan
2015-08-04 2:00 ` Tian, Kevin
2015-08-05 9:11 ` [PATCH v3] " Ting-Wei Lan
2015-08-05 12:18 ` Andrew Cooper
2015-08-05 13:35 ` Wei Liu
2015-08-05 17:10 ` [PATCH v4] " Ting-Wei Lan
2015-08-06 0:49 ` Tian, Kevin
2015-08-06 8:25 ` Wei Liu
2015-08-06 9:28 ` Ian Campbell
2015-07-20 12:12 ` [PATCH] VT-d: add iommu=igfx_off " Andrew Cooper
2015-07-20 12:24 ` Jan Beulich
2015-07-20 12:34 ` Andrew Cooper
2015-07-20 13:55 ` Jan Beulich
2015-07-20 14:12 ` Andrew Cooper
2015-07-20 14:25 ` Jan Beulich
2015-07-21 1:15 ` Tian, Kevin
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=1437159952-4134-1-git-send-email-lantw44@gmail.com \
--to=lantw44@gmail.com \
--cc=jbeulich@suse.com \
--cc=kevin.tian@intel.com \
--cc=xen-devel@lists.xen.org \
--cc=yang.z.zhang@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).