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

feat: added ref to mem alloc kernel api

parent d57839d5
Branches
No related tags found
No related merge requests found
......@@ -278,6 +278,10 @@ to a number of requirements:
- 4-KB aligned (aka page-aligned)
- Its size shall be specified by reading the `IA32_VMX_BASIC[44:32]` MSR (p. 4586)
<!--TODO: how to alloc a page-aligned region ??-->
> Need to investigate the different allocation strategies[^7] offered by the
> kernel.
```c
#define REGION_SIZE ((__rdmsr(IA32_VMX_BASIC) >> 32) & 0x1fff)
......@@ -333,3 +337,4 @@ static int vmxon_region_alloc(void) {
[^4]: [Intel SDM 2024 Vol. 3](https://cdrdv2.intel.com/v1/dl/getContent/671447)
[^5]: [CPU Registers x86](https://wiki.osdev.org/CPU_Registers_x86)
[]: [The basics of Intel VT-x extensions](https://research.meekolab.com/the-basics-of-intel-vt-x-extensions#heading-vmxon-execution)
[^7]: [Memory Allocation Guide](https://www.kernel.org/doc/html/v6.12/core-api/memory-allocation.html#memory-allocation-guide)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment