I have implemented a hypervisor with EPT yet, it works well in Windows 7 pro x86, after I run the same hypervisor in Windows 10 pro x86, there is a strange mistake.
First, both the windows 7 machine and the windows 10 1903 machine are 4GB memory, single-core and disable pae and DEP. The machine is running in VMware 16.1 and I use windbg to debug the kernel with pipe. And according to the Microsoft document I have disabled Hyper-V using group policy. From the windows's control panel, my processor is "Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz 2.90 GHz". And I experience the same error on another computer with "Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz 2.90 GHz".
Here is the story.
_ExecuteVmLaunch Proc vmlaunch INT 3 ret _ExecuteVmLaunch Endp _GuestEntryPoint Proc StdCall _GuestEsp INT 3 pop ebp popad ret _GuestEntryPoint Endp
When the vmlaunch execute successfully, the eip will turn to the _GuestEntryPoint, I have tested this in Windows 7 pro x86 machine and it works. When the vmlaunch execute failed, it should turn to the instruction after vmlauch. Both situation will make a INT 3 interrupt.
Now, in the windows 10 machine, strange mistake happened. After the vmlaunch instruction runs, there is not interruption, the windbg only shows "debuggee is running", I can't control the windows 10 machine and there is no BSOD. Even I click break in the windbg, nothing happens. I don't know where is the eip now and what really happens.
Actually, I doubt that maybe it's because of my code error. Just like the link "VMLAUNCH "hangs" when enabling EPT ". However, it works in windows 7 pro x86. So, I doubt that maybe there is something need to change in windows 10 pro x86 but the vmlaunch won't ret to let me check the error code. I read some code of hypervisor online, all of them related to windows 10 realize in windows 10 x64.
Thanks you all.
It's my fault. In windows 7 I disable pae and nx by using "bcdedit /set pae forcedisable(nx alwaysoff)". I know pae is not support in windows 10 but I still disable pae and nx by using "bcdedit /set pae forcedisable(nx alwaysoff)". I take it for granted that it works. However, when I check the cr4.pae and cr4.pse in windows 10, I found that cr4.pae=1 !!
After I disable EPT in windows 10, the vmlaunch goes to _GuestEntryPoint so It seems work now.
So, another question, if I want to enable EPT in windows 10 x86, how can I set cr4.pae to zero? Bcdedit doesn't work and set it directly in windbg causes bug. Google seems no method for this.
When using windows 10 x64, we don't need to consider pae.
Thank you for posting on the Intel® communities.
This forum is related to Intel® CPUs questions, unfortunately, software development or programming questions are outside of Intel® Customer Support scope.
The best thing you can do is to rely on Intel® documents, if those guides do not help you, you can also check the Developer Zone for further help: https://software.intel.com/content/www/us/en/develop/home.html
The other option for your is to contact us via the Intel® Premier Support https://www.intel.com/content/www/us/en/design/support/ips/training/welcome.html
If you do not have an account for this type of support, check with a local Intel® Authorized Distributors and Approved Supplier so they can help you to submit a support ticket. https://www.intel.com/content/www/us/en/partner/where-to-buy/overview.html
Intel Customer Support Technician
We hope the previous post was useful to direct you to the correct support place.
We will proceed to close this inquiry from our side, if you have any additional questions; please submit a new thread and we will gladly assist you.
Intel Customer Support Technician