lkml.org 
[lkml]   [2020]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 67/72] x86/smpboot: Load TSS and getcpu GDT entry before loading IDT
On Tue, Sep 08, 2020 at 07:20:42PM +0200, Borislav Petkov wrote:
> On Mon, Sep 07, 2020 at 03:16:08PM +0200, Joerg Roedel wrote:
> > +void cpu_init_exception_handling(void)
> > +{
> > + struct tss_struct *tss = this_cpu_ptr(&cpu_tss_rw);
> > + int cpu = raw_smp_processor_id();
> > +
> > + /* paranoid_entry() gets the CPU number from the GDT */
> > + setup_getcpu(cpu);
> > +
> > + /* IST vectors need TSS to be set up. */
> > + tss_setup_ist(tss);
> > + tss_setup_io_bitmap(tss);
> > + set_tss_desc(cpu, &get_cpu_entry_area(cpu)->tss.x86_tss);
> > +
> > + load_TR_desc();
>
> Aha, this is what you mean here in your 0th message. I'm guessing it is
> ok to do those things twice in start_secondary...

Yes, I think its best to do it twice, so that cpu_init() stays the CPU
state barrier it should be, independent of what happens before.


Joerg

\
 
 \ /
  Last update: 2020-09-08 20:54    [W:0.121 / U:3.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site