Re: [PATCH v2 05/18] x86/fixmap: Generalize the GDT fixmap mechanism

2017-11-23 Thread Thomas Gleixner
On Tue, 21 Nov 2017, Andy Lutomirski wrote: > Currently, the GDT is an ad-hoc array of pages, one per CPU, in the > fixmap. Generalize it to be an array of a new struct cpu_entry_area > so that we can cleanly add new things to it. > > Signed-off-by: Andy Lutomirski > +/* > + * cpu_entry_area i

Re: [PATCH v2 05/18] x86/fixmap: Generalize the GDT fixmap mechanism

2017-11-23 Thread Andy Lutomirski
On Wed, Nov 22, 2017 at 9:32 AM, Borislav Petkov wrote: > On Wed, Nov 22, 2017 at 09:16:00AM -0800, Andy Lutomirski wrote: >> Agreed, except that the fixmap enum needs to know >> sizeof(cpu_entry_area), and I'm really hesitant to add yet another >> header dependency. > > Perhaps a separate asm/cpu

Re: [PATCH v2 05/18] x86/fixmap: Generalize the GDT fixmap mechanism

2017-11-22 Thread Borislav Petkov
On Wed, Nov 22, 2017 at 09:16:00AM -0800, Andy Lutomirski wrote: > Agreed, except that the fixmap enum needs to know > sizeof(cpu_entry_area), and I'm really hesitant to add yet another > header dependency. Perhaps a separate asm/cpuarea.h. asm/cpu.h looks small enough but it has hotplug and other

Re: [PATCH v2 05/18] x86/fixmap: Generalize the GDT fixmap mechanism

2017-11-22 Thread Andy Lutomirski
On Wed, Nov 22, 2017 at 7:33 AM, Borislav Petkov wrote: > On Tue, Nov 21, 2017 at 08:44:00PM -0800, Andy Lutomirski wrote: >> Currently, the GDT is an ad-hoc array of pages, one per CPU, in the >> fixmap. Generalize it to be an array of a new struct cpu_entry_area >> so that we can cleanly add ne

Re: [PATCH v2 05/18] x86/fixmap: Generalize the GDT fixmap mechanism

2017-11-22 Thread Borislav Petkov
On Tue, Nov 21, 2017 at 08:44:00PM -0800, Andy Lutomirski wrote: > Currently, the GDT is an ad-hoc array of pages, one per CPU, in the > fixmap. Generalize it to be an array of a new struct cpu_entry_area > so that we can cleanly add new things to it. > > Signed-off-by: Andy Lutomirski > --- >

[PATCH v2 05/18] x86/fixmap: Generalize the GDT fixmap mechanism

2017-11-21 Thread Andy Lutomirski
Currently, the GDT is an ad-hoc array of pages, one per CPU, in the fixmap. Generalize it to be an array of a new struct cpu_entry_area so that we can cleanly add new things to it. Signed-off-by: Andy Lutomirski --- arch/x86/include/asm/desc.h | 9 + arch/x86/include/asm/fixmap.h | 3