[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86: Move microcode loading earlier
Hi Andrew, On 19/04/17 12:12, Andrew Cooper wrote: On 18/04/17 16:47, Ross Lagerwall wrote:Move microcode loading earlier for the boot CPU and secondary CPUs so that it takes place before identify_cpu() is called for each CPU. Without this, the detected features may be wrong if the new microcode loading adjusts the feature bits. That could mean that some fixes (e.g. d6e9f8d4f35d ("x86/vmx: fix vmentry failure with TSX bits in LBR")) don't work as expected. Previously during boot, the microcode loader was invoked for each secondary CPU started and then again for each CPU as part of an initcall. Simplify the code so that it is invoked exactly once for each CPU during boot. Signed-off-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>CC'ing Julien. This should be taken in 4.9 This also resolves my LBR XTF test, so Tested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Also, Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, with 3 corrections (which I can fix on commit) Release-acked-by: Julien Grall <julien.grall@xxxxxxx> Cheers, @@ -409,50 +381,55 @@ static struct notifier_block microcode_percpu_nfb = { .notifier_call = microcode_percpu_callback, }; -static int __init microcode_presmp_init(void) +int __init early_microcode_update_cpu(bool_t start_update)s/bool_t/bool/ throughout.diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c index 82559ed..4e01c7b 100644 --- a/xen/arch/x86/smpboot.c +++ b/xen/arch/x86/smpboot.c @@ -83,22 +83,22 @@ static enum cpu_state { void *stack_base[NR_CPUS]; +void initialize_cpu_data(unsigned int cpu) +{ + *(cpu_data + cpu) = boot_cpu_data;cpu_data[cpu] = boot_cpu_data;+} + static void smp_store_cpu_info(int id) { - struct cpuinfo_x86 *c = cpu_data + id; unsigned int socket; - *c = boot_cpu_data; - if ( id != 0 ) - { - identify_cpu(c); + identify_cpu(cpu_data + id);&cpu_data[id] ~Andrew -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |