Searched refs:gfn (Results 1 – 2 of 2) sorted by relevance
/DragonOS/kernel/src/virt/kvm/ |
H A D | host_mem.rs | 87 fn __gfn_to_memslot(slots: KvmMemorySlots, gfn: u64) -> Option<KvmMemorySlot> { in __gfn_to_memslot() 92 if gfn >= memslot.base_gfn && gfn < memslot.base_gfn + memslot.npages { in __gfn_to_memslot() 99 fn __gfn_to_hva(slot: KvmMemorySlot, gfn: u64) -> u64 { in __gfn_to_hva() 100 return slot.userspace_addr + (gfn - slot.base_gfn) * (PAGE_SIZE as u64); in __gfn_to_hva() 104 gfn: u64, in __gfn_to_hva_many() 118 *nr_pages = slot.npages - (gfn - slot.base_gfn); in __gfn_to_hva_many() 121 return Ok(__gfn_to_hva(slot, gfn)); in __gfn_to_hva_many() 163 gfn: u64, in __gfn_to_pfn() 170 let addr = __gfn_to_hva_many(slot, gfn, Some(&mut nr_pages), write)?; in __gfn_to_pfn() 176 pub fn kvm_vcpu_gfn_to_memslot(vcpu: &mut dyn Vcpu, gfn: u64) -> Option<KvmMemorySlot> { in kvm_vcpu_gfn_to_memslot() [all …]
|
/DragonOS/kernel/src/arch/x86_64/kvm/vmx/ |
H A D | mmu.rs | 109 let gfn = gpa >> PAGE_SHIFT; // 物理地址右移12位得到物理页框号(相对于虚拟机而言) in tdp_page_fault() localVariable 119 let pfn = mmu_gfn_to_pfn_fast(vcpu, gpa, prefault, gfn, write == 0, &mut map_writable)?; in tdp_page_fault() 121 __direct_map(vcpu, gpa, write, map_writable, level, gfn, pfn, prefault)?; in tdp_page_fault() 232 gfn: u64, in mmu_gfn_to_pfn_fast() 236 let slot = kvm_vcpu_gfn_to_memslot(vcpu, gfn); in mmu_gfn_to_pfn_fast() 237 let pfn = __gfn_to_pfn(slot, gfn, false, write, writable)?; in mmu_gfn_to_pfn_fast()
|