/openbmc/qemu/linux-user/ |
H A D | uaccess.c | 8 void *lock_user(int type, abi_ulong guest_addr, ssize_t len, bool copy) in lock_user() argument 12 guest_addr = cpu_untagged_addr(thread_cpu, guest_addr); in lock_user() 13 if (!access_ok_untagged(type, guest_addr, len)) { in lock_user() 16 host_addr = g2h_untagged(guest_addr); in lock_user() 28 void unlock_user(void *host_ptr, abi_ulong guest_addr, ssize_t len) in unlock_user() argument 35 host_ptr_conv = g2h(thread_cpu, guest_addr); in unlock_user() 46 void *lock_user_string(abi_ulong guest_addr) in lock_user_string() argument 48 ssize_t len = target_strlen(guest_addr); in lock_user_string() 52 return lock_user(VERIFY_READ, guest_addr, len + 1, 1); in lock_user_string() 93 abi_ulong guest_addr; in target_strlen() local [all …]
|
H A D | qemu.h | 336 void *lock_user(int type, abi_ulong guest_addr, ssize_t len, bool copy); 342 static inline void unlock_user(void *host_ptr, abi_ulong guest_addr, in unlock_user() argument 348 void unlock_user(void *host_ptr, abi_ulong guest_addr, ssize_t len); 356 void *lock_user_string(abi_ulong guest_addr); 359 #define lock_user_struct(type, host_ptr, guest_addr, copy) \ argument 360 (host_ptr = lock_user(type, guest_addr, sizeof(*host_ptr), copy)) 361 #define unlock_user_struct(host_ptr, guest_addr, copy) \ argument 362 unlock_user(host_ptr, guest_addr, (copy) ? sizeof(*host_ptr) : 0)
|
H A D | signal.c | 957 abi_ptr guest_addr = h2g_nocheck(host_addr); in host_sigsegv_handler() local 968 pc, guest_addr)) { in host_sigsegv_handler() 987 if (page_get_flags(guest_addr) & PAGE_VALID) { in host_sigsegv_handler() 995 cpu_loop_exit_sigsegv(cpu, guest_addr, access_type, maperr, pc); in host_sigsegv_handler() 1015 abi_ptr guest_addr = h2g_nocheck(host_addr); in host_sigbus_handler() local 1018 cpu_loop_exit_sigbus(cpu, guest_addr, access_type, pc); in host_sigbus_handler()
|
/openbmc/qemu/bsd-user/ |
H A D | uaccess.c | 45 abi_ulong guest_addr; in target_strlen() local 48 guest_addr = guest_addr1; in target_strlen() 50 max_len = TARGET_PAGE_SIZE - (guest_addr & ~TARGET_PAGE_MASK); in target_strlen() 51 ptr = lock_user(VERIFY_READ, guest_addr, max_len, 1); in target_strlen() 55 unlock_user(ptr, guest_addr, 0); in target_strlen() 56 guest_addr += len; in target_strlen() 58 if (guest_addr == 0 || in target_strlen() 59 (guest_addr - guest_addr1) > 0x7fffffff) in target_strlen() 64 return guest_addr - guest_addr1; in target_strlen()
|
H A D | qemu.h | 432 static inline void *lock_user(int type, abi_ulong guest_addr, long len, in lock_user() argument 435 if (!access_ok(type, guest_addr, len)) { in lock_user() 443 memcpy(addr, g2h_untagged(guest_addr), len); in lock_user() 450 return g2h_untagged(guest_addr); in lock_user() 458 static inline void unlock_user(void *host_ptr, abi_ulong guest_addr, in unlock_user() argument 466 if (host_ptr == g2h_untagged(guest_addr)) { in unlock_user() 470 memcpy(g2h_untagged(guest_addr), host_ptr, len); in unlock_user() 483 static inline void *lock_user_string(abi_ulong guest_addr) in lock_user_string() argument 486 len = target_strlen(guest_addr); in lock_user_string() 490 return lock_user(VERIFY_READ, guest_addr, (long)(len + 1), 1); in lock_user_string() [all …]
|
H A D | signal.c | 498 abi_ptr guest_addr; in host_signal_handler() local 507 guest_addr = h2g_nocheck(host_addr); in host_signal_handler() 520 pc, guest_addr)) { in host_signal_handler() 528 if (page_get_flags(guest_addr) & PAGE_VALID) { in host_signal_handler() 536 cpu_loop_exit_sigsegv(cpu, guest_addr, access_type, maperr, pc); in host_signal_handler() 540 cpu_loop_exit_sigbus(cpu, guest_addr, access_type, pc); in host_signal_handler()
|
/openbmc/linux/arch/riscv/kvm/ |
H A D | vcpu_exit.c | 61 unsigned long guest_addr, in kvm_riscv_vcpu_unpriv_read() argument 94 [addr] "+&r" (guest_addr) : : "memory"); in kvm_riscv_vcpu_unpriv_read() 118 : [addr] "r" (guest_addr) : "memory"); in kvm_riscv_vcpu_unpriv_read()
|
/openbmc/linux/tools/testing/selftests/kvm/ |
H A D | memslot_perf_test.c | 285 uint64_t guest_addr; in prepare_vm() local 315 for (slot = 1, guest_addr = MEM_GPA; slot <= data->nslots; slot++) { in prepare_vm() 323 guest_addr, slot, npages, in prepare_vm() 325 guest_addr += npages * guest_page_size; in prepare_vm() 329 for (slot = 1, guest_addr = MEM_GPA; slot <= data->nslots; slot++) { in prepare_vm() 337 gpa = vm_phy_pages_alloc(data->vm, npages, guest_addr, slot); in prepare_vm() 338 TEST_ASSERT(gpa == guest_addr, in prepare_vm() 341 data->hva_slots[slot - 1] = addr_gpa2hva(data->vm, guest_addr); in prepare_vm() 344 guest_addr += npages * guest_page_size; in prepare_vm()
|
/openbmc/qemu/net/ |
H A D | slirp.c | 804 struct sockaddr_in guest_addr = { in slirp_hostfwd() local 856 if (buf[0] != '\0' && !inet_aton(buf, &guest_addr.sin_addr)) { in slirp_hostfwd() 866 guest_addr.sin_port = htons(guest_port); in slirp_hostfwd() 871 (struct sockaddr *) &guest_addr, sizeof(guest_addr), in slirp_hostfwd() 876 guest_addr.sin_addr, guest_port); in slirp_hostfwd()
|
/openbmc/linux/arch/um/drivers/ |
H A D | vhost_user.h | 96 u64 guest_addr; member
|
H A D | virtio_uml.c | 611 region_out->guest_addr = addr; in vhost_user_init_mem_region()
|
/openbmc/qemu/subprojects/libvhost-user/ |
H A D | libvhost-user.c | 202 vu_gpa_to_mem_region(VuDev *dev, uint64_t guest_addr) in vu_gpa_to_mem_region() argument 219 if (guest_addr >= cur->gpa && guest_addr < cur->gpa + cur->size) { in vu_gpa_to_mem_region() 222 if (guest_addr >= cur->gpa + cur->size) { in vu_gpa_to_mem_region() 225 if (guest_addr < cur->gpa) { in vu_gpa_to_mem_region() 234 vu_gpa_to_va(VuDev *dev, uint64_t *plen, uint64_t guest_addr) in vu_gpa_to_va() argument 242 r = vu_gpa_to_mem_region(dev, guest_addr); in vu_gpa_to_va() 247 if ((guest_addr + *plen) > (r->gpa + r->size)) { in vu_gpa_to_va() 248 *plen = r->gpa + r->size - guest_addr; in vu_gpa_to_va() 250 return (void *)(uintptr_t)guest_addr - r->gpa + r->mmap_addr + in vu_gpa_to_va()
|
H A D | libvhost-user.h | 523 void *vu_gpa_to_va(VuDev *dev, uint64_t *plen, uint64_t guest_addr);
|
/openbmc/linux/arch/riscv/include/asm/ |
H A D | kvm_host.h | 332 unsigned long guest_addr,
|
/openbmc/qemu/target/loongarch/kvm/ |
H A D | kvm.c | 44 .addr = (uint64_t)&env->stealtime.guest_addr, in kvm_get_stealtime() 68 .addr = (uint64_t)&env->stealtime.guest_addr, in kvm_set_stealtime() 79 strerror(errno), env->stealtime.guest_addr); in kvm_set_stealtime()
|
/openbmc/qemu/target/loongarch/ |
H A D | machine.c | 236 VMSTATE_UINT64(env.stealtime.guest_addr, LoongArchCPU),
|
H A D | cpu.h | 368 uint64_t guest_addr; member
|
/openbmc/qemu/include/exec/ |
H A D | exec-all.h | 556 uintptr_t host_pc, abi_ptr guest_addr);
|
/openbmc/linux/drivers/iommu/intel/ |
H A D | dmar.c | 2030 u64 guest_addr; in dmar_fault() local 2052 guest_addr = dmar_readq(iommu->reg + reg + in dmar_fault() 2054 guest_addr = dma_frcd_page_addr(guest_addr); in dmar_fault() 2067 source_id, guest_addr); in dmar_fault()
|
/openbmc/qemu/hw/xen/ |
H A D | xen_pt.c | 639 pcibus_t guest_addr = sec->offset_within_address_space; in xen_pt_region_update() local 644 XEN_PFN(guest_addr + XC_PAGE_SIZE - 1), in xen_pt_region_update()
|
/openbmc/qemu/accel/tcg/ |
H A D | user-exec.c | 121 uintptr_t host_pc, abi_ptr guest_addr) in handle_sigsegv_accerr_write() argument 123 switch (page_unprotect(guest_addr, host_pc)) { in handle_sigsegv_accerr_write()
|
/openbmc/linux/arch/s390/include/asm/ |
H A D | kvm_host.h | 795 __u64 guest_addr; member
|