Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1314474

Re: [RFC v1 4/8] x86/init: add linker table support

From "H. Peter Anvin" <hpa@zytor.com>
Newsgroups linux.kernel
Subject Re: [RFC v1 4/8] x86/init: add linker table support
Date 2016-01-21 21:00 +0100
Message-ID <qTtyF-1tD-9@gated-at.bofh.it> (permalink)
References (3 earlier) <qT8DU-3Q7-9@gated-at.bofh.it> <qTiWC-2IG-13@gated-at.bofh.it> <qTnMC-5Vj-11@gated-at.bofh.it> <qTt5G-1hZ-45@gated-at.bofh.it> <qTtoZ-1qg-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 01/21/16 11:46, Luis R. Rodriguez wrote:
> On Thu, Jan 21, 2016 at 11:25 AM, H. Peter Anvin <hpa@zytor.com> wrote:
>>> 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.
> 
> To be clear, with the subarchand linker table suggested in my patch
> series, it should be possible to have the same exact entry point, the
> Xen PV setup code could run early in the order. For instance in the
> linker table we could use the reserved order levels 01-09 for PV
> hypervisor code:
> 
> +/* Init order levels, we can start at 01 but reserve 01-09 for now */
> +#define X86_INIT_ORDER_EARLY   10
> +#define X86_INIT_ORDER_NORMAL  30
> +#define X86_INIT_ORDER_LATE    50
> 
> So perhaps X86_INIT_ORDER_PV as 05 later.
> 
> The standard x86 init would just then be:
> 
> asmlinkage __visible void __init x86_64_start_kernel(char * real_mode_data)
> {
>         x86_init_fn_init_tables();
>         x86_init_fn_early_init();
> }
> 
> The PV init code would kick in early and could parse the
> boot_params.hdr.hardware_subarch_data pointer as it sees fit.
> 

Right... we already do that.

I don't even think you need to initialize any tables.  At least on i386,
we have to do this in assembly code.  However, it is just a simple table
walk.  :)

	-hpa

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [RFC v1 4/8] x86/init: add linker table support "Luis R. Rodriguez" <mcgrof@do-not-panic.com> - 2016-01-20 22:40 +0100
  Re: [RFC v1 4/8] x86/init: add linker table support "H. Peter Anvin" <hpa@zytor.com> - 2016-01-20 22:50 +0100
    Re: [RFC v1 4/8] x86/init: add linker table support "Luis R. Rodriguez" <mcgrof@do-not-panic.com> - 2016-01-20 23:20 +0100
      Re: [RFC v1 4/8] x86/init: add linker table support "H. Peter Anvin" <hpa@zytor.com> - 2016-01-20 23:30 +0100
        Re: [RFC v1 4/8] x86/init: add linker table support "Luis R. Rodriguez" <mcgrof@do-not-panic.com> - 2016-01-22 01:30 +0100
          Re: [RFC v1 4/8] x86/init: add linker table support "H. Peter Anvin" <hpa@zytor.com> - 2016-01-22 01:50 +0100
  Re: [RFC v1 4/8] x86/init: add linker table support Roger Pau Monné <roger.pau@citrix.com> - 2016-01-21 09:40 +0100
    Re: [RFC v1 4/8] x86/init: add linker table support Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-01-21 14:50 +0100
      Re: [RFC v1 4/8] x86/init: add linker table support "H. Peter Anvin" <hpa@zytor.com> - 2016-01-21 20:30 +0100
        Re: [RFC v1 4/8] x86/init: add linker table support "Luis R. Rodriguez" <mcgrof@do-not-panic.com> - 2016-01-21 20:50 +0100
          Re: [RFC v1 4/8] x86/init: add linker table support "H. Peter Anvin" <hpa@zytor.com> - 2016-01-21 21:00 +0100
            Re: [RFC v1 4/8] x86/init: add linker table support "Luis R. Rodriguez" <mcgrof@do-not-panic.com> - 2016-01-22 01:30 +0100
          Re: [RFC v1 4/8] x86/init: add linker table support "H. Peter Anvin" <hpa@zytor.com> - 2016-01-21 21:00 +0100
            Re: [RFC v1 4/8] x86/init: add linker table support "Luis R. Rodriguez" <mcgrof@do-not-panic.com> - 2016-01-21 21:10 +0100
              Re: [RFC v1 4/8] x86/init: add linker table support "H. Peter Anvin" <hpa@zytor.com> - 2016-01-21 22:40 +0100

csiph-web