Re: [PATCH v7 67/72] x86/smpboot: Load TSS and getcpu GDT entry before loading IDT
From: Joerg Roedel <hidden>
Date: 2020-09-08 18:54:04
Also in:
kvm, lkml
From: Joerg Roedel <hidden>
Date: 2020-09-08 18:54:04
Also in:
kvm, lkml
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:quoted
+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@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization