Home
last modified time | relevance | path

Searched refs:memslot (Results 1 – 25 of 40) sorted by relevance

12

/kernel/linux/linux-5.10/arch/arm64/kvm/
Dmmu.c70 static bool memslot_is_logging(struct kvm_memory_slot *memslot) in memslot_is_logging() argument
72 return memslot->dirty_bitmap && !(memslot->flags & KVM_MEM_READONLY); in memslot_is_logging()
145 struct kvm_memory_slot *memslot) in stage2_flush_memslot() argument
147 phys_addr_t addr = memslot->base_gfn << PAGE_SHIFT; in stage2_flush_memslot()
148 phys_addr_t end = addr + PAGE_SIZE * memslot->npages; in stage2_flush_memslot()
163 struct kvm_memory_slot *memslot; in stage2_flush_vm() local
170 kvm_for_each_memslot(memslot, slots) in stage2_flush_vm()
171 stage2_flush_memslot(kvm, memslot); in stage2_flush_vm()
404 struct kvm_memory_slot *memslot) in stage2_unmap_memslot() argument
406 hva_t hva = memslot->userspace_addr; in stage2_unmap_memslot()
[all …]
/kernel/linux/linux-5.10/arch/powerpc/kvm/
Dbook3s_64_mmu_hv.c204 void kvmppc_map_vrma(struct kvm_vcpu *vcpu, struct kvm_memory_slot *memslot, in kvmppc_map_vrma() argument
218 npages = memslot->npages >> (porder - PAGE_SHIFT); in kvmppc_map_vrma()
492 struct kvm_memory_slot *memslot; in kvmppc_book3s_hv_page_fault() local
555 memslot = gfn_to_memslot(kvm, gfn); in kvmppc_book3s_hv_page_fault()
557 trace_kvm_page_fault_enter(vcpu, hpte, memslot, ea, dsisr); in kvmppc_book3s_hv_page_fault()
560 if (!memslot || (memslot->flags & KVM_MEMSLOT_INVALID)) in kvmppc_book3s_hv_page_fault()
568 if (gfn_base < memslot->base_gfn) in kvmppc_book3s_hv_page_fault()
580 hva = gfn_to_hva_memslot(memslot, gfn); in kvmppc_book3s_hv_page_fault()
592 pfn = __gfn_to_pfn_memslot(memslot, gfn, false, NULL, in kvmppc_book3s_hv_page_fault()
682 rmap = &memslot->arch.rmap[gfn_base - memslot->base_gfn]; in kvmppc_book3s_hv_page_fault()
[all …]
Dbook3s_hv_uvmem.c359 static bool kvmppc_next_nontransitioned_gfn(const struct kvm_memory_slot *memslot, in kvmppc_next_nontransitioned_gfn() argument
388 const struct kvm_memory_slot *memslot, bool merge) in kvmppc_memslot_page_merge() argument
390 unsigned long gfn = memslot->base_gfn; in kvmppc_memslot_page_merge()
399 end = start + (memslot->npages << PAGE_SHIFT); in kvmppc_memslot_page_merge()
422 const struct kvm_memory_slot *memslot) in __kvmppc_uvmem_memslot_delete() argument
424 uv_unregister_mem_slot(kvm->arch.lpid, memslot->id); in __kvmppc_uvmem_memslot_delete()
425 kvmppc_uvmem_slot_free(kvm, memslot); in __kvmppc_uvmem_memslot_delete()
426 kvmppc_memslot_page_merge(kvm, memslot, true); in __kvmppc_uvmem_memslot_delete()
430 const struct kvm_memory_slot *memslot) in __kvmppc_uvmem_memslot_create() argument
434 if (kvmppc_memslot_page_merge(kvm, memslot, false)) in __kvmppc_uvmem_memslot_create()
[all …]
Dbook3s_64_mmu_radix.c396 const struct kvm_memory_slot *memslot, in kvmppc_unmap_pte() argument
412 if (!memslot) { in kvmppc_unmap_pte()
413 memslot = gfn_to_memslot(kvm, gfn); in kvmppc_unmap_pte()
414 if (!memslot) in kvmppc_unmap_pte()
427 kvmhv_remove_nest_rmap_range(kvm, memslot, gpa, hpa, page_size); in kvmppc_unmap_pte()
429 if ((old & _PAGE_DIRTY) && memslot->dirty_bitmap) in kvmppc_unmap_pte()
430 kvmppc_update_dirty_map(memslot, gfn, page_size); in kvmppc_unmap_pte()
794 struct kvm_memory_slot *memslot, in kvmppc_book3s_instantiate_page() argument
819 hva = gfn_to_hva_memslot(memslot, gfn); in kvmppc_book3s_instantiate_page()
826 pfn = __gfn_to_pfn_memslot(memslot, gfn, false, NULL, in kvmppc_book3s_instantiate_page()
[all …]
Dbook3s_hv_rm_mmu.c109 void kvmppc_update_dirty_map(const struct kvm_memory_slot *memslot, in kvmppc_update_dirty_map() argument
114 if (!psize || !memslot->dirty_bitmap) in kvmppc_update_dirty_map()
117 gfn -= memslot->base_gfn; in kvmppc_update_dirty_map()
118 set_dirty_bits_atomic(memslot->dirty_bitmap, gfn, npages); in kvmppc_update_dirty_map()
125 struct kvm_memory_slot *memslot; in kvmppc_set_dirty_from_hpte() local
131 memslot = __gfn_to_memslot(kvm_memslots_raw(kvm), gfn); in kvmppc_set_dirty_from_hpte()
132 if (memslot && memslot->dirty_bitmap) in kvmppc_set_dirty_from_hpte()
133 kvmppc_update_dirty_map(memslot, gfn, psize); in kvmppc_set_dirty_from_hpte()
142 struct kvm_memory_slot *memslot; in revmap_for_hpte() local
147 memslot = __gfn_to_memslot(kvm_memslots_raw(kvm), gfn); in revmap_for_hpte()
[all …]
Dtrace_hv.h274 struct kvm_memory_slot *memslot, unsigned long ea,
277 TP_ARGS(vcpu, hptep, memslot, ea, dsisr),
297 __entry->base_gfn = memslot ? memslot->base_gfn : -1UL;
298 __entry->slot_flags = memslot ? memslot->flags : 0;
Dbook3s_hv_nested.c679 struct kvm_memory_slot *memslot; in kvmhv_release_all_nested() local
701 kvm_for_each_memslot(memslot, kvm_memslots(kvm)) in kvmhv_release_all_nested()
702 kvmhv_free_memslot_nest_rmap(memslot); in kvmhv_release_all_nested()
919 const struct kvm_memory_slot *memslot, in kvmhv_remove_nest_rmap_range() argument
926 if (!memslot) in kvmhv_remove_nest_rmap_range()
928 gfn = (gpa >> PAGE_SHIFT) - memslot->base_gfn; in kvmhv_remove_nest_rmap_range()
935 unsigned long *rmap = &memslot->arch.rmap[gfn]; in kvmhv_remove_nest_rmap_range()
1305 struct kvm_memory_slot *memslot; in __kvmhv_nested_page_fault() local
1375 memslot = gfn_to_memslot(kvm, gfn); in __kvmhv_nested_page_fault()
1376 if (!memslot || (memslot->flags & KVM_MEMSLOT_INVALID)) { in __kvmhv_nested_page_fault()
[all …]
Dbook3s_pr.c434 struct kvm_memory_slot *memslot; in do_kvm_unmap_hva() local
437 kvm_for_each_memslot(memslot, slots) { in do_kvm_unmap_hva()
441 hva_start = max(start, memslot->userspace_addr); in do_kvm_unmap_hva()
442 hva_end = min(end, memslot->userspace_addr + in do_kvm_unmap_hva()
443 (memslot->npages << PAGE_SHIFT)); in do_kvm_unmap_hva()
450 gfn = hva_to_gfn_memslot(hva_start, memslot); in do_kvm_unmap_hva()
451 gfn_end = hva_to_gfn_memslot(hva_end + PAGE_SIZE - 1, memslot); in do_kvm_unmap_hva()
1884 struct kvm_memory_slot *memslot; in kvm_vm_ioctl_get_dirty_log_pr() local
1893 r = kvm_get_dirty_log(kvm, log, &is_dirty, &memslot); in kvm_vm_ioctl_get_dirty_log_pr()
1899 ga = memslot->base_gfn << PAGE_SHIFT; in kvm_vm_ioctl_get_dirty_log_pr()
[all …]
Dbook3s_64_vio_hv.c81 struct kvm_memory_slot *memslot; in kvmppc_rm_tce_to_ua() local
83 memslot = search_memslots(kvm_memslots_raw(kvm), gfn); in kvmppc_rm_tce_to_ua()
84 if (!memslot) in kvmppc_rm_tce_to_ua()
87 *ua = __gfn_to_hva_memslot(memslot, gfn) | in kvmppc_rm_tce_to_ua()
Dbook3s.h11 struct kvm_memory_slot *memslot);
Dbook3s_64_vio.c347 struct kvm_memory_slot *memslot; in kvmppc_tce_to_ua() local
349 memslot = search_memslots(kvm_memslots(kvm), gfn); in kvmppc_tce_to_ua()
350 if (!memslot) in kvmppc_tce_to_ua()
353 *ua = __gfn_to_hva_memslot(memslot, gfn) | in kvmppc_tce_to_ua()
Dbook3s.c799 void kvm_arch_sync_dirty_log(struct kvm *kvm, struct kvm_memory_slot *memslot) in kvm_arch_sync_dirty_log() argument
814 void kvmppc_core_flush_memslot(struct kvm *kvm, struct kvm_memory_slot *memslot) in kvmppc_core_flush_memslot() argument
816 kvm->arch.kvm_ops->flush_memslot(kvm, memslot); in kvmppc_core_flush_memslot()
820 struct kvm_memory_slot *memslot, in kvmppc_core_prepare_memory_region() argument
824 return kvm->arch.kvm_ops->prepare_memory_region(kvm, memslot, mem, in kvmppc_core_prepare_memory_region()
/kernel/linux/linux-5.10/virt/kvm/
Dkvm_main.c638 static void kvm_destroy_dirty_bitmap(struct kvm_memory_slot *memslot) in kvm_destroy_dirty_bitmap() argument
640 if (!memslot->dirty_bitmap) in kvm_destroy_dirty_bitmap()
643 kvfree(memslot->dirty_bitmap); in kvm_destroy_dirty_bitmap()
644 memslot->dirty_bitmap = NULL; in kvm_destroy_dirty_bitmap()
659 struct kvm_memory_slot *memslot; in kvm_free_memslots() local
664 kvm_for_each_memslot(memslot, slots) in kvm_free_memslots()
665 kvm_free_memslot(kvm, memslot); in kvm_free_memslots()
941 static int kvm_alloc_dirty_bitmap(struct kvm_memory_slot *memslot) in kvm_alloc_dirty_bitmap() argument
943 unsigned long dirty_bytes = 2 * kvm_dirty_bitmap_bytes(memslot); in kvm_alloc_dirty_bitmap()
945 memslot->dirty_bitmap = kvzalloc(dirty_bytes, GFP_KERNEL_ACCOUNT); in kvm_alloc_dirty_bitmap()
[all …]
/kernel/linux/linux-5.10/arch/powerpc/include/asm/
Dkvm_book3s.h197 const struct kvm_memory_slot *memslot,
204 struct kvm_memory_slot *memslot,
213 extern int kvm_unmap_radix(struct kvm *kvm, struct kvm_memory_slot *memslot,
215 extern int kvm_age_radix(struct kvm *kvm, struct kvm_memory_slot *memslot,
217 extern int kvm_test_age_radix(struct kvm *kvm, struct kvm_memory_slot *memslot,
220 struct kvm_memory_slot *memslot, unsigned long *map);
222 const struct kvm_memory_slot *memslot);
240 extern void kvmppc_update_dirty_map(const struct kvm_memory_slot *memslot,
257 struct kvm_memory_slot *memslot, unsigned long *map);
259 struct kvm_memory_slot *memslot,
Dkvm_book3s_64.h487 static inline bool slot_is_aligned(struct kvm_memory_slot *memslot, in slot_is_aligned() argument
494 return !(memslot->base_gfn & mask) && !(memslot->npages & mask); in slot_is_aligned()
634 const struct kvm_memory_slot *memslot,
/kernel/linux/linux-5.10/tools/testing/selftests/kvm/lib/s390x/
Dprocessor.c18 void virt_pgd_alloc(struct kvm_vm *vm, uint32_t memslot) in virt_pgd_alloc() argument
29 KVM_GUEST_PAGE_TABLE_MIN_PADDR, memslot); in virt_pgd_alloc()
41 static uint64_t virt_alloc_region(struct kvm_vm *vm, int ri, uint32_t memslot) in virt_alloc_region() argument
46 KVM_GUEST_PAGE_TABLE_MIN_PADDR, memslot); in virt_alloc_region()
55 uint32_t memslot) in virt_pg_map() argument
82 entry[idx] = virt_alloc_region(vm, ri, memslot); in virt_pg_map()
/kernel/linux/linux-5.10/include/linux/
Dkvm_host.h352 static inline unsigned long kvm_dirty_bitmap_bytes(struct kvm_memory_slot *memslot) in kvm_dirty_bitmap_bytes() argument
354 return ALIGN(memslot->npages, BITS_PER_LONG) / 8; in kvm_dirty_bitmap_bytes()
357 static inline unsigned long *kvm_second_dirty_bitmap(struct kvm_memory_slot *memslot) in kvm_second_dirty_bitmap() argument
359 unsigned long len = kvm_dirty_bitmap_bytes(memslot); in kvm_second_dirty_bitmap()
361 return memslot->dirty_bitmap + len / sizeof(*memslot->dirty_bitmap); in kvm_second_dirty_bitmap()
586 #define kvm_for_each_memslot(memslot, slots) \ argument
587 for (memslot = &slots->memslots[0]; \
588 memslot < slots->memslots + slots->used_slots; memslot++) \
589 if (WARN_ON_ONCE(!memslot->npages)) { \
690 struct kvm_memory_slot *memslot,
[all …]
Dkvm_types.h53 struct kvm_memory_slot *memslot; member
/kernel/linux/linux-5.10/arch/mips/kvm/
Dmmu.c447 struct kvm_memory_slot *memslot, in handle_hva_to_gpa() argument
452 struct kvm_memory_slot *memslot; in handle_hva_to_gpa() local
458 kvm_for_each_memslot(memslot, slots) { in handle_hva_to_gpa()
462 hva_start = max(start, memslot->userspace_addr); in handle_hva_to_gpa()
463 hva_end = min(end, memslot->userspace_addr + in handle_hva_to_gpa()
464 (memslot->npages << PAGE_SHIFT)); in handle_hva_to_gpa()
472 gfn = hva_to_gfn_memslot(hva_start, memslot); in handle_hva_to_gpa()
473 gfn_end = hva_to_gfn_memslot(hva_end + PAGE_SIZE - 1, memslot); in handle_hva_to_gpa()
475 ret |= handler(kvm, gfn, gfn_end, memslot, data); in handle_hva_to_gpa()
483 struct kvm_memory_slot *memslot, void *data) in kvm_unmap_hva_handler() argument
[all …]
/kernel/linux/linux-5.10/arch/x86/kvm/mmu/
Dmmu.c1459 struct kvm_memory_slot *memslot; in kvm_handle_hva_range() local
1466 kvm_for_each_memslot(memslot, slots) { in kvm_handle_hva_range()
1470 hva_start = max(start, memslot->userspace_addr); in kvm_handle_hva_range()
1471 hva_end = min(end, memslot->userspace_addr + in kvm_handle_hva_range()
1472 (memslot->npages << PAGE_SHIFT)); in kvm_handle_hva_range()
1479 gfn_start = hva_to_gfn_memslot(hva_start, memslot); in kvm_handle_hva_range()
1480 gfn_end = hva_to_gfn_memslot(hva_end + PAGE_SIZE - 1, memslot); in kvm_handle_hva_range()
1482 for_each_slot_rmap_range(memslot, PG_LEVEL_4K, in kvm_handle_hva_range()
1486 ret |= handler(kvm, iterator.rmap, memslot, in kvm_handle_hva_range()
5220 slot_handle_level_range(struct kvm *kvm, struct kvm_memory_slot *memslot, in slot_handle_level_range() argument
[all …]
Dtdp_mmu.c660 struct kvm_memory_slot *memslot; in kvm_tdp_mmu_handle_hva_range() local
668 kvm_for_each_memslot(memslot, slots) { in kvm_tdp_mmu_handle_hva_range()
672 hva_start = max(start, memslot->userspace_addr); in kvm_tdp_mmu_handle_hva_range()
673 hva_end = min(end, memslot->userspace_addr + in kvm_tdp_mmu_handle_hva_range()
674 (memslot->npages << PAGE_SHIFT)); in kvm_tdp_mmu_handle_hva_range()
681 gfn_start = hva_to_gfn_memslot(hva_start, memslot); in kvm_tdp_mmu_handle_hva_range()
682 gfn_end = hva_to_gfn_memslot(hva_end + PAGE_SIZE - 1, memslot); in kvm_tdp_mmu_handle_hva_range()
684 ret |= handler(kvm, memslot, root, gfn_start, in kvm_tdp_mmu_handle_hva_range()
/kernel/linux/linux-5.10/arch/s390/kvm/
Dpv.c119 struct kvm_memory_slot *memslot; in kvm_s390_pv_alloc_vm() local
133 memslot = kvm_memslots(kvm)->memslots; in kvm_s390_pv_alloc_vm()
134 npages = memslot->base_gfn + memslot->npages; in kvm_s390_pv_alloc_vm()
/kernel/linux/linux-5.10/tools/testing/selftests/kvm/include/
Dkvm_util.h224 uint32_t memslot);
227 uint32_t memslot);
229 vm_paddr_t paddr_min, uint32_t memslot);
/kernel/linux/linux-5.10/tools/testing/selftests/kvm/lib/
Dkvm_util.c744 memslot2region(struct kvm_vm *vm, uint32_t memslot) in memslot2region() argument
749 if (region->region.slot == memslot) in memslot2region()
754 " requested slot: %u\n", memslot); in memslot2region()
1709 vm_paddr_t paddr_min, uint32_t memslot) in vm_phy_pages_alloc() argument
1721 region = memslot2region(vm, memslot); in vm_phy_pages_alloc()
1736 paddr_min, vm->page_size, memslot); in vm_phy_pages_alloc()
1749 uint32_t memslot) in vm_phy_page_alloc() argument
1751 return vm_phy_pages_alloc(vm, 1, paddr_min, memslot); in vm_phy_page_alloc()
Dkvm_util_internal.h111 memslot2region(struct kvm_vm *vm, uint32_t memslot);

12