Re: [Xen-devel] [PATCH v2 3/6] xen/x86: support per-domain flag for xpti

2018-03-08 Thread Juergen Gross
On 08/03/18 13:49, Jan Beulich wrote: On 08.03.18 at 12:30, wrote: >> On 08/03/18 11:17, Jan Beulich wrote: >> On 02.03.18 at 09:14, wrote: +static int parse_xpti(const char *s) +{ +int rc = 0; + +switch ( parse_bool(s, NULL) ) +{ +case

Re: [Xen-devel] [PATCH v2 3/6] xen/x86: support per-domain flag for xpti

2018-03-08 Thread Jan Beulich
>>> On 08.03.18 at 12:30, wrote: > On 08/03/18 11:17, Jan Beulich wrote: > On 02.03.18 at 09:14, wrote: >>> +static int parse_xpti(const char *s) >>> +{ >>> +int rc = 0; >>> + >>> +switch ( parse_bool(s, NULL) ) >>> +{ >>> +case 0: >>> +opt_xpti = XPTI_OFF; >>> +

Re: [Xen-devel] [PATCH v2 3/6] xen/x86: support per-domain flag for xpti

2018-03-08 Thread Juergen Gross
On 08/03/18 11:17, Jan Beulich wrote: On 02.03.18 at 09:14, wrote: >> --- a/xen/arch/x86/mm.c >> +++ b/xen/arch/x86/mm.c >> @@ -510,15 +510,19 @@ void make_cr3(struct vcpu *v, mfn_t mfn) >> >> void write_ptbase(struct vcpu *v) >> { >> -if ( this_cpu(root_pgt) && is_pv_vcpu(v) && !is_p

Re: [Xen-devel] [PATCH v2 3/6] xen/x86: support per-domain flag for xpti

2018-03-08 Thread Jan Beulich
>>> On 02.03.18 at 09:14, wrote: > --- a/xen/arch/x86/mm.c > +++ b/xen/arch/x86/mm.c > @@ -510,15 +510,19 @@ void make_cr3(struct vcpu *v, mfn_t mfn) > > void write_ptbase(struct vcpu *v) > { > -if ( this_cpu(root_pgt) && is_pv_vcpu(v) && !is_pv_32bit_vcpu(v) ) > +if ( is_pv_vcpu(v) &&

[Xen-devel] [PATCH v2 3/6] xen/x86: support per-domain flag for xpti

2018-03-02 Thread Juergen Gross
Instead of switching XPTI globally on or off add a per-domain flag for that purpose. This allows to modify the xpti boot parameter to support running dom0 without Meltdown mitigations. Using "xpti=nodom0" as boot parameter will achieve that. Move the xpti boot parameter handling to xen/arch/x86/pv