/linux-6.6.21/arch/powerpc/kvm/ |
D | book3s_hv_uvmem.c | 361 static bool kvmppc_next_nontransitioned_gfn(const struct kvm_memory_slot *memslot, in kvmppc_next_nontransitioned_gfn() argument 392 const struct kvm_memory_slot *memslot, bool merge) in kvmppc_memslot_page_merge() argument 394 unsigned long gfn = memslot->base_gfn; in kvmppc_memslot_page_merge() 404 end = start + (memslot->npages << PAGE_SHIFT); in kvmppc_memslot_page_merge() 431 const struct kvm_memory_slot *memslot) in __kvmppc_uvmem_memslot_delete() argument 433 uv_unregister_mem_slot(kvm->arch.lpid, memslot->id); in __kvmppc_uvmem_memslot_delete() 434 kvmppc_uvmem_slot_free(kvm, memslot); in __kvmppc_uvmem_memslot_delete() 435 kvmppc_memslot_page_merge(kvm, memslot, true); in __kvmppc_uvmem_memslot_delete() 439 const struct kvm_memory_slot *memslot) in __kvmppc_uvmem_memslot_create() argument 443 if (kvmppc_memslot_page_merge(kvm, memslot, false)) in __kvmppc_uvmem_memslot_create() [all …]
|
D | book3s_64_mmu_hv.c | 206 void kvmppc_map_vrma(struct kvm_vcpu *vcpu, struct kvm_memory_slot *memslot, in kvmppc_map_vrma() argument 220 npages = memslot->npages >> (porder - PAGE_SHIFT); in kvmppc_map_vrma() 516 struct kvm_memory_slot *memslot; in kvmppc_book3s_hv_page_fault() local 579 memslot = gfn_to_memslot(kvm, gfn); in kvmppc_book3s_hv_page_fault() 581 trace_kvm_page_fault_enter(vcpu, hpte, memslot, ea, dsisr); in kvmppc_book3s_hv_page_fault() 584 if (!memslot || (memslot->flags & KVM_MEMSLOT_INVALID)) in kvmppc_book3s_hv_page_fault() 592 if (gfn_base < memslot->base_gfn) in kvmppc_book3s_hv_page_fault() 604 hva = gfn_to_hva_memslot(memslot, gfn); in kvmppc_book3s_hv_page_fault() 616 pfn = __gfn_to_pfn_memslot(memslot, gfn, false, false, NULL, in kvmppc_book3s_hv_page_fault() 706 rmap = &memslot->arch.rmap[gfn_base - memslot->base_gfn]; in kvmppc_book3s_hv_page_fault() [all …]
|
D | book3s_hv_rm_mmu.c | 96 void kvmppc_update_dirty_map(const struct kvm_memory_slot *memslot, in kvmppc_update_dirty_map() argument 101 if (!psize || !memslot->dirty_bitmap) in kvmppc_update_dirty_map() 104 gfn -= memslot->base_gfn; in kvmppc_update_dirty_map() 105 set_dirty_bits_atomic(memslot->dirty_bitmap, gfn, npages); in kvmppc_update_dirty_map() 112 struct kvm_memory_slot *memslot; in kvmppc_set_dirty_from_hpte() local 118 memslot = __gfn_to_memslot(kvm_memslots_raw(kvm), gfn); in kvmppc_set_dirty_from_hpte() 119 if (memslot && memslot->dirty_bitmap) in kvmppc_set_dirty_from_hpte() 120 kvmppc_update_dirty_map(memslot, gfn, psize); in kvmppc_set_dirty_from_hpte() 129 struct kvm_memory_slot *memslot; in revmap_for_hpte() local 134 memslot = __gfn_to_memslot(kvm_memslots_raw(kvm), gfn); in revmap_for_hpte() [all …]
|
D | book3s_64_mmu_radix.c | 420 const struct kvm_memory_slot *memslot, in kvmppc_unmap_pte() argument 436 if (!memslot) { in kvmppc_unmap_pte() 437 memslot = gfn_to_memslot(kvm, gfn); in kvmppc_unmap_pte() 438 if (!memslot) in kvmppc_unmap_pte() 451 kvmhv_remove_nest_rmap_range(kvm, memslot, gpa, hpa, page_size); in kvmppc_unmap_pte() 453 if ((old & _PAGE_DIRTY) && memslot->dirty_bitmap) in kvmppc_unmap_pte() 454 kvmppc_update_dirty_map(memslot, gfn, page_size); in kvmppc_unmap_pte() 818 struct kvm_memory_slot *memslot, in kvmppc_book3s_instantiate_page() argument 843 hva = gfn_to_hva_memslot(memslot, gfn); in kvmppc_book3s_instantiate_page() 850 pfn = __gfn_to_pfn_memslot(memslot, gfn, false, false, NULL, in kvmppc_book3s_instantiate_page() [all …]
|
D | trace_hv.h | 294 struct kvm_memory_slot *memslot, unsigned long ea, 297 TP_ARGS(vcpu, hptep, memslot, ea, dsisr), 317 __entry->base_gfn = memslot ? memslot->base_gfn : -1UL; 318 __entry->slot_flags = memslot ? memslot->flags : 0;
|
D | book3s_hv_nested.c | 767 struct kvm_memory_slot *memslot; in kvmhv_release_all_nested() local 787 kvm_for_each_memslot(memslot, bkt, kvm_memslots(kvm)) in kvmhv_release_all_nested() 788 kvmhv_free_memslot_nest_rmap(memslot); in kvmhv_release_all_nested() 999 const struct kvm_memory_slot *memslot, in kvmhv_remove_nest_rmap_range() argument 1006 if (!memslot) in kvmhv_remove_nest_rmap_range() 1008 gfn = (gpa >> PAGE_SHIFT) - memslot->base_gfn; in kvmhv_remove_nest_rmap_range() 1015 unsigned long *rmap = &memslot->arch.rmap[gfn]; in kvmhv_remove_nest_rmap_range() 1489 struct kvm_memory_slot *memslot; in __kvmhv_nested_page_fault() local 1559 memslot = gfn_to_memslot(kvm, gfn); in __kvmhv_nested_page_fault() 1560 if (!memslot || (memslot->flags & KVM_MEMSLOT_INVALID)) { in __kvmhv_nested_page_fault() [all …]
|
D | book3s.h | 11 struct kvm_memory_slot *memslot);
|
D | book3s_64_vio.c | 358 struct kvm_memory_slot *memslot; in kvmppc_tce_to_ua() local 360 memslot = __gfn_to_memslot(kvm_memslots(kvm), gfn); in kvmppc_tce_to_ua() 361 if (!memslot) in kvmppc_tce_to_ua() 364 *ua = __gfn_to_hva_memslot(memslot, gfn) | in kvmppc_tce_to_ua()
|
D | book3s_hv.c | 4981 struct kvm_memory_slot *memslot; in kvm_vm_ioctl_get_dirty_log_hv() local 4994 memslot = id_to_memslot(slots, log->slot); in kvm_vm_ioctl_get_dirty_log_hv() 4996 if (!memslot || !memslot->dirty_bitmap) in kvm_vm_ioctl_get_dirty_log_hv() 5003 n = kvm_dirty_bitmap_bytes(memslot); in kvm_vm_ioctl_get_dirty_log_hv() 5004 buf = memslot->dirty_bitmap + n / sizeof(long); in kvm_vm_ioctl_get_dirty_log_hv() 5008 r = kvmppc_hv_get_dirty_log_radix(kvm, memslot, buf); in kvm_vm_ioctl_get_dirty_log_hv() 5010 r = kvmppc_hv_get_dirty_log_hpt(kvm, memslot, buf); in kvm_vm_ioctl_get_dirty_log_hv() 5020 p = memslot->dirty_bitmap; in kvm_vm_ioctl_get_dirty_log_hv() 5028 kvmppc_harvest_vpa_dirty(&vcpu->arch.vpa, memslot, buf); in kvm_vm_ioctl_get_dirty_log_hv() 5029 kvmppc_harvest_vpa_dirty(&vcpu->arch.dtl, memslot, buf); in kvm_vm_ioctl_get_dirty_log_hv() [all …]
|
D | book3s_pr.c | 1873 struct kvm_memory_slot *memslot; in kvm_vm_ioctl_get_dirty_log_pr() local 1882 r = kvm_get_dirty_log(kvm, log, &is_dirty, &memslot); in kvm_vm_ioctl_get_dirty_log_pr() 1888 ga = memslot->base_gfn << PAGE_SHIFT; in kvm_vm_ioctl_get_dirty_log_pr() 1889 ga_end = ga + (memslot->npages << PAGE_SHIFT); in kvm_vm_ioctl_get_dirty_log_pr() 1894 n = kvm_dirty_bitmap_bytes(memslot); in kvm_vm_ioctl_get_dirty_log_pr() 1895 memset(memslot->dirty_bitmap, 0, n); in kvm_vm_ioctl_get_dirty_log_pr() 1905 struct kvm_memory_slot *memslot) in kvmppc_core_flush_memslot_pr() argument
|
/linux-6.6.21/arch/arm64/kvm/ |
D | mmu.c | 158 static bool memslot_is_logging(struct kvm_memory_slot *memslot) in memslot_is_logging() argument 160 return memslot->dirty_bitmap && !(memslot->flags & KVM_MEM_READONLY); in memslot_is_logging() 337 struct kvm_memory_slot *memslot) in stage2_flush_memslot() argument 339 phys_addr_t addr = memslot->base_gfn << PAGE_SHIFT; in stage2_flush_memslot() 340 phys_addr_t end = addr + PAGE_SIZE * memslot->npages; in stage2_flush_memslot() 355 struct kvm_memory_slot *memslot; in stage2_flush_vm() local 362 kvm_for_each_memslot(memslot, bkt, slots) in stage2_flush_vm() 363 stage2_flush_memslot(kvm, memslot); in stage2_flush_vm() 942 struct kvm_memory_slot *memslot) in stage2_unmap_memslot() argument 944 hva_t hva = memslot->userspace_addr; in stage2_unmap_memslot() [all …]
|
/linux-6.6.21/virt/kvm/ |
D | dirty_ring.c | 55 struct kvm_memory_slot *memslot; in kvm_reset_dirty_gfn() local 64 memslot = id_to_memslot(__kvm_memslots(kvm, as_id), id); in kvm_reset_dirty_gfn() 66 if (!memslot || (offset + __fls(mask)) >= memslot->npages) in kvm_reset_dirty_gfn() 70 kvm_arch_mmu_enable_log_dirty_pt_masked(kvm, memslot, offset, mask); in kvm_reset_dirty_gfn()
|
D | kvm_main.c | 383 const struct kvm_memory_slot *memslot) in kvm_flush_remote_tlbs_memslot() argument 393 kvm_flush_remote_tlbs_range(kvm, memslot->base_gfn, memslot->npages); in kvm_flush_remote_tlbs_memslot() 978 static void kvm_destroy_dirty_bitmap(struct kvm_memory_slot *memslot) in kvm_destroy_dirty_bitmap() argument 980 if (!memslot->dirty_bitmap) in kvm_destroy_dirty_bitmap() 983 kvfree(memslot->dirty_bitmap); in kvm_destroy_dirty_bitmap() 984 memslot->dirty_bitmap = NULL; in kvm_destroy_dirty_bitmap() 1000 struct kvm_memory_slot *memslot; in kvm_free_memslots() local 1012 hash_for_each_safe(slots->id_hash, bkt, idnode, memslot, id_node[1]) in kvm_free_memslots() 1013 kvm_free_memslot(kvm, memslot); in kvm_free_memslots() 1404 static int kvm_alloc_dirty_bitmap(struct kvm_memory_slot *memslot) in kvm_alloc_dirty_bitmap() argument [all …]
|
D | pfncache.c | 282 gpc->memslot = __gfn_to_memslot(slots, gfn); in __kvm_gpc_refresh() 283 gpc->uhva = gfn_to_hva_memslot(gpc->memslot, gfn); in __kvm_gpc_refresh()
|
/linux-6.6.21/arch/powerpc/include/asm/ |
D | kvm_book3s.h | 197 const struct kvm_memory_slot *memslot, 204 struct kvm_memory_slot *memslot, 213 extern void kvm_unmap_radix(struct kvm *kvm, struct kvm_memory_slot *memslot, 215 extern bool kvm_age_radix(struct kvm *kvm, struct kvm_memory_slot *memslot, 217 extern bool 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,
|
D | kvm_book3s_64.h | 488 static inline bool slot_is_aligned(struct kvm_memory_slot *memslot, in slot_is_aligned() argument 495 return !(memslot->base_gfn & mask) && !(memslot->npages & mask); in slot_is_aligned() 635 const struct kvm_memory_slot *memslot,
|
/linux-6.6.21/arch/riscv/kvm/ |
D | vcpu_exit.c | 16 struct kvm_memory_slot *memslot; in gstage_page_fault() local 24 memslot = gfn_to_memslot(vcpu->kvm, gfn); in gstage_page_fault() 25 hva = gfn_to_hva_memslot_prot(memslot, gfn, &writable); in gstage_page_fault() 43 ret = kvm_riscv_gstage_map(vcpu, memslot, fault_addr, hva, in gstage_page_fault()
|
D | mmu.c | 336 struct kvm_memory_slot *memslot = id_to_memslot(slots, slot); in gstage_wp_memory_region() local 337 phys_addr_t start = memslot->base_gfn << PAGE_SHIFT; in gstage_wp_memory_region() 338 phys_addr_t end = (memslot->base_gfn + memslot->npages) << PAGE_SHIFT; in gstage_wp_memory_region() 405 void kvm_arch_sync_dirty_log(struct kvm *kvm, struct kvm_memory_slot *memslot) in kvm_arch_sync_dirty_log() argument 610 struct kvm_memory_slot *memslot, in kvm_riscv_gstage_map() argument 621 bool logging = (memslot->dirty_bitmap && in kvm_riscv_gstage_map() 622 !(memslot->flags & KVM_MEM_READONLY)) ? true : false; in kvm_riscv_gstage_map()
|
/linux-6.6.21/include/linux/ |
D | kvm_types.h | 62 struct kvm_memory_slot *memslot; member 69 struct kvm_memory_slot *memslot; member
|
D | kvm_host.h | 598 static inline unsigned long kvm_dirty_bitmap_bytes(struct kvm_memory_slot *memslot) in kvm_dirty_bitmap_bytes() argument 600 return ALIGN(memslot->npages, BITS_PER_LONG) / 8; in kvm_dirty_bitmap_bytes() 603 static inline unsigned long *kvm_second_dirty_bitmap(struct kvm_memory_slot *memslot) in kvm_second_dirty_bitmap() argument 605 unsigned long len = kvm_dirty_bitmap_bytes(memslot); in kvm_second_dirty_bitmap() 607 return memslot->dirty_bitmap + len / sizeof(*memslot->dirty_bitmap); in kvm_second_dirty_bitmap() 1017 #define kvm_for_each_memslot(memslot, bkt, slots) \ argument 1018 hash_for_each(slots->id_hash, bkt, memslot, id_node[slots->node_idx]) \ 1019 if (WARN_ON_ONCE(!memslot->npages)) { \ 1262 void mark_page_dirty_in_slot(struct kvm *kvm, const struct kvm_memory_slot *memslot, gfn_t gfn); 1385 const struct kvm_memory_slot *memslot); [all …]
|
/linux-6.6.21/arch/x86/include/asm/uv/ |
D | uv_geo.h | 57 char memslot; /* The memory slot on the bus */ member
|
/linux-6.6.21/tools/testing/selftests/kvm/lib/ |
D | kvm_util.c | 1089 memslot2region(struct kvm_vm *vm, uint32_t memslot) in memslot2region() argument 1094 memslot) in memslot2region() 1095 if (region->region.slot == memslot) in memslot2region() 1099 " requested slot: %u\n", memslot); in memslot2region() 1941 vm_paddr_t paddr_min, uint32_t memslot) in vm_phy_pages_alloc() argument 1953 region = memslot2region(vm, memslot); in vm_phy_pages_alloc() 1968 paddr_min, vm->page_size, memslot); in vm_phy_pages_alloc() 1981 uint32_t memslot) in vm_phy_page_alloc() argument 1983 return vm_phy_pages_alloc(vm, 1, paddr_min, memslot); in vm_phy_page_alloc()
|
/linux-6.6.21/arch/x86/kvm/mmu/ |
D | mmu.c | 6206 const struct kvm_memory_slot *memslot; in kvm_rmap_zap_gfn_range() local 6220 memslot = iter.slot; in kvm_rmap_zap_gfn_range() 6221 start = max(gfn_start, memslot->base_gfn); in kvm_rmap_zap_gfn_range() 6222 end = min(gfn_end, memslot->base_gfn + memslot->npages); in kvm_rmap_zap_gfn_range() 6226 flush = __walk_slot_rmaps(kvm, memslot, __kvm_zap_rmap, in kvm_rmap_zap_gfn_range() 6271 const struct kvm_memory_slot *memslot, in kvm_mmu_slot_remove_write_access() argument 6276 walk_slot_rmaps(kvm, memslot, slot_rmap_write_protect, in kvm_mmu_slot_remove_write_access() 6283 kvm_tdp_mmu_wrprot_slot(kvm, memslot, start_level); in kvm_mmu_slot_remove_write_access() 6519 const struct kvm_memory_slot *memslot, in kvm_mmu_try_split_huge_pages() argument 6527 kvm_shadow_mmu_try_split_huge_pages(kvm, memslot, start, end, target_level); in kvm_mmu_try_split_huge_pages() [all …]
|
/linux-6.6.21/tools/testing/selftests/kvm/include/ |
D | kvm_util_base.h | 156 memslot2region(struct kvm_vm *vm, uint32_t memslot); 705 uint32_t memslot); 707 vm_paddr_t paddr_min, uint32_t memslot);
|
/linux-6.6.21/arch/x86/include/asm/ |
D | kvm_host.h | 1843 const struct kvm_memory_slot *memslot, 1846 const struct kvm_memory_slot *memslot, 1849 const struct kvm_memory_slot *memslot, 1853 const struct kvm_memory_slot *memslot); 1855 const struct kvm_memory_slot *memslot);
|