Re: [Xen-devel] [PATCH 7/9] x86/amd: Support context switching legacy SSBD interface

2018-12-07 Thread Jan Beulich
>>> On 06.12.18 at 19:55, wrote: > On 06/12/2018 10:51, Jan Beulich wrote: >> >>> + unsigned int socket = c->phys_proc_id, core = c->cpu_core_id; >>> + struct ssbd_ls_cfg *cfg; >>> + uint64_t val; >>> + >>> + ASSERT(cpu_has_legacy_ssbd); >>> + >>> + /* >>> +* Update hardware lazily,

Re: [Xen-devel] [PATCH 7/9] x86/amd: Support context switching legacy SSBD interface

2018-12-06 Thread Andrew Cooper
On 06/12/2018 10:51, Jan Beulich wrote: > >> +unsigned int socket = c->phys_proc_id, core = c->cpu_core_id; >> +struct ssbd_ls_cfg *cfg; >> +uint64_t val; >> + >> +ASSERT(cpu_has_legacy_ssbd); >> + >> +/* >> + * Update hardware lazily, as these MSRs are expensive. However,

Re: [Xen-devel] [PATCH 7/9] x86/amd: Support context switching legacy SSBD interface

2018-12-06 Thread Jan Beulich
>>> On 03.12.18 at 17:18, wrote: > --- a/xen/arch/x86/cpu/amd.c > +++ b/xen/arch/x86/cpu/amd.c > @@ -442,6 +442,74 @@ static struct ssbd_ls_cfg { > } *ssbd_ls_cfg[4]; > static unsigned int ssbd_max_cores; > > +/* > + * Must only be called when the LEGACY_SSBD is in used. Called with NULL to

Re: [Xen-devel] [PATCH 7/9] x86/amd: Support context switching legacy SSBD interface

2018-12-04 Thread Woods, Brian
On Mon, Dec 03, 2018 at 04:18:20PM +, Andy Cooper wrote: > It is critical that MSR_AMD64_LS_CFG is never modified outside of this > function, to avoid trampling on sibling settings. > > For now, pass in NULL from the boot paths and just set Xen's default. Later > patches will plumb in guest