Home
last modified time | relevance | path

Searched refs:gpa (Results 1 – 25 of 98) sorted by relevance

1234

/kernel/linux/linux-5.10/arch/powerpc/kvm/
Dbook3s_64_mmu_radix.c137 u64 pte, base, gpa; in kvmppc_mmu_walk_radix_tree() local
191 gpa = pte & 0x01fffffffffff000ul; in kvmppc_mmu_walk_radix_tree()
192 if (gpa & ((1ul << offset) - 1)) in kvmppc_mmu_walk_radix_tree()
194 gpa |= eaddr & ((1ul << offset) - 1); in kvmppc_mmu_walk_radix_tree()
202 gpte->raddr = gpa; in kvmppc_mmu_walk_radix_tree()
394 void kvmppc_unmap_pte(struct kvm *kvm, pte_t *pte, unsigned long gpa, in kvmppc_unmap_pte() argument
401 unsigned long gfn = gpa >> PAGE_SHIFT; in kvmppc_unmap_pte()
405 old = kvmppc_radix_update_pte(kvm, pte, ~0UL, 0, gpa, shift); in kvmppc_unmap_pte()
406 kvmppc_radix_tlbie_page(kvm, gpa, shift, lpid); in kvmppc_unmap_pte()
425 gpa &= ~(page_size - 1); in kvmppc_unmap_pte()
[all …]
Dbook3s_hv_uvmem.c232 unsigned long gpa; member
509 struct kvm *kvm, unsigned long gpa, struct page *fault_page) in __kvmppc_svm_page_out() argument
529 if (!kvmppc_gfn_is_uvmem_pfn(gpa >> page_shift, kvm, NULL)) in __kvmppc_svm_page_out()
562 gpa, 0, page_shift); in __kvmppc_svm_page_out()
582 struct kvm *kvm, unsigned long gpa, in kvmppc_svm_page_out() argument
588 ret = __kvmppc_svm_page_out(vma, start, end, page_shift, kvm, gpa, in kvmppc_svm_page_out()
638 PAGE_SHIFT, kvm, pvt->gpa, NULL)) in kvmppc_uvmem_drop_pages()
640 pvt->gpa, addr); in kvmppc_uvmem_drop_pages()
688 static struct page *kvmppc_uvmem_get_page(unsigned long gpa, struct kvm *kvm) in kvmppc_uvmem_get_page() argument
712 kvmppc_gfn_secure_uvmem_pfn(gpa >> PAGE_SHIFT, uvmem_pfn, kvm); in kvmppc_uvmem_get_page()
[all …]
Dbook3s_hv_nested.c840 unsigned long gpa; in kvmhv_update_nest_rmap_rc() local
844 gpa = n_rmap & RMAP_NESTED_GPA_MASK; in kvmhv_update_nest_rmap_rc()
848 ptep = find_kvm_nested_guest_pte(kvm, lpid, gpa, &shift); in kvmhv_update_nest_rmap_rc()
857 kvmppc_radix_tlbie_page(kvm, gpa, shift, lpid); in kvmhv_update_nest_rmap_rc()
887 unsigned long gpa; in kvmhv_remove_nest_rmap() local
891 gpa = n_rmap & RMAP_NESTED_GPA_MASK; in kvmhv_remove_nest_rmap()
898 ptep = find_kvm_nested_guest_pte(kvm, lpid, gpa, &shift); in kvmhv_remove_nest_rmap()
901 kvmppc_unmap_pte(kvm, ptep, gpa, shift, NULL, gp->shadow_lpid); in kvmhv_remove_nest_rmap()
920 unsigned long gpa, unsigned long hpa, in kvmhv_remove_nest_rmap_range() argument
928 gfn = (gpa >> PAGE_SHIFT) - memslot->base_gfn; in kvmhv_remove_nest_rmap_range()
[all …]
/kernel/linux/linux-5.10/tools/testing/selftests/kvm/lib/aarch64/
Ducall.c12 static bool ucall_mmio_init(struct kvm_vm *vm, vm_paddr_t gpa) in ucall_mmio_init() argument
14 if (kvm_userspace_memory_region_find(vm, gpa, gpa + 1)) in ucall_mmio_init()
17 virt_pg_map(vm, gpa, gpa, 0); in ucall_mmio_init()
19 ucall_exit_mmio_addr = (vm_vaddr_t *)gpa; in ucall_mmio_init()
27 vm_paddr_t gpa, start, end, step, offset; in ucall_init() local
32 gpa = (vm_paddr_t)arg; in ucall_init()
33 ret = ucall_mmio_init(vm, gpa); in ucall_init()
34 TEST_ASSERT(ret, "Can't set ucall mmio address to %lx", gpa); in ucall_init()
/kernel/linux/linux-5.10/arch/s390/kvm/
Dgaccess.h152 unsigned long gpa = gra + kvm_s390_get_prefix(vcpu); in write_guest_lc() local
154 return kvm_write_guest(vcpu->kvm, gpa, data, len); in write_guest_lc()
178 unsigned long gpa = gra + kvm_s390_get_prefix(vcpu); in read_guest_lc() local
180 return kvm_read_guest(vcpu->kvm, gpa, data, len); in read_guest_lc()
190 u8 ar, unsigned long *gpa, enum gacc_mode mode);
310 int write_guest_abs(struct kvm_vcpu *vcpu, unsigned long gpa, void *data, in write_guest_abs() argument
313 return kvm_write_guest(vcpu->kvm, gpa, data, len); in write_guest_abs()
333 int read_guest_abs(struct kvm_vcpu *vcpu, unsigned long gpa, void *data, in read_guest_abs() argument
336 return kvm_read_guest(vcpu->kvm, gpa, data, len); in read_guest_abs()
Dvsie.c641 static int pin_guest_page(struct kvm *kvm, gpa_t gpa, hpa_t *hpa) in pin_guest_page() argument
645 page = gfn_to_page(kvm, gpa_to_gfn(gpa)); in pin_guest_page()
648 *hpa = (hpa_t) page_to_virt(page) + (gpa & ~PAGE_MASK); in pin_guest_page()
653 static void unpin_guest_page(struct kvm *kvm, gpa_t gpa, hpa_t hpa) in unpin_guest_page() argument
657 mark_page_dirty(kvm, gpa_to_gfn(gpa)); in unpin_guest_page()
722 gpa_t gpa; in pin_blocks() local
725 gpa = READ_ONCE(scb_o->scaol) & ~0xfUL; in pin_blocks()
727 gpa |= (u64) READ_ONCE(scb_o->scaoh) << 32; in pin_blocks()
728 if (gpa) { in pin_blocks()
729 if (gpa < 2 * PAGE_SIZE) in pin_blocks()
[all …]
Dgaccess.c588 static int deref_table(struct kvm *kvm, unsigned long gpa, unsigned long *val) in deref_table() argument
590 return kvm_read_guest(kvm, gpa, val, sizeof(*val)); in deref_table()
615 unsigned long *gpa, const union asce asce, in guest_translate() argument
774 *gpa = raddr.addr; in guest_translate()
834 unsigned long _len, nr_pages, gpa, idx; in access_guest() local
858 gpa = *(pages + idx) + (ga & ~PAGE_MASK); in access_guest()
859 _len = min(PAGE_SIZE - (gpa & ~PAGE_MASK), len); in access_guest()
861 rc = kvm_write_guest(vcpu->kvm, gpa, data, _len); in access_guest()
863 rc = kvm_read_guest(vcpu->kvm, gpa, data, _len); in access_guest()
878 unsigned long _len, gpa; in access_guest_real() local
[all …]
/kernel/linux/linux-5.10/arch/x86/include/asm/uv/
Duv_hub.h460 uv_gpa_in_mmr_space(unsigned long gpa) in uv_gpa_in_mmr_space() argument
462 return (gpa >> 62) == 0x3UL; in uv_gpa_in_mmr_space()
466 static inline unsigned long uv_gpa_to_soc_phys_ram(unsigned long gpa) in uv_gpa_to_soc_phys_ram() argument
474 gpa = ((gpa << uv_hub_info->m_shift) >> uv_hub_info->m_shift) | in uv_gpa_to_soc_phys_ram()
475 ((gpa >> uv_hub_info->n_lshift) << uv_hub_info->m_val); in uv_gpa_to_soc_phys_ram()
477 paddr = gpa & uv_hub_info->gpa_mask; in uv_gpa_to_soc_phys_ram()
484 static inline unsigned long uv_gpa_to_gnode(unsigned long gpa) in uv_gpa_to_gnode() argument
489 return gpa >> n_lshift; in uv_gpa_to_gnode()
491 return uv_gam_range(gpa)->nasid >> 1; in uv_gpa_to_gnode()
495 static inline int uv_gpa_to_pnode(unsigned long gpa) in uv_gpa_to_pnode() argument
[all …]
/kernel/linux/linux-5.10/arch/arm64/kvm/
Dhypercalls.c17 gpa_t gpa; in kvm_hvc_call_handler() local
82 gpa = kvm_init_stolen_time(vcpu); in kvm_hvc_call_handler()
83 if (gpa != GPA_INVALID) in kvm_hvc_call_handler()
84 val = gpa; in kvm_hvc_call_handler()
Dmmu.c437 gpa_t gpa = addr + (vm_start - memslot->userspace_addr); in stage2_unmap_memslot() local
438 unmap_stage2_range(&kvm->arch.mmu, gpa, vm_end - vm_start); in stage2_unmap_memslot()
1068 gpa_t gpa, u64 size, in handle_hva_to_gpa() argument
1081 gfn_t gpa; in handle_hva_to_gpa() local
1089 gpa = hva_to_gfn_memslot(hva_start, memslot) << PAGE_SHIFT; in handle_hva_to_gpa()
1090 ret |= handler(kvm, gpa, (u64)(hva_end - hva_start), data); in handle_hva_to_gpa()
1096 static int kvm_unmap_hva_handler(struct kvm *kvm, gpa_t gpa, u64 size, void *data) in kvm_unmap_hva_handler() argument
1101 __unmap_stage2_range(&kvm->arch.mmu, gpa, size, may_block); in kvm_unmap_hva_handler()
1116 static int kvm_set_spte_handler(struct kvm *kvm, gpa_t gpa, u64 size, void *data) in kvm_set_spte_handler() argument
1128 kvm_pgtable_stage2_map(kvm->arch.mmu.pgt, gpa, PAGE_SIZE, in kvm_set_spte_handler()
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/i915/gvt/
Dpage_track.c159 int intel_vgpu_page_track_handler(struct intel_vgpu *vgpu, u64 gpa, in intel_vgpu_page_track_handler() argument
167 page_track = intel_vgpu_find_page_track(vgpu, gpa >> PAGE_SHIFT); in intel_vgpu_page_track_handler()
175 intel_vgpu_disable_page_track(vgpu, gpa >> PAGE_SHIFT); in intel_vgpu_page_track_handler()
177 ret = page_track->handler(page_track, gpa, data, bytes); in intel_vgpu_page_track_handler()
179 gvt_err("guest page write error, gpa %llx\n", gpa); in intel_vgpu_page_track_handler()
Dmpt.h193 unsigned long gpa, void *buf, unsigned long len) in intel_gvt_hypervisor_read_gpa() argument
195 return intel_gvt_host.mpt->read_gpa(vgpu->handle, gpa, buf, len); in intel_gvt_hypervisor_read_gpa()
209 unsigned long gpa, void *buf, unsigned long len) in intel_gvt_hypervisor_write_gpa() argument
211 return intel_gvt_host.mpt->write_gpa(vgpu->handle, gpa, buf, len); in intel_gvt_hypervisor_write_gpa()
Dpage_track.h35 u64 gpa, void *data, int bytes);
56 int intel_vgpu_page_track_handler(struct intel_vgpu *vgpu, u64 gpa,
Dhypercall.h59 int (*read_gpa)(unsigned long handle, unsigned long gpa, void *buf,
61 int (*write_gpa)(unsigned long handle, unsigned long gpa, void *buf,
/kernel/linux/linux-5.10/include/linux/
Dkvm_host.h258 gpa_t gpa; member
762 int kvm_read_guest(struct kvm *kvm, gpa_t gpa, void *data, unsigned long len);
770 int kvm_write_guest(struct kvm *kvm, gpa_t gpa, const void *data,
778 gpa_t gpa, unsigned long len);
791 #define kvm_get_guest(kvm, gpa, v) \ argument
793 gpa_t __gpa = gpa; \
813 #define kvm_put_guest(kvm, gpa, v) \ argument
815 gpa_t __gpa = gpa; \
823 int kvm_clear_guest(struct kvm *kvm, gpa_t gpa, unsigned long len);
835 int kvm_vcpu_map(struct kvm_vcpu *vcpu, gpa_t gpa, struct kvm_host_map *map);
[all …]
/kernel/linux/linux-5.10/arch/arm64/include/asm/
Dkvm_mmu.h190 gpa_t gpa, void *data, unsigned long len) in kvm_read_guest_lock() argument
193 int ret = kvm_read_guest(kvm, gpa, data, len); in kvm_read_guest_lock()
200 static inline int kvm_write_guest_lock(struct kvm *kvm, gpa_t gpa, in kvm_write_guest_lock() argument
204 int ret = kvm_write_guest(kvm, gpa, data, len); in kvm_write_guest_lock()
/kernel/linux/linux-5.10/arch/mips/kvm/
Dmmu.c501 gpa_t gpa = gfn << PAGE_SHIFT; in kvm_set_spte_handler() local
503 pte_t *gpa_pte = kvm_mips_pte_for_gpa(kvm, NULL, gpa); in kvm_set_spte_handler()
549 gpa_t gpa = gfn << PAGE_SHIFT; in kvm_test_age_hva_handler() local
550 pte_t *gpa_pte = kvm_mips_pte_for_gpa(kvm, NULL, gpa); in kvm_test_age_hva_handler()
585 static int _kvm_mips_map_page_fast(struct kvm_vcpu *vcpu, unsigned long gpa, in _kvm_mips_map_page_fast() argument
590 gfn_t gfn = gpa >> PAGE_SHIFT; in _kvm_mips_map_page_fast()
599 ptep = kvm_mips_pte_for_gpa(kvm, NULL, gpa); in _kvm_mips_map_page_fast()
661 static int kvm_mips_map_page(struct kvm_vcpu *vcpu, unsigned long gpa, in kvm_mips_map_page() argument
667 gfn_t gfn = gpa >> PAGE_SHIFT; in kvm_mips_map_page()
677 err = _kvm_mips_map_page_fast(vcpu, gpa, write_fault, out_entry, in kvm_mips_map_page()
[all …]
/kernel/linux/linux-5.10/tools/testing/selftests/kvm/lib/s390x/
Dprocessor.c54 void virt_pg_map(struct kvm_vm *vm, uint64_t gva, uint64_t gpa, in virt_pg_map() argument
68 TEST_ASSERT((gpa % vm->page_size) == 0, in virt_pg_map()
72 TEST_ASSERT((gpa >> vm->page_shift) <= vm->max_gfn, in virt_pg_map()
90 "WARNING: PTE for gpa=0x%"PRIx64" already set!\n", gpa); in virt_pg_map()
91 entry[idx] = gpa; in virt_pg_map()
/kernel/linux/linux-5.10/arch/x86/kvm/vmx/
Dvmx_ops.h22 void invept_error(unsigned long ext, u64 eptp, gpa_t gpa);
266 static inline void __invept(unsigned long ext, u64 eptp, gpa_t gpa) in __invept() argument
269 u64 eptp, gpa; in __invept() member
270 } operand = {eptp, gpa}; in __invept()
272 vmx_asm2(invept, "r"(ext), "m"(operand), ext, eptp, gpa); in __invept()
/kernel/linux/linux-5.10/drivers/misc/sgi-gru/
Dgrufault.c253 int write, int atomic, unsigned long *gpa, int *pageshift) in gru_vtop() argument
279 *gpa = uv_soc_phys_ram_to_gpa(paddr); in gru_vtop()
316 unsigned long vaddr = 0, gpa; in gru_preload_tlb() local
332 ret = gru_vtop(gts, vaddr, write, atomic, &gpa, &pageshift); in gru_preload_tlb()
333 if (ret || tfh_write_only(tfh, gpa, GAA_RAM, vaddr, asid, write, in gru_preload_tlb()
339 vaddr, asid, write, pageshift, gpa); in gru_preload_tlb()
363 unsigned long gpa = 0, vaddr = 0; in gru_try_dropin() local
413 ret = gru_vtop(gts, vaddr, write, atomic, &gpa, &pageshift); in gru_try_dropin()
434 tfh_write_restart(tfh, gpa, GAA_RAM, vaddr, asid, write, in gru_try_dropin()
440 indexway, write, pageshift, gpa); in gru_try_dropin()
/kernel/linux/linux-5.10/arch/x86/xen/
Dmmu_hvm.c53 a.gpa = __pa(mm->pgd); in xen_hvm_exit_mmap()
64 a.gpa = 0x00; in is_pagetable_dying_supported()
/kernel/linux/linux-5.10/arch/x86/kvm/
Dcpuid.h39 static inline bool kvm_vcpu_is_illegal_gpa(struct kvm_vcpu *vcpu, gpa_t gpa) in kvm_vcpu_is_illegal_gpa() argument
41 return (gpa >= BIT_ULL(cpuid_maxphyaddr(vcpu))); in kvm_vcpu_is_illegal_gpa()
327 static inline bool page_address_valid(struct kvm_vcpu *vcpu, gpa_t gpa) in page_address_valid() argument
329 return PAGE_ALIGNED(gpa) && !(gpa >> cpuid_maxphyaddr(vcpu)); in page_address_valid()
/kernel/linux/linux-5.10/include/trace/events/
Dkvm.h214 TP_PROTO(int type, int len, u64 gpa, void *val),
215 TP_ARGS(type, len, gpa, val),
220 __field( u64, gpa )
227 __entry->gpa = gpa;
236 __entry->len, __entry->gpa, __entry->val)
/kernel/linux/linux-5.10/arch/x86/include/asm/
Dkvm_page_track.h35 void (*track_write)(struct kvm_vcpu *vcpu, gpa_t gpa, const u8 *new,
71 void kvm_page_track_write(struct kvm_vcpu *vcpu, gpa_t gpa, const u8 *new,
/kernel/linux/linux-5.10/arch/powerpc/include/asm/
Dultravisor.h75 static inline int uv_page_inval(u64 lpid, u64 gpa, u64 page_shift) in uv_page_inval() argument
77 return ucall_norets(UV_PAGE_INVAL, lpid, gpa, page_shift); in uv_page_inval()

1234