From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761691Ab0J2TUV (ORCPT ); Fri, 29 Oct 2010 15:20:21 -0400 Received: from claw.goop.org ([74.207.240.146]:50135 "EHLO claw.goop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758083Ab0J2TUT (ORCPT ); Fri, 29 Oct 2010 15:20:19 -0400 Message-ID: <4CCB1E71.3060600@goop.org> Date: Fri, 29 Oct 2010 12:20:17 -0700 From: Jeremy Fitzhardinge User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100921 Fedora/3.1.4-1.fc13 Lightning/1.0b3pre Thunderbird/3.1.4 MIME-Version: 1.0 To: Linus Torvalds CC: "Xen-devel@lists.xensource.com" , Linux Kernel Mailing List , Ian Campbell , Vasiliy G Tolstov Subject: Re: [GIT PULL] Small Xen bugfixes References: <4CCB1906.4000608@goop.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/29/2010 12:08 PM, Linus Torvalds wrote: > On Fri, Oct 29, 2010 at 11:57 AM, Jeremy Fitzhardinge wrote: >> * fix dom0 boot on systems whose E820 doesn't completely cover the >> ISA address space. This fixes a crash on a Dell R310. > Hmm. This clashes with my current tree. Bugger, so it does. I just did a test merge with no complaint though; what happened? I'll redo the patch anyway to fix the below. > And that conflict is trivial to fix up, but the thing is, I think the > patch that comes from your tree is worse than what is already there. > > Why is that simple unconditional > > e820_add_region(ISA_START_ADDRESS, ISA_END_ADDRESS - ISA_START_ADDRESS, > E820_RESERVED); > > not just always the right thing? Why do you have a separate hack for > dom0 in xen_release_chunk() instead? That just looks bogus. Yes, we actually had this discussion. I was for making the e820_add_region unconditional, and Ian's counter was that it could be done in the common code rather than Xen-specific. > The normal logic we use on PC's is to just always reserve the low 64kB > of memory, and the whole ISA space. Why doesn't Xen just do the same? The specific issue is that the Xen domain returns any memory that's not covered by an E820 entry back to Xen, mostly to make sure that memory isn't wasted by being shadowed by PCI devices. But it was also doing this in the sub-1M region, which on all the machines I've tested on is completely covered. But on a Dell R310 there's a little 2-page gap where some ACPI stuff is lurking, that was being released back to Xen so it couldn't be accessed from Linux any more. The fix is to just make sure the whole low region is covered (or at least the 640k-1M space). I'll rework the patch. Thanks, J From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: [GIT PULL] Small Xen bugfixes Date: Fri, 29 Oct 2010 12:20:17 -0700 Message-ID: <4CCB1E71.3060600@goop.org> References: <4CCB1906.4000608@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Linus Torvalds Cc: "Xen-devel@lists.xensource.com" , Linux Kernel Mailing List , Vasiliy G Tolstov , Ian Campbell List-Id: xen-devel@lists.xenproject.org On 10/29/2010 12:08 PM, Linus Torvalds wrote: > On Fri, Oct 29, 2010 at 11:57 AM, Jeremy Fitzhardinge wrote: >> * fix dom0 boot on systems whose E820 doesn't completely cover the >> ISA address space. This fixes a crash on a Dell R310. > Hmm. This clashes with my current tree. Bugger, so it does. I just did a test merge with no complaint though; what happened? I'll redo the patch anyway to fix the below. > And that conflict is trivial to fix up, but the thing is, I think the > patch that comes from your tree is worse than what is already there. > > Why is that simple unconditional > > e820_add_region(ISA_START_ADDRESS, ISA_END_ADDRESS - ISA_START_ADDRESS, > E820_RESERVED); > > not just always the right thing? Why do you have a separate hack for > dom0 in xen_release_chunk() instead? That just looks bogus. Yes, we actually had this discussion. I was for making the e820_add_region unconditional, and Ian's counter was that it could be done in the common code rather than Xen-specific. > The normal logic we use on PC's is to just always reserve the low 64kB > of memory, and the whole ISA space. Why doesn't Xen just do the same? The specific issue is that the Xen domain returns any memory that's not covered by an E820 entry back to Xen, mostly to make sure that memory isn't wasted by being shadowed by PCI devices. But it was also doing this in the sub-1M region, which on all the machines I've tested on is completely covered. But on a Dell R310 there's a little 2-page gap where some ACPI stuff is lurking, that was being released back to Xen so it couldn't be accessed from Linux any more. The fix is to just make sure the whole low region is covered (or at least the 640k-1M space). I'll rework the patch. Thanks, J