From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932383AbZEHSsh (ORCPT ); Fri, 8 May 2009 14:48:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932343AbZEHSrt (ORCPT ); Fri, 8 May 2009 14:47:49 -0400 Received: from mga02.intel.com ([134.134.136.20]:7344 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932371AbZEHSrr (ORCPT ); Fri, 8 May 2009 14:47:47 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.40,318,1239001200"; d="scan'208";a="410796669" Message-ID: <4A047E53.8040003@intel.com> Date: Fri, 08 May 2009 11:47:47 -0700 From: "H. Peter Anvin" User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: "Eric W. Biederman" CC: "H. Peter Anvin" , "linux-kernel@vger.kernel.org" , "vgoyal@redhat.com" , "hbabu@us.ibm.com" , "kexec@lists.infradead.org" , "Huang, Ying" , "mingo@elte.hu" , "tglx@linutronix.de" , "sam@ravnborg.org" Subject: Re: [PATCH 00/14] RFC: x86: relocatable kernel changes References: <1241735222-6640-1-git-send-email-hpa@linux.intel.com> <4A03C3BB.3070401@intel.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Eric W. Biederman wrote: > > Perhaps we should have: > init_size > best start (As a 64bit field please) > optimum align (Or we flip it around) > Thinking about this some more, I think you have a very good idea here. Specifically, if we retcon the existing kernel_alignment field as "preferred alignment" (ignoring the naming issue for a bit), we can set that to 16 MB, which should give us correct behavior for all previously existing bootloaders. Then we create a new "minimum alignment" field that newer bootloaders can use to relax the alignment requirement -- all the way down to 4K in the case of i386. We document this field indicating that the bootloader should find the highest power of 2 <= preferred alignment, but down to this number. The preferred address field becomes a readonly, advisory field; with it being readonly there aren't any funny issues with a strange loader writing a 64-bit address for a kernel which can't handle it (64-bit loading will still need substantial protocol changes, including how to find the entry point.) Does that work for you? That *should* address all your concerns, right? -hpa From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mga02.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1M2V6s-0004CF-Jy for kexec@lists.infradead.org; Fri, 08 May 2009 18:48:00 +0000 Message-ID: <4A047E53.8040003@intel.com> Date: Fri, 08 May 2009 11:47:47 -0700 From: "H. Peter Anvin" MIME-Version: 1.0 Subject: Re: [PATCH 00/14] RFC: x86: relocatable kernel changes References: <1241735222-6640-1-git-send-email-hpa@linux.intel.com> <4A03C3BB.3070401@intel.com> In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: kexec-bounces@lists.infradead.org Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: "Eric W. Biederman" Cc: "kexec@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "hbabu@us.ibm.com" , "Huang, Ying" , "mingo@elte.hu" , "H. Peter Anvin" , "sam@ravnborg.org" , "tglx@linutronix.de" , "vgoyal@redhat.com" Eric W. Biederman wrote: > > Perhaps we should have: > init_size > best start (As a 64bit field please) > optimum align (Or we flip it around) > Thinking about this some more, I think you have a very good idea here. Specifically, if we retcon the existing kernel_alignment field as "preferred alignment" (ignoring the naming issue for a bit), we can set that to 16 MB, which should give us correct behavior for all previously existing bootloaders. Then we create a new "minimum alignment" field that newer bootloaders can use to relax the alignment requirement -- all the way down to 4K in the case of i386. We document this field indicating that the bootloader should find the highest power of 2 <= preferred alignment, but down to this number. The preferred address field becomes a readonly, advisory field; with it being readonly there aren't any funny issues with a strange loader writing a 64-bit address for a kernel which can't handle it (64-bit loading will still need substantial protocol changes, including how to find the entry point.) Does that work for you? That *should* address all your concerns, right? -hpa _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec