/kernel/linux/linux-5.10/include/trace/events/ |
D | kvm.h | 285 TP_PROTO(u64 gva, u64 gfn), 287 TP_ARGS(gva, gfn), 290 __field(__u64, gva) 295 __entry->gva = gva; 299 TP_printk("gva = %#llx, gfn = %#llx", __entry->gva, __entry->gfn) 304 TP_PROTO(u64 gva, u64 gfn), 306 TP_ARGS(gva, gfn) 311 TP_PROTO(u64 gva, u64 gfn), 313 TP_ARGS(gva, gfn) 318 TP_PROTO(u64 token, u64 gva), [all …]
|
/kernel/linux/linux-5.10/tools/testing/selftests/kvm/lib/s390x/ |
D | processor.c | 54 void virt_pg_map(struct kvm_vm *vm, uint64_t gva, uint64_t gpa, in virt_pg_map() argument 60 TEST_ASSERT((gva % vm->page_size) == 0, in virt_pg_map() 63 gva, vm->page_size); in virt_pg_map() 65 (gva >> vm->page_shift)), in virt_pg_map() 67 gva); in virt_pg_map() 71 gva, vm->page_size); in virt_pg_map() 75 gva, vm->max_gfn, vm->page_size); in virt_pg_map() 80 idx = (gva >> (64 - 11 * ri)) & 0x7ffu; in virt_pg_map() 87 idx = (gva >> 12) & 0x0ffu; /* page index */ in virt_pg_map() 94 vm_paddr_t addr_gva2gpa(struct kvm_vm *vm, vm_vaddr_t gva) in addr_gva2gpa() argument [all …]
|
/kernel/linux/linux-5.10/tools/testing/selftests/kvm/lib/aarch64/ |
D | processor.c | 24 static uint64_t pgd_index(struct kvm_vm *vm, vm_vaddr_t gva) in pgd_index() argument 29 return (gva >> shift) & mask; in pgd_index() 32 static uint64_t pud_index(struct kvm_vm *vm, vm_vaddr_t gva) in pud_index() argument 40 return (gva >> shift) & mask; in pud_index() 43 static uint64_t pmd_index(struct kvm_vm *vm, vm_vaddr_t gva) in pmd_index() argument 51 return (gva >> shift) & mask; in pmd_index() 54 static uint64_t pte_index(struct kvm_vm *vm, vm_vaddr_t gva) in pte_index() argument 57 return (gva >> vm->page_shift) & mask; in pte_index() 148 vm_paddr_t addr_gva2gpa(struct kvm_vm *vm, vm_vaddr_t gva) in addr_gva2gpa() argument 155 ptep = addr_gpa2hva(vm, vm->pgd) + pgd_index(vm, gva) * 8; in addr_gva2gpa() [all …]
|
D | ucall.c | 101 vm_vaddr_t gva; in get_ucall() local 105 memcpy(&gva, run->mmio.data, sizeof(gva)); in get_ucall() 106 memcpy(&ucall, addr_gva2hva(vm, gva), sizeof(ucall)); in get_ucall()
|
/kernel/linux/linux-5.10/tools/testing/selftests/kvm/include/ |
D | perf_test_util.h | 44 uint64_t gva; member 69 uint64_t gva; in guest_code() local 76 gva = vcpu_args->gva; in guest_code() 81 uint64_t addr = gva + (i * perf_test_args.guest_page_size); in guest_code() 187 vcpu_args->gva = guest_test_virt_mem + in add_vcpus()
|
D | kvm_util.h | 78 int kvm_memcmp_hva_gva(void *hva, struct kvm_vm *vm, const vm_vaddr_t gva, 126 void *addr_gva2hva(struct kvm_vm *vm, vm_vaddr_t gva); 144 vm_paddr_t addr_gva2gpa(struct kvm_vm *vm, vm_vaddr_t gva);
|
/kernel/linux/linux-5.10/arch/x86/kvm/ |
D | x86.h | 170 gva_t gva, gfn_t gfn, unsigned access) in vcpu_cache_mmio_info() argument 181 vcpu->arch.mmio_gva = mmu_is_nested(vcpu) ? 0 : gva & PAGE_MASK; in vcpu_cache_mmio_info() 198 static inline void vcpu_clear_mmio_info(struct kvm_vcpu *vcpu, gva_t gva) in vcpu_clear_mmio_info() argument 200 if (gva != MMIO_GVA_ANY && vcpu->arch.mmio_gva != (gva & PAGE_MASK)) in vcpu_clear_mmio_info() 206 static inline bool vcpu_match_mmio_gva(struct kvm_vcpu *vcpu, unsigned long gva) in vcpu_match_mmio_gva() argument 209 vcpu->arch.mmio_gva == (gva & PAGE_MASK)) in vcpu_match_mmio_gva() 274 void kvm_fixup_and_inject_pf_error(struct kvm_vcpu *vcpu, gva_t gva, u16 error_code); 378 int kvm_handle_invpcid(struct kvm_vcpu *vcpu, unsigned long type, gva_t gva);
|
D | trace.h | 770 TP_PROTO(gva_t gva, gpa_t gpa, bool write, bool gpa_match), 771 TP_ARGS(gva, gpa, write, gpa_match), 774 __field(gva_t, gva) 781 __entry->gva = gva; 787 TP_printk("gva %#lx gpa %#llx %s %s", __entry->gva, __entry->gpa,
|
D | x86.c | 6052 gpa_t kvm_mmu_gva_to_gpa_read(struct kvm_vcpu *vcpu, gva_t gva, in kvm_mmu_gva_to_gpa_read() argument 6056 return vcpu->arch.walk_mmu->gva_to_gpa(vcpu, gva, access, exception); in kvm_mmu_gva_to_gpa_read() 6059 gpa_t kvm_mmu_gva_to_gpa_fetch(struct kvm_vcpu *vcpu, gva_t gva, in kvm_mmu_gva_to_gpa_fetch() argument 6064 return vcpu->arch.walk_mmu->gva_to_gpa(vcpu, gva, access, exception); in kvm_mmu_gva_to_gpa_fetch() 6067 gpa_t kvm_mmu_gva_to_gpa_write(struct kvm_vcpu *vcpu, gva_t gva, in kvm_mmu_gva_to_gpa_write() argument 6072 return vcpu->arch.walk_mmu->gva_to_gpa(vcpu, gva, access, exception); in kvm_mmu_gva_to_gpa_write() 6076 gpa_t kvm_mmu_gva_to_gpa_system(struct kvm_vcpu *vcpu, gva_t gva, in kvm_mmu_gva_to_gpa_system() argument 6079 return vcpu->arch.walk_mmu->gva_to_gpa(vcpu, gva, 0, exception); in kvm_mmu_gva_to_gpa_system() 6258 static int vcpu_is_mmio_gpa(struct kvm_vcpu *vcpu, unsigned long gva, in vcpu_is_mmio_gpa() argument 6266 trace_vcpu_match_mmio(gva, gpa, write, true); in vcpu_is_mmio_gpa() [all …]
|
/kernel/linux/linux-5.10/arch/s390/kvm/ |
D | gaccess.c | 493 static int trans_exc(struct kvm_vcpu *vcpu, int code, unsigned long gva, in trans_exc() argument 534 tec->addr = gva >> PAGE_SHIFT; in trans_exc() 614 static unsigned long guest_translate(struct kvm_vcpu *vcpu, unsigned long gva, in guest_translate() argument 618 union vaddress vaddr = {.addr = gva}; in guest_translate() 619 union raddress raddr = {.addr = gva}; in guest_translate() 904 int guest_translate_address(struct kvm_vcpu *vcpu, unsigned long gva, u8 ar, in guest_translate_address() argument 912 gva = kvm_s390_logical_to_effective(vcpu, gva); in guest_translate_address() 913 rc = get_vcpu_asce(vcpu, &asce, gva, ar, mode); in guest_translate_address() 916 if (is_low_address(gva) && low_address_protection_enabled(vcpu, asce)) { in guest_translate_address() 918 return trans_exc(vcpu, PGM_PROTECTION, gva, 0, in guest_translate_address() [all …]
|
D | gaccess.h | 189 int guest_translate_address(struct kvm_vcpu *vcpu, unsigned long gva, 191 int check_gva_range(struct kvm_vcpu *vcpu, unsigned long gva, u8 ar,
|
/kernel/linux/linux-5.10/arch/mips/kvm/ |
D | mmu.c | 1017 unsigned long gva, in kvm_mips_handle_mapped_seg_tlb_fault() argument 1023 unsigned int idx = TLB_LO_IDX(*tlb, gva); in kvm_mips_handle_mapped_seg_tlb_fault() 1033 if (!((gva ^ KVM_GUEST_COMMPAGE_ADDR) & VPN2_MASK & (PAGE_MASK << 1))) in kvm_mips_handle_mapped_seg_tlb_fault() 1053 ptep_gva = kvm_trap_emul_pte_for_gva(vcpu, gva & ~PAGE_SIZE); in kvm_mips_handle_mapped_seg_tlb_fault() 1055 kvm_err("No ptep for gva %lx\n", gva); in kvm_mips_handle_mapped_seg_tlb_fault() 1064 kvm_mips_host_tlb_inv(vcpu, gva, !kernel, kernel); in kvm_mips_handle_mapped_seg_tlb_fault() 1172 unsigned long gva, in kvm_trap_emul_gva_fault() argument 1179 if (KVM_GUEST_KSEGX(gva) == KVM_GUEST_KSEG0) { in kvm_trap_emul_gva_fault() 1180 if (kvm_mips_handle_kseg0_tlb_fault(gva, vcpu, write) < 0) in kvm_trap_emul_gva_fault() 1182 } else if ((KVM_GUEST_KSEGX(gva) < KVM_GUEST_KSEG0) || in kvm_trap_emul_gva_fault() [all …]
|
D | tlb.c | 304 int kvm_vz_guest_tlb_lookup(struct kvm_vcpu *vcpu, unsigned long gva, in kvm_vz_guest_tlb_lookup() argument 322 write_gc0_entryhi((o_entryhi & 0x3ff) | (gva & ~0xfffl)); in kvm_vz_guest_tlb_lookup() 364 pa = entrylo[!!(gva & pagemaskbit)]; in kvm_vz_guest_tlb_lookup() 378 pa |= gva & ~(pagemask | pagemaskbit); in kvm_vz_guest_tlb_lookup()
|
D | trap_emul.c | 23 static gpa_t kvm_trap_emul_gva_to_gpa_cb(gva_t gva) in kvm_trap_emul_gva_to_gpa_cb() argument 26 gva_t kseg = KSEGX(gva); in kvm_trap_emul_gva_to_gpa_cb() 27 gva_t gkseg = KVM_GUEST_KSEGX(gva); in kvm_trap_emul_gva_to_gpa_cb() 30 gpa = CPHYSADDR(gva); in kvm_trap_emul_gva_to_gpa_cb() 32 gpa = KVM_GUEST_CPHYSADDR(gva); in kvm_trap_emul_gva_to_gpa_cb() 34 kvm_err("%s: cannot find GPA for GVA: %#lx\n", __func__, gva); in kvm_trap_emul_gva_to_gpa_cb() 39 kvm_debug("%s: gva %#lx, gpa: %#llx\n", __func__, gva, gpa); in kvm_trap_emul_gva_to_gpa_cb()
|
D | vz.c | 197 static gpa_t kvm_vz_gva_to_gpa_cb(gva_t gva) in kvm_vz_gva_to_gpa_cb() argument 200 return gva; in kvm_vz_gva_to_gpa_cb() 691 static int kvm_vz_gva_to_gpa(struct kvm_vcpu *vcpu, unsigned long gva, in kvm_vz_gva_to_gpa() argument 694 u32 gva32 = gva; in kvm_vz_gva_to_gpa() 697 if ((long)gva == (s32)gva32) { in kvm_vz_gva_to_gpa() 752 } else if ((gva & 0xc000000000000000) == 0x8000000000000000) { in kvm_vz_gva_to_gpa() 760 if (segctl & (1ull << (56 + ((gva >> 59) & 0x7)))) { in kvm_vz_gva_to_gpa() 774 *gpa = gva & 0x07ffffffffffffff; in kvm_vz_gva_to_gpa() 780 return kvm_vz_guest_tlb_lookup(vcpu, gva, gpa); in kvm_vz_gva_to_gpa()
|
/kernel/linux/linux-5.10/arch/x86/kvm/vmx/ |
D | vmx_ops.h | 21 void invvpid_error(unsigned long ext, u16 vpid, gva_t gva); 255 static inline void __invvpid(unsigned long ext, u16 vpid, gva_t gva) in __invvpid() argument 260 u64 gva; in __invvpid() member 261 } operand = { vpid, 0, gva }; in __invvpid() 263 vmx_asm2(invvpid, "r"(ext), "m"(operand), ext, vpid, gva); in __invvpid()
|
D | nested.c | 4808 gva_t gva; in nested_vmx_get_vmptr() local 4814 sizeof(*vmpointer), &gva)) { in nested_vmx_get_vmptr() 4819 r = kvm_read_guest_virt(vcpu, gva, vmpointer, sizeof(*vmpointer), &e); in nested_vmx_get_vmptr() 5111 gva_t gva = 0; in handle_vmread() local 5150 instr_info, true, len, &gva)) in handle_vmread() 5153 r = kvm_write_guest_virt_system(vcpu, gva, &value, len, &e); in handle_vmread() 5195 gva_t gva; in handle_vmwrite() local 5224 instr_info, false, len, &gva)) in handle_vmwrite() 5226 r = kvm_read_guest_virt(vcpu, gva, &value, len, &e); in handle_vmwrite() 5374 gva_t gva; in handle_vmptrst() local [all …]
|
/kernel/linux/linux-5.10/arch/x86/include/asm/ |
D | kvm_host.h | 361 void (*invlpg)(struct kvm_vcpu *vcpu, gva_t gva, hpa_t root_hpa); 1541 int kvm_mmu_unprotect_page_virt(struct kvm_vcpu *vcpu, gva_t gva); 1550 gpa_t kvm_mmu_gva_to_gpa_read(struct kvm_vcpu *vcpu, gva_t gva, 1552 gpa_t kvm_mmu_gva_to_gpa_fetch(struct kvm_vcpu *vcpu, gva_t gva, 1554 gpa_t kvm_mmu_gva_to_gpa_write(struct kvm_vcpu *vcpu, gva_t gva, 1556 gpa_t kvm_mmu_gva_to_gpa_system(struct kvm_vcpu *vcpu, gva_t gva, 1569 void kvm_mmu_invlpg(struct kvm_vcpu *vcpu, gva_t gva); 1571 gva_t gva, hpa_t root_hpa); 1572 void kvm_mmu_invpcid_gva(struct kvm_vcpu *vcpu, gva_t gva, unsigned long pcid);
|
/kernel/linux/linux-5.10/tools/testing/selftests/kvm/lib/x86_64/ |
D | processor.c | 482 vm_paddr_t addr_gva2gpa(struct kvm_vm *vm, vm_vaddr_t gva) in addr_gva2gpa() argument 493 index[0] = (gva >> 12) & 0x1ffu; in addr_gva2gpa() 494 index[1] = (gva >> 21) & 0x1ffu; in addr_gva2gpa() 495 index[2] = (gva >> 30) & 0x1ffu; in addr_gva2gpa() 496 index[3] = (gva >> 39) & 0x1ffu; in addr_gva2gpa() 516 return (pte[index[0]].address * vm->page_size) + (gva & 0xfffu); in addr_gva2gpa() 519 TEST_FAIL("No mapping for vm virtual address, gva: 0x%lx", gva); in addr_gva2gpa()
|
/kernel/linux/linux-5.10/arch/x86/kvm/mmu/ |
D | mmu.c | 2930 static bool handle_abnormal_pfn(struct kvm_vcpu *vcpu, gva_t gva, gfn_t gfn, in handle_abnormal_pfn() argument 2941 vcpu_cache_mmio_info(vcpu, gva, gfn, in handle_abnormal_pfn() 3217 static hpa_t mmu_alloc_root(struct kvm_vcpu *vcpu, gfn_t gfn, gva_t gva, in mmu_alloc_root() argument 3228 sp = kvm_mmu_get_page(vcpu, gfn, gva, level, direct, ACC_ALL); in mmu_alloc_root() 5050 int kvm_mmu_unprotect_page_virt(struct kvm_vcpu *vcpu, gva_t gva) in kvm_mmu_unprotect_page_virt() argument 5058 gpa = kvm_mmu_gva_to_gpa_read(vcpu, gva, NULL); in kvm_mmu_unprotect_page_virt() 5127 gva_t gva, hpa_t root_hpa) in kvm_mmu_invalidate_gva() argument 5134 if (is_noncanonical_address(gva, vcpu)) in kvm_mmu_invalidate_gva() 5137 kvm_x86_ops.tlb_flush_gva(vcpu, gva); in kvm_mmu_invalidate_gva() 5144 mmu->invlpg(vcpu, gva, mmu->root_hpa); in kvm_mmu_invalidate_gva() [all …]
|
D | paging_tmpl.h | 901 static void FNAME(invlpg)(struct kvm_vcpu *vcpu, gva_t gva, hpa_t root_hpa) in FNAME() 909 vcpu_clear_mmio_info(vcpu, gva); in FNAME() 923 for_each_shadow_entry_using_root(vcpu, root_hpa, gva, iterator) { in FNAME()
|
/kernel/linux/linux-5.10/arch/mips/include/asm/ |
D | kvm_host.h | 827 gpa_t (*gva_to_gpa)(gva_t gva); 897 unsigned long gva, 915 int kvm_vz_guest_tlb_lookup(struct kvm_vcpu *vcpu, unsigned long gva, 967 unsigned long gva,
|
/kernel/linux/linux-5.10/tools/testing/selftests/kvm/lib/ |
D | kvm_util.c | 533 int kvm_memcmp_hva_gva(void *hva, struct kvm_vm *vm, vm_vaddr_t gva, size_t len) in kvm_memcmp_hva_gva() argument 548 uintptr_t ptr2 = (uintptr_t)addr_gva2hva(vm, gva + offset); in kvm_memcmp_hva_gva() 1766 void *addr_gva2hva(struct kvm_vm *vm, vm_vaddr_t gva) in addr_gva2hva() argument 1768 return addr_gpa2hva(vm, addr_gva2gpa(vm, gva)); in addr_gva2hva()
|
/kernel/linux/linux-5.10/Documentation/virt/kvm/ |
D | mmu.rst | 49 gva guest virtual address 79 guest physical addresses, to host physical addresses (gva->gpa->hpa) 139 paging: gva->gpa->hpa 140 paging, tdp: (gva->)gpa->hpa 325 (gva->gpa or ngpa->gpa)
|
/kernel/linux/linux-5.10/arch/x86/kvm/svm/ |
D | svm.c | 2852 gva_t gva; in invpcid_interception() local 2865 gva = svm->vmcb->control.exit_info_1; in invpcid_interception() 2872 return kvm_handle_invpcid(vcpu, type, gva); in invpcid_interception() 3368 static void svm_flush_tlb_gva(struct kvm_vcpu *vcpu, gva_t gva) in svm_flush_tlb_gva() argument 3372 invlpga(gva, svm->vmcb->control.asid); in svm_flush_tlb_gva()
|