Re: [PATCH 3/4] x86/boot/compressed/64: Introduce place_trampoline()

2017-11-10 Thread Ingo Molnar
* Kirill A. Shutemov wrote: > > One other detail I noticed: > > > > /* Bound size of trampoline code */ > > .orglvl5_trampoline_src + LVL5_TRAMPOLINE_CODE_SIZE > > > > will this generate a build error if the trampoline code exceeds 0x40? > > Yes,

Re: [PATCH 3/4] x86/boot/compressed/64: Introduce place_trampoline()

2017-11-10 Thread Ingo Molnar
* Kirill A. Shutemov wrote: > > One other detail I noticed: > > > > /* Bound size of trampoline code */ > > .orglvl5_trampoline_src + LVL5_TRAMPOLINE_CODE_SIZE > > > > will this generate a build error if the trampoline code exceeds 0x40? > > Yes, this is the point. Just a

Re: [PATCH 3/4] x86/boot/compressed/64: Introduce place_trampoline()

2017-11-10 Thread Kirill A. Shutemov
On Fri, Nov 10, 2017 at 10:29:33AM +0100, Ingo Molnar wrote: > > * Kirill A. Shutemov wrote: > > > --- a/arch/x86/boot/compressed/head_64.S > > +++ b/arch/x86/boot/compressed/head_64.S > > @@ -315,6 +315,18 @@ ENTRY(startup_64) > > * The first step is go

Re: [PATCH 3/4] x86/boot/compressed/64: Introduce place_trampoline()

2017-11-10 Thread Kirill A. Shutemov
On Fri, Nov 10, 2017 at 10:29:33AM +0100, Ingo Molnar wrote: > > * Kirill A. Shutemov wrote: > > > --- a/arch/x86/boot/compressed/head_64.S > > +++ b/arch/x86/boot/compressed/head_64.S > > @@ -315,6 +315,18 @@ ENTRY(startup_64) > > * The first step is go into compatibility mode. > >

Re: [PATCH 3/4] x86/boot/compressed/64: Introduce place_trampoline()

2017-11-10 Thread Kirill A. Shutemov
On Fri, Nov 10, 2017 at 10:28:12AM +0100, Ingo Molnar wrote: > > * Ingo Molnar wrote: > > > > --- a/arch/x86/boot/compressed/head_64.S > > > +++ b/arch/x86/boot/compressed/head_64.S > > > @@ -315,6 +315,18 @@ ENTRY(startup_64) > > >* The first step is go into compatibility

Re: [PATCH 3/4] x86/boot/compressed/64: Introduce place_trampoline()

2017-11-10 Thread Kirill A. Shutemov
On Fri, Nov 10, 2017 at 10:28:12AM +0100, Ingo Molnar wrote: > > * Ingo Molnar wrote: > > > > --- a/arch/x86/boot/compressed/head_64.S > > > +++ b/arch/x86/boot/compressed/head_64.S > > > @@ -315,6 +315,18 @@ ENTRY(startup_64) > > >* The first step is go into compatibility mode. > > >*/

Re: [PATCH 3/4] x86/boot/compressed/64: Introduce place_trampoline()

2017-11-10 Thread Kirill A. Shutemov
On Fri, Nov 10, 2017 at 10:14:53AM +0100, Ingo Molnar wrote: > I'm wondering, how did you test it if no current bootloader puts the kernel > to > above addresses of 4G? I didn't test it directly. I've checked with debugger that there's no memory accesses above 1M between disabling paging in

Re: [PATCH 3/4] x86/boot/compressed/64: Introduce place_trampoline()

2017-11-10 Thread Kirill A. Shutemov
On Fri, Nov 10, 2017 at 10:14:53AM +0100, Ingo Molnar wrote: > I'm wondering, how did you test it if no current bootloader puts the kernel > to > above addresses of 4G? I didn't test it directly. I've checked with debugger that there's no memory accesses above 1M between disabling paging in

Re: [PATCH 3/4] x86/boot/compressed/64: Introduce place_trampoline()

2017-11-10 Thread Ingo Molnar
* Kirill A. Shutemov wrote: > --- a/arch/x86/boot/compressed/head_64.S > +++ b/arch/x86/boot/compressed/head_64.S > @@ -315,6 +315,18 @@ ENTRY(startup_64) >* The first step is go into compatibility mode. >*/ > > + /* > + * Find

Re: [PATCH 3/4] x86/boot/compressed/64: Introduce place_trampoline()

2017-11-10 Thread Ingo Molnar
* Kirill A. Shutemov wrote: > --- a/arch/x86/boot/compressed/head_64.S > +++ b/arch/x86/boot/compressed/head_64.S > @@ -315,6 +315,18 @@ ENTRY(startup_64) >* The first step is go into compatibility mode. >*/ > > + /* > + * Find suitable place for trampoline and

Re: [PATCH 3/4] x86/boot/compressed/64: Introduce place_trampoline()

2017-11-10 Thread Ingo Molnar
* Ingo Molnar wrote: > > --- a/arch/x86/boot/compressed/head_64.S > > +++ b/arch/x86/boot/compressed/head_64.S > > @@ -315,6 +315,18 @@ ENTRY(startup_64) > > * The first step is go into compatibility mode. > > */ > > > > + /* > > +* Find suitable place for

Re: [PATCH 3/4] x86/boot/compressed/64: Introduce place_trampoline()

2017-11-10 Thread Ingo Molnar
* Ingo Molnar wrote: > > --- a/arch/x86/boot/compressed/head_64.S > > +++ b/arch/x86/boot/compressed/head_64.S > > @@ -315,6 +315,18 @@ ENTRY(startup_64) > > * The first step is go into compatibility mode. > > */ > > > > + /* > > +* Find suitable place for trampoline and

Re: [PATCH 3/4] x86/boot/compressed/64: Introduce place_trampoline()

2017-11-10 Thread Ingo Molnar
* Kirill A. Shutemov wrote: > If bootloader enables 64-bit mode with 4-level paging, we need to > switch over to 5-level paging. The switching requires disabling paging. > It works fine if kernel itself is loaded below 4G. > > If bootloader put the kernel above

Re: [PATCH 3/4] x86/boot/compressed/64: Introduce place_trampoline()

2017-11-10 Thread Ingo Molnar
* Kirill A. Shutemov wrote: > If bootloader enables 64-bit mode with 4-level paging, we need to > switch over to 5-level paging. The switching requires disabling paging. > It works fine if kernel itself is loaded below 4G. > > If bootloader put the kernel above 4G (not sure if anybody does

Re: [PATCH 3/4] x86/boot/compressed/64: Introduce place_trampoline()

2017-11-10 Thread Ingo Molnar
* Kirill A. Shutemov wrote: > If bootloader enables 64-bit mode with 4-level paging, we need to > switch over to 5-level paging. The switching requires disabling paging. > It works fine if kernel itself is loaded below 4G. > > If bootloader put the kernel above

Re: [PATCH 3/4] x86/boot/compressed/64: Introduce place_trampoline()

2017-11-10 Thread Ingo Molnar
* Kirill A. Shutemov wrote: > If bootloader enables 64-bit mode with 4-level paging, we need to > switch over to 5-level paging. The switching requires disabling paging. > It works fine if kernel itself is loaded below 4G. > > If bootloader put the kernel above 4G (not sure if anybody does

[PATCH 3/4] x86/boot/compressed/64: Introduce place_trampoline()

2017-11-01 Thread Kirill A. Shutemov
If bootloader enables 64-bit mode with 4-level paging, we need to switch over to 5-level paging. The switching requires disabling paging. It works fine if kernel itself is loaded below 4G. If bootloader put the kernel above 4G (not sure if anybody does this), we would loose control as soon as

[PATCH 3/4] x86/boot/compressed/64: Introduce place_trampoline()

2017-11-01 Thread Kirill A. Shutemov
If bootloader enables 64-bit mode with 4-level paging, we need to switch over to 5-level paging. The switching requires disabling paging. It works fine if kernel itself is loaded below 4G. If bootloader put the kernel above 4G (not sure if anybody does this), we would loose control as soon as

[PATCH 3/4] x86/boot/compressed/64: Introduce place_trampoline()

2017-10-20 Thread Kirill A. Shutemov
If bootloader enables 64-bit mode with 4-level paging, we need to switch over to 5-level paging. The switching requires disabling paging. It works fine if kernel itself is loaded below 4G. If bootloader put the kernel above 4G (not sure if anybody does this), we would loose control as soon as

[PATCH 3/4] x86/boot/compressed/64: Introduce place_trampoline()

2017-10-20 Thread Kirill A. Shutemov
If bootloader enables 64-bit mode with 4-level paging, we need to switch over to 5-level paging. The switching requires disabling paging. It works fine if kernel itself is loaded below 4G. If bootloader put the kernel above 4G (not sure if anybody does this), we would loose control as soon as