multiple corrections to page table setup and fix vcpu structs

This commit is contained in:
Alex Zenla
2024-01-11 23:54:44 -08:00
parent 4b4f22ffcd
commit b79c31e613
5 changed files with 108 additions and 21 deletions

View File

@ -3,7 +3,7 @@ use libc::c_char;
pub const X86_PAGE_SHIFT: u64 = 12;
pub const X86_PAGE_SIZE: u64 = 1 << X86_PAGE_SHIFT;
pub const X86_VIRT_BITS: u64 = 48;
pub const X86_VIRT_MASK: u64 = 1 << X86_VIRT_BITS;
pub const X86_VIRT_MASK: u64 = (1 << X86_VIRT_BITS) - 1;
pub const X86_PGTABLE_LEVELS: u64 = 4;
pub const X86_PGTABLE_LEVEL_SHIFT: u64 = 9;