Re: [Xen-devel] [PATCH v4 26/26] tools/libxc: Calculate xstate cpuid leaf from guest information

2016-04-07 Thread Andrew Cooper
On 07/04/16 01:56, Jan Beulich wrote: Andrew Cooper 04/07/16 2:40 AM >>> >> On 07/04/2016 01:16, Jan Beulich wrote: >> Andrew Cooper 04/05/16 7:49 PM >>> There is no possible way of avoiding having a whitelist somewhere, which limits what Xen will tolerate supporting for the gu

Re: [Xen-devel] [PATCH v4 26/26] tools/libxc: Calculate xstate cpuid leaf from guest information

2016-04-06 Thread Jan Beulich
>>> Andrew Cooper 04/07/16 2:40 AM >>> >On 07/04/2016 01:16, Jan Beulich wrote: > Andrew Cooper 04/05/16 7:49 PM >>> >>> There is no possible way of avoiding having a whitelist somewhere, which >>> limits what Xen will tolerate supporting for the guest. >> Right, but preferably in exactly one

Re: [Xen-devel] [PATCH v4 26/26] tools/libxc: Calculate xstate cpuid leaf from guest information

2016-04-06 Thread Andrew Cooper
On 07/04/2016 01:16, Jan Beulich wrote: Andrew Cooper 04/05/16 7:49 PM >>> >> On 31/03/16 08:48, Jan Beulich wrote: >> On 23.03.16 at 17:36, wrote: switch ( input[1] ) { -case 0: +case 0: /* EAX: low 32bits of xfeature_enabled_mask */

Re: [Xen-devel] [PATCH v4 26/26] tools/libxc: Calculate xstate cpuid leaf from guest information

2016-04-06 Thread Jan Beulich
>>> Andrew Cooper 04/05/16 7:49 PM >>> >On 31/03/16 08:48, Jan Beulich wrote: > On 23.03.16 at 17:36, wrote: >>> switch ( input[1] ) >>> { >>> -case 0: >>> +case 0: >>> /* EAX: low 32bits of xfeature_enabled_mask */ >>> -regs[0] = info->xfeature_mask & 0xFF

Re: [Xen-devel] [PATCH v4 26/26] tools/libxc: Calculate xstate cpuid leaf from guest information

2016-04-05 Thread Andrew Cooper
On 31/03/16 08:48, Jan Beulich wrote: On 23.03.16 at 17:36, wrote: >> --- a/tools/libxc/xc_cpuid_x86.c >> +++ b/tools/libxc/xc_cpuid_x86.c >> @@ -398,54 +398,97 @@ static void intel_xc_cpuid_policy(xc_interface *xch, >> } >> } >> >> +/* XSTATE bits in XCR0. */ >> +#define X86_XCR0_X87

Re: [Xen-devel] [PATCH v4 26/26] tools/libxc: Calculate xstate cpuid leaf from guest information

2016-03-31 Thread Jan Beulich
>>> On 23.03.16 at 17:36, wrote: > --- a/tools/libxc/xc_cpuid_x86.c > +++ b/tools/libxc/xc_cpuid_x86.c > @@ -398,54 +398,97 @@ static void intel_xc_cpuid_policy(xc_interface *xch, > } > } > > +/* XSTATE bits in XCR0. */ > +#define X86_XCR0_X87(1ULL << 0) > +#define X86_XCR0_SSE(1U

Re: [Xen-devel] [PATCH v4 26/26] tools/libxc: Calculate xstate cpuid leaf from guest information

2016-03-24 Thread Wei Liu
On Wed, Mar 23, 2016 at 04:36:29PM +, Andrew Cooper wrote: > It is unsafe to generate the guests xstate leaves from host information, as it > prevents the differences between hosts from being hidden. > > In addition, some further improvements and corrections: > - don't discard the known flags

[Xen-devel] [PATCH v4 26/26] tools/libxc: Calculate xstate cpuid leaf from guest information

2016-03-23 Thread Andrew Cooper
It is unsafe to generate the guests xstate leaves from host information, as it prevents the differences between hosts from being hidden. In addition, some further improvements and corrections: - don't discard the known flags in sub-leaves 2..63 ECX - zap sub-leaves beyond 62 - zap all bits in l