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

2018-03-22 Thread Juergen Gross
On 22/03/18 16:44, Jan Beulich wrote: On 22.03.18 at 16:29, wrote: >> On 22/03/18 16:26, Jan Beulich wrote: >> On 21.03.18 at 13:51, wrote: +void xpti_domain_init(struct domain *d) +{ +if ( !is_pv_domain(d) || is_pv_32bit_domain(d) )

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

2018-03-22 Thread Jan Beulich
>>> On 22.03.18 at 16:29, wrote: > On 22/03/18 16:26, Jan Beulich wrote: > On 21.03.18 at 13:51, wrote: >>> +void xpti_domain_init(struct domain *d) >>> +{ >>> +if ( !is_pv_domain(d) || is_pv_32bit_domain(d) ) >>> +return; >> >> As you rely on

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

2018-03-22 Thread Juergen Gross
On 22/03/18 16:26, Jan Beulich wrote: On 21.03.18 at 13:51, wrote: >> +void xpti_domain_init(struct domain *d) >> +{ >> +if ( !is_pv_domain(d) || is_pv_32bit_domain(d) ) >> +return; > > As you rely on the zero-initialization of the field here, ... > >> +

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

2018-03-22 Thread Jan Beulich
>>> On 21.03.18 at 13:51, wrote: > +void xpti_domain_init(struct domain *d) > +{ > +if ( !is_pv_domain(d) || is_pv_32bit_domain(d) ) > +return; As you rely on the zero-initialization of the field here, ... > +switch ( opt_xpti ) > +{ > +case XPTI_OFF: >

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

2018-03-21 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