From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Hao, Xudong" Subject: Re: [PATCH] xen/SandyBridge: reserve pages when integrated graphics Date: Sat, 23 Mar 2013 14:51:56 +0000 Message-ID: <403610A45A2B5242BD291EDAE8B37D300FFB3A4E@SHSMSX102.ccr.corp.intel.com> References: <1363938487-11153-1-git-send-email-xudong.hao@intel.com> <514C3FF802000078000C7B28@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <514C3FF802000078000C7B28@nat28.tlf.novell.com> Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: "keir@xen.org" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org > -----Original Message----- > From: Jan Beulich [mailto:JBeulich@suse.com] > Sent: Friday, March 22, 2013 6:27 PM > To: Hao, Xudong > Cc: xen-devel@lists.xen.org; keir@xen.org > Subject: Re: [PATCH] xen/SandyBridge: reserve pages when integrated graphics > > >>> On 22.03.13 at 08:48, Xudong Hao wrote: > > +char *__init get_platform_badpages(void) > > +{ > > + u32 igd_id; > > + static char __initdata bad_pfns[] = > > + {"0x20050,0x20110,0x20130,0x20138,0x40004"}; > > With quite a bit of trouble I managed to find all applicable spec > updates, but none of them mentions 0x20110. > I did not get detail spec either, but linux kernel has remove this page 0x20110000 already for the same reason, refer to commit: a9acc5365dbda29f7be2884efb63771dc24bd815 > > +#ifdef CONFIG_X86 > > + /* > > + * Here we put platform-specific memory range workarounds, i.e. > > + * memory known to be corrupt or otherwise in need to be reserved on > > + * specific platforms. > > + * We get these certain pages and put them in bad-page list. > > + */ > > + p = get_platform_badpages(); > > + if ( p ) > > + remove_bad_pages(p); > > +#endif > > I also dislike the re-use of the command line parsing code here. > There's no need to do this for a list of known MFNs, the hook > could provide an array of unsigned long instead. > Right. bootmem_region_zap() can do this directly. > And finally it is my understanding that these pages aren't bad in > any way, it must only be ensured they don't get passed to the > graphics engine. Which in particular means using these pages for > Xen's own purposes (i.e. not passing them to any domain) would > be quite fine. Yes, I realize it's only a handful of pages, but it > seems odd anyway. > We all know these pages can be used for Xen, but not for domains. But as you said, it's only 5 pages, the simplest solution is removing them in xen starting, so that they don't be allocate to any domains. -Thanks Xudong