KiSetAffinityThread vs KiSetLegacyAffinityThread

whats the difference ? both doing the same job is KiSetLegacyAffinityThread could involve compatibility with older hardware

My guess if that "legacy" here means it doesn't support processor groups, so it won't work with more than 64 processors. Why do you care? They're Kernel Internal (Ki) functions so it shouldn't be something you have to deal with.

Threads now (Windows 11+) span all processor groups by default and apps don't need to explicitly specify affinity to access multiple processor groups. This has led to new concepts and changes in various scheduler functions (among others for the sake of maintaining compatibility) such as adapting the ideal processor when setting affinity. The legacy version will end up with the newer one.

Took the words right out of my mouth.