Re: [Xen-devel] [PATCH 3/6] x86/cpuid: Move all xstate leaf handling into guest_cpuid()

2017-01-16 Thread Andrew Cooper
On 16/01/17 16:58, Jan Beulich wrote: On 16.01.17 at 12:40, wrote: >> @@ -1007,10 +864,13 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf, >> break; >> >> case XSTATE_CPUID: >> -if ( subleaf > ARRAY_SIZE(p->xstate.raw) )

Re: [Xen-devel] [PATCH 3/6] x86/cpuid: Move all xstate leaf handling into guest_cpuid()

2017-01-16 Thread Jan Beulich
>>> On 16.01.17 at 12:40, wrote: > @@ -1007,10 +864,13 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf, > break; > > case XSTATE_CPUID: > -if ( subleaf > ARRAY_SIZE(p->xstate.raw) ) > +if ( !p->basic.xsave ||

[Xen-devel] [PATCH 3/6] x86/cpuid: Move all xstate leaf handling into guest_cpuid()

2017-01-16 Thread Andrew Cooper
The xstate union now contains sanitised values, so it can be handled fully in the non-legacy path. c/s 1c0bc709d "x86/cpuid: Perform max_leaf calculations in guest_cpuid()" accidentally introduced a boundary error for the subleaf check, although it was masked by the correct logic in the legacy