Skip to content
Snippets Groups Projects
Commit fca5f0e3 authored by iliya.saroukha's avatar iliya.saroukha :first_quarter_moon:
Browse files

wip: talking about the possibles VMCSs states

parent c7647d19
No related branches found
No related tags found
No related merge requests found
docs/figs/vmcs/state.png

102 KiB

...@@ -30,3 +30,24 @@ struct vmcs_t { ...@@ -30,3 +30,24 @@ struct vmcs_t {
[^1]: it seems that the `gcc` extension `__attribute__((packed))` doesn't help [^1]: it seems that the `gcc` extension `__attribute__((packed))` doesn't help
in this case because it ruins the 8-byte alignment (according to `clangd`) in this case because it ruins the 8-byte alignment (according to `clangd`)
## States
The figure below helps to illustrate the lifecycle of a VM and its corresponding
VMCSs.
![States of a VMCS](./figs/vmcs/state.png)
### Current
- After the execution of the `vmptrld` instruction with the address of a given
VMCS as its memory operand, that VMCS becomes both _active_ and **_current_**
on the logical processor
- At most one of the _active_ VMCSs is the **_current_** VMCS
### Launch
- Determines which VM-entry instruction should be used with that VMCS
- The `vmlaunch` instruction requires a VMCS whose _launch_ state is
**"clear"**
- Successful execution of the instruction changes the state to **"launched"**
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment