[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v10 07/16] microcode/amd: call svm_host_osvw_init() in common code
On 12.09.2019 09:22, Chao Gao wrote: > Introduce a vendor hook, .end_update_percpu, for svm_host_osvw_init(). > The hook function is called on each cpu after loading an update. > It is a preparation for spliting out apply_microcode() from > cpu_request_microcode(). > > Note that svm_host_osvm_init() should be called regardless of the > result of loading an update. > > Signed-off-by: Chao Gao <chao.gao@xxxxxxxxx> > Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> albeit with one further remark: > @@ -613,29 +609,32 @@ static int cpu_request_microcode(const void *buf, > size_t bufsize) > return error; > } > > +#ifdef CONFIG_HVM > static int start_update(void) > { > -#if CONFIG_HVM > /* > - * We assume here that svm_host_osvw_init() will be called on each cpu > (from > - * cpu_request_microcode()). > - * > - * Note that if collect_cpu_info() returns an error then > - * cpu_request_microcode() will not invoked thus leaving OSVW bits not > - * updated. Currently though collect_cpu_info() will not fail on > processors > - * supporting OSVW so we will not deal with this possibility. > + * svm_host_osvw_init() will be called on each cpu by calling > '.end_update' > + * in common code. > */ > svm_host_osvw_reset(); > -#endif > > return 0; > } > > +static void end_update_percpu(void) > +{ > + svm_host_osvw_init(); > +} I don't see the need for this wrapper, you could ... > +#endif > + > static const struct microcode_ops microcode_amd_ops = { > .cpu_request_microcode = cpu_request_microcode, > .collect_cpu_info = collect_cpu_info, > .apply_microcode = apply_microcode, > +#ifdef CONFIG_HVM > .start_update = start_update, > + .end_update_percpu = end_update_percpu, ... use svm_host_osvw_init here directly. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |