From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH] xen/x86: Force removal of memory range when not covered by MTRRs Date: Fri, 15 Feb 2013 11:40:10 -0500 Message-ID: <20130215164010.GE13775@phenom.dumpdata.com> References: <1360861916-21243-1-git-send-email-stefan.bader@canonical.com> <511E0BBE02000078000BE9A8@nat28.tlf.novell.com> <511E0F34.6010107@canonical.com> <511E268002000078000BE9FA@nat28.tlf.novell.com> <20130215134720.GG11777@phenom.dumpdata.com> <511E59C902000078000BEC18@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <511E59C902000078000BEC18@nat28.tlf.novell.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: Jan Beulich Cc: Stefan Bader , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Fri, Feb 15, 2013 at 02:52:41PM +0000, Jan Beulich wrote: > >>> On 15.02.13 at 14:47, Konrad Rzeszutek Wilk wrote: > >> >> Since when is E820_UNUSABLE memory being used as guest > >> >> memory? If that's indeed the case, that's the bug to fix. The > >> >> above data to me shows, however, that the range above > >> >> 228000000 is considered invalid. So then the question is why the > >> >> kernel tries to map that memory in the first place (the hypervisor > >> >> rejecting the attempt, despite Dom0 being privileged, seems > >> >> correct to me, as the range is also known not to be MMIO). > > > > B/c it gets the E820 from the hypervisor, which shows that area as > > E820_UNUSABLE. And dom0 (or rather, the generic memory code) ends up > > creating pagetables for it. > > That would be wrong even on native, and I don't see how that > would happen: memblock_add() gets called from > memblock_x86_fill() only for E820_RAM and E820_RESERVED_KERN > ranges. Hm, the bug report shows that the ranges (which are E820_UNUSABLE) do get called with init_memory_mapping.