You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
1.5 KiB

4 years ago
<div align="center">
4 years ago
<img width="1000" height="auto" src="https://imgur.com/b1bYNZU.png"/>
4 years ago
<p>Figure 1. First ever vmexit...</p>
4 years ago
</div>
4 years ago
4 years ago
# Bluepill
4 years ago
Bluepill is an Intel type-2 research hypervisor. This project is purely for educational purposes and is designed to run on Windows 10 systems.
4 years ago
This project uses WDK and thus Windows Kernel functions to facilitate vmxlaunch.
4 years ago
4 years ago
### VMCS
4 years ago
4 years ago
This section of the readme just contains notes and a list of things I stumbled on and took me a while to figure out and fix.
4 years ago
4 years ago
##### VMCS Controls
4 years ago
* One of the mistakes I made early on was setting bits high after applying high/low MSR values. For example my xeons dont support Intel Processor Trace (Intel PT) and I was setting `entry_ctls.conceal_vmx_from_pt = true` after applying the MSR high/low masks. This caused vmxerror #7 (invalid vmcs controls). Now i set the bit high before i apply the high/low bit mask so if my hypervisor runs on a cpu that has Intel PT support it will be concealed from Intel PT.
4 years ago
* My xeons also dont support xsave/xrstor and I was setting enable_xsave in secondary processor based vmexit controls after applying `IA32_VMX_PROCBASED_CTLS2` high/low bitmask. Which caused vmxerror #7 (invalid vmcs controls).
4 years ago
4 years ago
Dump of VMCS control fields can be found [here](https://githacks.org/_xeroxz/bluepill/-/blob/master/VMCS.md). This is not required, but for learning its nice to
4 years ago
see exactly what the MSR masks are, and what VMCS field's are enabled after you apply high/low bit masks.