From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753114AbcAUT0v (ORCPT ); Thu, 21 Jan 2016 14:26:51 -0500 Received: from terminus.zytor.com ([198.137.202.10]:57817 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753019AbcAUT0t (ORCPT ); Thu, 21 Jan 2016 14:26:49 -0500 Subject: Re: [RFC v1 4/8] x86/init: add linker table support To: Boris Ostrovsky , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , "Luis R. Rodriguez" , Konrad Rzeszutek Wilk , Stefano Stabellini References: <1450217797-19295-1-git-send-email-mcgrof@do-not-panic.com> <1450217797-19295-5-git-send-email-mcgrof@do-not-panic.com> <20160120210014.GF4769@char.us.oracle.com> <56A0990C.9090601@citrix.com> <56A0E0FB.6020809@oracle.com> Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Rusty Russell , Andy Lutomirski , mcb30@ipxe.org, Juergen Gross , Jan Beulich , joro@8bytes.org, Andrey Ryabinin , andreyknvl@google.com, long.wanglong@huawei.com, qiuxishi@huawei.com, aryabinin@virtuozzo.com, Mauro Carvalho Chehab , Valentin Rothberg , Peter Senna Tschudin , X86 ML , "xen-devel@lists.xensource.com" , "linux-kernel@vger.kernel.org" From: "H. Peter Anvin" Message-ID: <56A130B5.8060701@zytor.com> Date: Thu, 21 Jan 2016 11:25:41 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <56A0E0FB.6020809@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/21/16 05:45, Boris Ostrovsky wrote: >> I don't think the hypervisor should be setting Linux specific boot >> related parameters, the boot ABI should be OS agnostic. IMHO, a small >> shim should be added to Linux in order to set what Linux requires when >> entering from a Xen entry point. For the record, this is exactly what hardware_subarch is meant to do: revector to a stub to do this kind of setup, for a subarchitecture which doesn't have a natural stub like BIOS or EFI. In the case of Xen PV, or lguest, there are special care that has to be done very early in the path due to the nonstandard handling of page tables, which is another reason for this field. > And that's exactly what HVMlite does. Most of this shim layer is setting > up boot_params, after which we jump to standard x86 boot path (i.e. > startup_{32|64}). With hardware_subarch set to zero. Which is the way to do it as long as the early code can be the same. -hpa