Home
last modified time | relevance | path

Searched refs:PAGE_SHIFT (Results 1 – 10 of 10) sorted by relevance

/DragonOS-0.1.9/kernel/src/mm/allocator/
Dbump.rs184 let area_base = (area.base.data() + MMA::PAGE_SHIFT) & !(MMA::PAGE_SHIFT); in usage()
186 let area_end = (area.base.data() + area.size) & !(MMA::PAGE_SHIFT); in usage()
188 total += (area_end - area_base) >> MMA::PAGE_SHIFT; in usage()
191 used += (area_end - area_base) >> MMA::PAGE_SHIFT; in usage()
196 used += (self.offset - area_base) >> MMA::PAGE_SHIFT; in usage()
Dbuddy.rs245 self.buddy_free(page_list_addr, MMArch::PAGE_SHIFT as u8); in pop_front()
288 unsafe { self.buddy_free(page_list_addr, MMArch::PAGE_SHIFT as u8) }; in pop_front()
/DragonOS-0.1.9/kernel/src/virt/kvm/
Dhost_mem.rs39 pub const PAGE_SHIFT: u32 = 12; constant
40 pub const PAGE_SIZE: u32 = 1 << PAGE_SHIFT;
154 return Ok(hpa.data() as u64 >> PAGE_SHIFT); in hva_to_pfn()
160 return Ok(hpa.data() as u64 >> PAGE_SHIFT); in hva_to_pfn()
Dvm.rs14 KVM_MEM_SLOTS_NUM, KVM_USER_MEM_SLOTS, PAGE_SHIFT,
76 let base_gfn = mem.guest_phys_addr >> PAGE_SHIFT; in set_user_memory_region()
77 let npages = mem.memory_size >> PAGE_SHIFT; in set_user_memory_region()
/DragonOS-0.1.9/kernel/src/arch/x86_64/kvm/vmx/
Dmmu.rs6 virt::kvm::host_mem::{__gfn_to_pfn, kvm_vcpu_gfn_to_memslot, PAGE_MASK, PAGE_SHIFT},
115 let gfn = gpa >> PAGE_SHIFT; // 物理地址右移12位得到物理页框号(相对于虚拟机而言) in tdp_page_fault()
228 assert!(ept_mapper.walk(gpa, pfn << PAGE_SHIFT, page_flags).is_ok()); in __direct_map()
/DragonOS-0.1.9/kernel/src/driver/firmware/efi/
Dinit.rs205 && ((efi_vaddr - md.virt_start) < (md.page_count << (MMArch::PAGE_SHIFT as u64))) in efi_vaddr_2_paddr()
225 (md.phys_start + (md.page_count << (MMArch::PAGE_SHIFT as u64))) as usize, in reserve_memory_regions()
231 let size = (page_count << (MMArch::PAGE_SHIFT as u64)) as usize; in reserve_memory_regions()
/DragonOS-0.1.9/kernel/src/mm/
Dmod.rs414 const PAGE_SHIFT: usize; constant
456 const PAGE_SIZE: usize = 1 << Self::PAGE_SHIFT;
463 const PAGE_ADDRESS_SHIFT: usize = Self::PAGE_LEVELS * Self::PAGE_ENTRY_SHIFT + Self::PAGE_SHIFT;
469 const PAGE_ENTRY_SIZE: usize = 1 << (Self::PAGE_SHIFT - Self::PAGE_ENTRY_SHIFT);
Dpage.rs86 let shift = self.level * Arch::PAGE_ENTRY_SHIFT + Arch::PAGE_SHIFT; in entry_base()
141 let shift = self.level * Arch::PAGE_ENTRY_SHIFT + Arch::PAGE_SHIFT; in index_of()
/DragonOS-0.1.9/kernel/src/arch/x86_64/mm/
Dmod.rs75 const PAGE_SHIFT: usize = 12; constant
245 const PAGE_SIZE: usize = 1 << Self::PAGE_SHIFT;
251 const PAGE_ADDRESS_SHIFT: usize = Self::PAGE_LEVELS * Self::PAGE_ENTRY_SHIFT + Self::PAGE_SHIFT;
257 const PAGE_ENTRY_SIZE: usize = 1 << (Self::PAGE_SHIFT - Self::PAGE_ENTRY_SHIFT);
/DragonOS-0.1.9/kernel/src/arch/riscv64/mm/
Dmod.rs43 const PAGE_SHIFT: usize = 12; constant