[PATCH 13/18] ntdll: Use syscall frame for YMM context in x86_64 NtGetContextThread.

Paul Gofman pgofman at codeweavers.com
Fri Jan 22 12:20:19 CST 2021


On 1/22/21 21:03, Jacek Caban wrote:
> On 22.01.2021 18:44, Paul Gofman wrote:
>>> xsave is part of SSE2, not AVX, and it should ignore unsupported
>>> requested features, so the patch should be fine as is on hardware
>>> without AVX. xsave needs, however, to be enabled by OS, so we may need
>>> a feature check if we want to support OSes without xsave enabled.
>>>
>> There was a real bug with that:
>> https://bugs.winehq.org/show_bug.cgi?id=50271.
>
>
> Looking at the bug report, I think it was about missing AVX support,
> not missing XSAVE support, so it should be fine with my patches.
>
>
It was faulting exactly on xrstor instruction, with the mask being taken
from what Linux gives us in its xsave structure. I didn't check the mask
that time, so I can't fully exclude the possibility that it was the
wrong mask somehow and it wouldn't fail with a zero mask, but I got an
impression that it is xrstor instruction itself is unsupported. And
apparently there wasn't cpuid XSAVE flag set, that's how the fix there
is helping. Also, xsave instruction documentation explicitly refers
XSAVE CPUID feature flag.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20210122/99078869/attachment-0001.htm>


More information about the wine-devel mailing list