diff --git a/docs/figs/vmcs/format_access_rights_hi.png b/docs/figs/vmcs/format_access_rights_hi.png new file mode 100644 index 0000000000000000000000000000000000000000..3d5ea9d5adeb6084f0ee397c099e1cc87da5de38 Binary files /dev/null and b/docs/figs/vmcs/format_access_rights_hi.png differ diff --git a/docs/figs/vmcs/format_access_rights_lo.png b/docs/figs/vmcs/format_access_rights_lo.png new file mode 100644 index 0000000000000000000000000000000000000000..e5e3bb8eb34c3f27e8419b73e6aaecdc1b6452dd Binary files /dev/null and b/docs/figs/vmcs/format_access_rights_lo.png differ diff --git a/docs/vmcs.md b/docs/vmcs.md index 7bafe4afca271eddddb91c7c35594b70fdca8254..3da83b1d9a791b8172d13b90899eaad4e8dffb85 100644 --- a/docs/vmcs.md +++ b/docs/vmcs.md @@ -51,3 +51,34 @@ on the logical processor - The `vmlaunch` instruction requires a VMCS whose _launch_ state is **"clear"** - Successful execution of the instruction changes the state to **"launched"** + +## Organization of VMCS data + +- Guest-state area +- Host-state area +- VM-execution control fields +- VM-exit control fields +- VM-entry control fields +- VM-exit information fields + +### Guest-state area + +#### Guest Register State + +- Control registers (e.g. CR0, CR3, CR4) +- Debug register -- DR7 +- RSP, RIP and RFLAGS +- For the following registers -- CS, SS, DS, ES, FS, GS, LDTR and TR + - Selector (16 bits) + - Base address (64 bits) + - Segment limit (32 bits) + - Access rights (32 bits) + - _"The low 16 bits correspond to bits 23:8 of the upper 32 bits of a 64-bit segment descriptor. While bits + 19:16 of code-segment and data-segment descriptors correspond to the upper 4 bits of the segment + limit, the corresponding bits (bits 11:8) are reserved in this VMCS field._" + - _"Bit 16 indicates an unusable segment. Attempts to use such a segment fault except in 64-bit mode. + In general, a segment register is unusable if it has been loaded with a null selector."_ + - _"Bits 31:17 are reserved"_ + + +