[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v6.5 26/26] x86/idle: Clear SPEC_CTRL while idle
>>> On 04.01.18 at 01:15, <andrew.cooper3@xxxxxxxxxx> wrote: > @@ -31,6 +33,38 @@ static inline void init_shadow_spec_ctrl_state(void) > info->shadow_spec_ctrl = info->use_shadow_spec_ctrl = 0; > } > > +/* WARNING! `ret`, `call *`, `jmp *` not safe after this call. */ > +static always_inline void spec_ctrl_enter_idle(struct cpu_info *info) > +{ > + uint32_t val = 0; > + > + /* > + * Latch the new shadow value, then enable shadowing, then update the > MSR. > + * There are no SMP issues here; only local processor ordering concerns. > + */ > + info->shadow_spec_ctrl = val; > + barrier(); > + info->use_shadow_spec_ctrl = true; > + barrier(); > + asm volatile (ALTERNATIVE(ASM_NOP3, "wrmsr", X86_FEATURE_XEN_IBRS_SET) > + :: "a" (val), "c" (MSR_SPEC_CTRL), "d" (0) : "memory"); Missing blanks immediately inside the outermost parentheses (also another time further down). 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 |