Re: [PATCH v7 67/72] x86/smpboot: Load TSS and getcpu GDT entry before loading IDT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization



[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux