Re: [Xen-devel] [PATCH v2 1/2] x86: report use of PCID together with reporting XPTI status

2018-07-18 Thread Jan Beulich
>>> On 18.07.18 at 16:47, wrote: > On 18/07/18 10:19, Jan Beulich wrote: > On 18.07.18 at 10:46, wrote: >>> On 18/07/2018 09:33, Jan Beulich wrote: --- a/xen/include/asm-x86/spec_ctrl.h +++ b/xen/include/asm-x86/spec_ctrl.h @@ -38,6 +38,8 @@ extern uint8_t opt_xpti; #defi

Re: [Xen-devel] [PATCH v2 1/2] x86: report use of PCID together with reporting XPTI status

2018-07-18 Thread Andrew Cooper
On 18/07/18 10:19, Jan Beulich wrote: On 18.07.18 at 10:46, wrote: >> On 18/07/2018 09:33, Jan Beulich wrote: >>> --- a/xen/include/asm-x86/spec_ctrl.h >>> +++ b/xen/include/asm-x86/spec_ctrl.h >>> @@ -38,6 +38,8 @@ extern uint8_t opt_xpti; >>> #define OPT_XPTI_DOM0 0x01 >>> #define OPT_XP

Re: [Xen-devel] [PATCH v2 1/2] x86: report use of PCID together with reporting XPTI status

2018-07-18 Thread Jan Beulich
>>> On 18.07.18 at 10:46, wrote: > On 18/07/2018 09:33, Jan Beulich wrote: >> --- a/xen/include/asm-x86/spec_ctrl.h >> +++ b/xen/include/asm-x86/spec_ctrl.h >> @@ -38,6 +38,8 @@ extern uint8_t opt_xpti; >> #define OPT_XPTI_DOM0 0x01 >> #define OPT_XPTI_DOMU 0x02 >> >> +bool xpti_pcid_enabled

Re: [Xen-devel] [PATCH v2 1/2] x86: report use of PCID together with reporting XPTI status

2018-07-18 Thread Roger Pau Monné
On Wed, Jul 18, 2018 at 02:33:02AM -0600, Jan Beulich wrote: > Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné > v2: Add CONFIG_PV conditional. > > --- a/xen/arch/x86/pv/domain.c > +++ b/xen/arch/x86/pv/domain.c > @@ -288,6 +288,12 @@ int pv_domain_initialise(struct domain * > ret

Re: [Xen-devel] [PATCH v2 1/2] x86: report use of PCID together with reporting XPTI status

2018-07-18 Thread Andrew Cooper
On 18/07/2018 09:33, Jan Beulich wrote: > --- a/xen/include/asm-x86/spec_ctrl.h > +++ b/xen/include/asm-x86/spec_ctrl.h > @@ -38,6 +38,8 @@ extern uint8_t opt_xpti; > #define OPT_XPTI_DOM0 0x01 > #define OPT_XPTI_DOMU 0x02 > > +bool xpti_pcid_enabled(void); This still should be inside an CON

[Xen-devel] [PATCH v2 1/2] x86: report use of PCID together with reporting XPTI status

2018-07-18 Thread Jan Beulich
Signed-off-by: Jan Beulich --- v2: Add CONFIG_PV conditional. --- a/xen/arch/x86/pv/domain.c +++ b/xen/arch/x86/pv/domain.c @@ -288,6 +288,12 @@ int pv_domain_initialise(struct domain * return rc; } +bool __init xpti_pcid_enabled(void) +{ +return use_invpcid && cpu_has_pcid && +