From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [RFC v1 4/8] x86/init: add linker table support Date: Thu, 21 Jan 2016 11:25:41 -0800 Message-ID: <56A130B5.8060701@zytor.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <56A0E0FB.6020809@oracle.com> Sender: linux-kernel-owner@vger.kernel.org To: Boris Ostrovsky , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , "Luis R. Rodriguez" , Konrad Rzeszutek Wilk , Stefano Stabellini 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" List-Id: xen-devel@lists.xenproject.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