MicrosoftDocs / Virtualization-Documentation

Place to store our documentation, code samples, etc for public consumption.
http://docs.microsoft.com/virtualization/
Creative Commons Attribution 4.0 International
1.79k stars 1.54k forks source link

WHvSetPartitionProperty and WHvSetupPartition need alot of improvement and updating #1917

Open 2bitsin opened 11 months ago

2bitsin commented 11 months ago

In reference to https://github.com/MicrosoftDocs/Virtualization-Documentation/blob/main/virtualization/api/hypervisor-platform/funcs/WHvSetPartitionProperty.md and https://github.com/MicrosoftDocs/Virtualization-Documentation/blob/main/virtualization/api/hypervisor-platform/funcs/WHvSetupPartition.md There are quite alot of properties that are not described in any way, neither what they do, nor when and how to set them. As an example WHvPartitionPropertyCodeSyntheticProcessorFeaturesBanks , I can't for the life of me figure out when and how to set it, I either get "_HV_ACCESSDENIED" or invalid parameter errors either on WHvSetProperty or WHvSetupPartition, depending on weather I set the property before or after setup. However querying the capabilities will indicate I can set most of those flags to an on state. And 90% of those properties are a complete black box. And in general this documentation is pretty baren, most of the API is not documentated whatsoever. It's been north of 5 years this API exists, but noone is really doing anything in terms of documentation. I'm not even talking about proving some examples of how to implement common things like timers.

2bitsin commented 10 months ago

PS if anyone encounters this problem with WHvPartitionPropertyCodeSyntheticProcessorFeaturesBanks the answer is ... it requires Admin priviledges. One line about this could have saved me weeks of pointless work and frustration