On Thu Aug 7 19:12:36 2025 +0000, Brendan Shanks wrote:
@bernhardu From your ntdll:virtual test on Windows 7, it looks like you were running Windows 7 SP0 which doesn't support AVX or XState (hence why `user_shared_data->XState` contains garbage and the crash when trying to run the missing `GetEnabledXStateFeatures`). It's a bug that the tests don't handle SP0 correctly, although maybe one we don't care about. Otherwise I think that laptop is a good one to test with, I think it has XSAVE but definitely not AVX. I tried running Linux and Windows 10 under VMware and disabling AVX through CPUID overrides (I think VirtualBox can also do this), here's what I get when running the tests:
C:\Users\Brendan>ntdll_test.exe virtual virtual.c:3246: system page size 0x1000 virtual.c:1955: Tests skipped: MemExtendedParameterImageMachine not supported virtual.c:2033: XState EnabledFeatures 0x3, EnabledSupervisorFeatures 0, EnabledVolatileFeatures 3. virtual.c:2043: Test failed: Got unexpected EnabledFeatures 3. virtual.c:2047: Test failed: Got unexpected Size 576. virtual.c:2052: Test failed: Got unexpected AllFeatureSize 576. virtual.c:2062: Test failed: Got unexpected Features[2].Size 0, expected 256. virtual.c:2064: Test failed: Got unexpected Features[2].Offset 0, expected 576.
These tests (and likely `init_xstate_features`) clearly don't handle the case where the CPU has XSAVE but not AVX.
Thanks for taking care - so I am going to repeat the `ntdll_test` on that laptop with upgrading to latest service pack.