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

2018-07-18 Thread Jan Beulich
>>> On 17.07.18 at 22:52, wrote: > On Mon, Jul 16, 2018 at 10:45:15AM -0600, Jan Beulich wrote: >> --- a/xen/arch/x86/spec_ctrl.c >> +++ b/xen/arch/x86/spec_ctrl.c >> @@ -256,9 +256,10 @@ static void __init print_details(enum in >> boot_cpu_has(X86_FEATURE_SC_RSB_HVM) ? " RSB"

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

2018-07-17 Thread Doug Goldstein
On Mon, Jul 16, 2018 at 10:45:15AM -0600, Jan Beulich wrote: > Signed-off-by: Jan Beulich > > --- 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) > +{ > +

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

2018-07-17 Thread Jan Beulich
>>> On 17.07.18 at 13:05, wrote: > On Mon, Jul 16, 2018 at 10:45:15AM -0600, Jan Beulich wrote: >> Signed-off-by: Jan Beulich >> >> --- 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; >> } >> >>

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

2018-07-17 Thread Roger Pau Monné
On Mon, Jul 16, 2018 at 10:45:15AM -0600, Jan Beulich wrote: > Signed-off-by: Jan Beulich > > --- 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) > +{ > +

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

2018-07-16 Thread Andrew Cooper
On 16/07/18 17:45, 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); To be used in the way you want,

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

2018-07-16 Thread Jan Beulich
Signed-off-by: Jan Beulich --- 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 && + (opt_pcid == PCID_ALL ||