aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/mm.c
diff options
context:
space:
mode:
authorXudong Hao <xudong.hao@intel.com>2013-03-26 14:22:07 +0100
committerJan Beulich <jbeulich@suse.com>2013-03-26 14:22:07 +0100
commitdb537fe3023bf157b85c8246782cb72a6f989b31 (patch)
tree552d8ac07bffa0e516a260b8c2f74d9a58aaeb09 /xen/arch/x86/mm.c
parentbabea0a412ee24a94ed0bd03543060b2c6bc0bbd (diff)
downloadxen-db537fe3023bf157b85c8246782cb72a6f989b31.tar.gz
xen-db537fe3023bf157b85c8246782cb72a6f989b31.tar.bz2
xen-db537fe3023bf157b85c8246782cb72a6f989b31.zip
x86: reserve pages when SandyBridge integrated graphics
SNB graphics devices have a bug that prevent them from accessing certain memory ranges, namely anything below 1M and in the pages listed in the table. Xen does not initialize below 1MB to heap, i.e. below 1MB pages don't be allocated, so it's unnecessary to reserve memory below the 1 MB mark that has not already been reserved. So reserve those pages listed in the table at xen boot if set detect a SNB gfx device on the CPU to avoid GPU hangs. Signed-off-by: Xudong Hao <xudong.hao@intel.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/mm.c')
-rw-r--r--xen/arch/x86/mm.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index d00d9a2a70..58e140203d 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -121,6 +121,7 @@
#include <xen/trace.h>
#include <asm/setup.h>
#include <asm/fixmap.h>
+#include <asm/pci.h>
/* Mapping of the fixmap space needed early. */
l1_pgentry_t __attribute__ ((__section__ (".bss.page_aligned")))
@@ -5824,6 +5825,25 @@ void arch_dump_shared_mem_info(void)
mem_sharing_get_nr_saved_mfns());
}
+const unsigned long *__init get_platform_badpages(unsigned int *array_size)
+{
+ u32 igd_id;
+ static unsigned long __initdata bad_pages[] = {
+ 0x20050000,
+ 0x20110000,
+ 0x20130000,
+ 0x20138000,
+ 0x40004000,
+ };
+
+ *array_size = ARRAY_SIZE(bad_pages);
+ igd_id = pci_conf_read32(0, 0, 2, 0, 0);
+ if ( !IS_SNB_GFX(igd_id) )
+ return NULL;
+
+ return bad_pages;
+}
+
/*
* Local variables:
* mode: C