On 21/04/17 16:51, Boris Ostrovsky wrote:
> On 04/21/2017 10:45 AM, Andrew Cooper wrote:
>> On 21/04/17 15:38, Juergen Gross wrote:
>>> On 21/04/17 16:24, Boris Ostrovsky wrote:
> +static bool __init xen_check_xsave(void)
> {
> - unsigned int ax, bx, cx, dx;
> - unsigned int xsave_
On 04/21/2017 10:45 AM, Andrew Cooper wrote:
> On 21/04/17 15:38, Juergen Gross wrote:
>> On 21/04/17 16:24, Boris Ostrovsky wrote:
+static bool __init xen_check_xsave(void)
{
- unsigned int ax, bx, cx, dx;
- unsigned int xsave_mask;
+ unsigned int err, eax, edx;
On 21/04/17 15:38, Juergen Gross wrote:
> On 21/04/17 16:24, Boris Ostrovsky wrote:
>>> +static bool __init xen_check_xsave(void)
>>> {
>>> - unsigned int ax, bx, cx, dx;
>>> - unsigned int xsave_mask;
>>> + unsigned int err, eax, edx;
>>>
>>> - ax = 1;
>>> - cx = 0;
>>> - cpuid(1, &
On 21/04/17 16:24, Boris Ostrovsky wrote:
>
>> +static bool __init xen_check_xsave(void)
>> {
>> -unsigned int ax, bx, cx, dx;
>> -unsigned int xsave_mask;
>> +unsigned int err, eax, edx;
>>
>> -ax = 1;
>> -cx = 0;
>> -cpuid(1, &ax, &bx, &cx, &dx);
>> +/* Test OSXSAV
> +static bool __init xen_check_xsave(void)
> {
> - unsigned int ax, bx, cx, dx;
> - unsigned int xsave_mask;
> + unsigned int err, eax, edx;
>
> - ax = 1;
> - cx = 0;
> - cpuid(1, &ax, &bx, &cx, &dx);
> + /* Test OSXSAVE capability via xgetbv instruction. */
> +
On 18/04/17 12:02, Andrew Cooper wrote:
> On 18/04/17 07:31, Juergen Gross wrote:
>> @@ -281,22 +274,24 @@ static bool __init xen_check_mwait(void)
>> return false;
>> #endif
>> }
>> -static void __init xen_init_cpuid_mask(void)
>> +
>> +static bool __init xen_check_xsave(void)
>> {
>> -
On 18/04/17 07:31, Juergen Gross wrote:
> @@ -281,22 +274,24 @@ static bool __init xen_check_mwait(void)
> return false;
> #endif
> }
> -static void __init xen_init_cpuid_mask(void)
> +
> +static bool __init xen_check_xsave(void)
> {
> - unsigned int ax, bx, cx, dx;
> - unsigned in
When running as pv domain xen_cpuid() is being used instead of
native_cpuid(). In xen_cpuid() the xsave feature availability is
indicated by special casing the related cpuid leaf.
Instead of delivering fake cpuid values set or clear the cpu
capability bits for xsave instead.
Signed-off-by: Juerge