/linux/drivers/virt/acrn/ |
A D | hypercall.h | 80 static inline long hcall_start_vm(u64 vmid) in hcall_start_vm() argument 82 return acrn_hypercall1(HC_START_VM, vmid); in hcall_start_vm() 91 static inline long hcall_pause_vm(u64 vmid) in hcall_pause_vm() argument 93 return acrn_hypercall1(HC_PAUSE_VM, vmid); in hcall_pause_vm() 102 static inline long hcall_destroy_vm(u64 vmid) in hcall_destroy_vm() argument 104 return acrn_hypercall1(HC_DESTROY_VM, vmid); in hcall_destroy_vm() 113 static inline long hcall_reset_vm(u64 vmid) in hcall_reset_vm() argument 115 return acrn_hypercall1(HC_RESET_VM, vmid); in hcall_reset_vm() 139 return acrn_hypercall2(HC_INJECT_MSI, vmid, msi); in hcall_inject_msi() 163 return acrn_hypercall2(HC_SET_IRQLINE, vmid, op); in hcall_set_irqline() [all …]
|
A D | vm.c | 31 if (ret < 0 || vm_param->vmid == ACRN_INVALID_VMID) { in acrn_vm_create() 40 vm->vmid = vm_param->vmid; in acrn_vm_create() 44 hcall_destroy_vm(vm_param->vmid); in acrn_vm_create() 45 vm->vmid = ACRN_INVALID_VMID; in acrn_vm_create() 55 dev_dbg(acrn_dev.this_device, "VM %u created.\n", vm->vmid); in acrn_vm_create() 63 if (vm->vmid == ACRN_INVALID_VMID || in acrn_vm_destroy() 67 ret = hcall_destroy_vm(vm->vmid); in acrn_vm_destroy() 70 "Failed to destroy VM %u\n", vm->vmid); in acrn_vm_destroy() 92 vm->vmid = ACRN_INVALID_VMID; in acrn_vm_destroy() 120 ret = hcall_inject_msi(vm->vmid, virt_to_phys(msi)); in acrn_msi_inject() [all …]
|
A D | hsm.c | 37 vm->vmid = ACRN_INVALID_VMID; in acrn_dev_open() 158 ret = hcall_start_vm(vm->vmid); in acrn_dev_ioctl() 161 "Failed to start VM %u!\n", vm->vmid); in acrn_dev_ioctl() 164 ret = hcall_pause_vm(vm->vmid); in acrn_dev_ioctl() 167 "Failed to pause VM %u!\n", vm->vmid); in acrn_dev_ioctl() 170 ret = hcall_reset_vm(vm->vmid); in acrn_dev_ioctl() 173 "Failed to restart VM %u!\n", vm->vmid); in acrn_dev_ioctl() 205 vm->vmid); in acrn_dev_ioctl() 276 ret = hcall_create_vdev(vm->vmid, virt_to_phys(vdev)); in acrn_dev_ioctl() 318 ret = hcall_set_irqline(vm->vmid, ioctl_param); in acrn_dev_ioctl() [all …]
|
A D | mm.c | 27 regions->vmid = vm->vmid; in modify_region() 34 "Failed to set memory region for VM[%u]!\n", vm->vmid); in modify_region() 125 "Add memory region failed, VM[%u]!\n", vm->vmid); in acrn_vm_memseg_map() 143 "Del memory region failed, VM[%u]!\n", vm->vmid); in acrn_vm_memseg_unmap() 233 regions_info->vmid = vm->vmid; in acrn_vm_ram_map() 261 "Failed to set regions, VM[%u]!\n", vm->vmid); in acrn_vm_ram_map() 268 __func__, vm->vmid, in acrn_vm_ram_map()
|
/linux/arch/riscv/kvm/ |
A D | vmid.c | 51 kvm->arch.vmid.vmid_version = 0; in kvm_riscv_stage2_vmid_init() 52 kvm->arch.vmid.vmid = 0; in kvm_riscv_stage2_vmid_init() 57 bool kvm_riscv_stage2_vmid_ver_changed(struct kvm_vmid *vmid) in kvm_riscv_stage2_vmid_ver_changed() argument 62 return unlikely(READ_ONCE(vmid->vmid_version) != in kvm_riscv_stage2_vmid_ver_changed() 71 struct kvm_vmid *vmid = &vcpu->kvm->arch.vmid; in kvm_riscv_stage2_vmid_update() local 73 if (!kvm_riscv_stage2_vmid_ver_changed(vmid)) in kvm_riscv_stage2_vmid_update() 82 if (!kvm_riscv_stage2_vmid_ver_changed(vmid)) { in kvm_riscv_stage2_vmid_update() 109 vmid->vmid = vmid_next; in kvm_riscv_stage2_vmid_update() 113 WRITE_ONCE(vmid->vmid_version, READ_ONCE(vmid_version)); in kvm_riscv_stage2_vmid_update()
|
/linux/drivers/gpu/drm/amd/display/modules/vmid/ |
A D | vmid.c | 43 if (vmid < MAX_VMID) { in add_ptb_to_table() 44 core_vmid->ptb_assigned_to_vmid[vmid] = ptb; in add_ptb_to_table() 51 if (vmid < MAX_VMID) { in clear_entry_from_vmid_table() 52 core_vmid->ptb_assigned_to_vmid[vmid] = 0; in clear_entry_from_vmid_table() 98 int vmid = 0; in mod_vmid_get_for_ptb() local 104 vmid = get_existing_vmid_for_ptb(core_vmid, ptb); in mod_vmid_get_for_ptb() 106 if (vmid == -1) { in mod_vmid_get_for_ptb() 114 vmid = get_next_available_vmid(core_vmid); in mod_vmid_get_for_ptb() 115 if (vmid != -1) { in mod_vmid_get_for_ptb() 116 add_ptb_to_table(core_vmid, vmid, ptb); in mod_vmid_get_for_ptb() [all …]
|
/linux/drivers/gpu/drm/amd/amdkfd/ |
A D | cik_event_interrupt.c | 37 unsigned int vmid; in cik_event_interrupt_isr() local 53 vmid = f2g->read_vmid_from_vmfault_reg(dev->kgd); in cik_event_interrupt_isr() 54 ret = f2g->get_atc_vmid_pasid_mapping_info(dev->kgd, vmid, &pasid); in cik_event_interrupt_isr() 57 tmp_ihre->ring_id |= vmid << 8; in cik_event_interrupt_isr() 61 vmid >= dev->vm_info.first_vmid_kfd && in cik_event_interrupt_isr() 62 vmid <= dev->vm_info.last_vmid_kfd; in cik_event_interrupt_isr() 66 vmid = (ihre->ring_id & 0x0000ff00) >> 8; in cik_event_interrupt_isr() 67 if (vmid < dev->vm_info.first_vmid_kfd || in cik_event_interrupt_isr() 68 vmid > dev->vm_info.last_vmid_kfd) in cik_event_interrupt_isr() 94 unsigned int vmid = (ihre->ring_id & 0x0000ff00) >> 8; in cik_event_interrupt_wq() local [all …]
|
A D | kfd_int_process_v9.c | 97 uint16_t source_id, client_id, pasid, vmid; in event_interrupt_isr_v9() local 101 vmid = SOC15_VMID_FROM_IH_ENTRY(ih_ring_entry); in event_interrupt_isr_v9() 102 if (vmid < dev->vm_info.first_vmid_kfd || in event_interrupt_isr_v9() 103 vmid > dev->vm_info.last_vmid_kfd) in event_interrupt_isr_v9() 140 pasid = dev->dqm->vmid_pasid[vmid]; in event_interrupt_isr_v9() 148 client_id, source_id, vmid, pasid); in event_interrupt_isr_v9() 173 uint16_t source_id, client_id, pasid, vmid; in event_interrupt_wq_v9() local 180 vmid = SOC15_VMID_FROM_IH_ENTRY(ih_ring_entry); in event_interrupt_wq_v9() 265 info.vmid = vmid; in event_interrupt_wq_v9()
|
A D | kfd_dbgdev.c | 258 cntl->bitfields.vmid = (uint32_t) vmid; in dbgdev_address_watch_set_registers() 303 &cntl, i, pdd->qpd.vmid); in dbgdev_address_watch_nodiq() 319 cntl.bitfields.vmid); in dbgdev_address_watch_nodiq() 349 unsigned int vmid = 0; in dbgdev_address_watch_diq() local 398 vmid); in dbgdev_address_watch_diq() 416 cntl.bitfields.vmid); in dbgdev_address_watch_diq() 763 unsigned int vmid; in dbgdev_wave_reset_wavefronts() local 785 for (vmid = first_vmid_to_scan; vmid <= last_vmid_to_scan; vmid++) { in dbgdev_wave_reset_wavefronts() 791 vmid, p->pasid); in dbgdev_wave_reset_wavefronts() 796 if (vmid > last_vmid_to_scan) { in dbgdev_wave_reset_wavefronts() [all …]
|
/linux/drivers/gpu/drm/amd/display/dc/dcn20/ |
A D | dcn20_vmid.c | 32 vmid->regs->reg 35 vmid->ctx 39 vmid->shifts->field_name, vmid->masks->field_name 41 static void dcn20_wait_for_vmid_ready(struct dcn20_vmid *vmid) in dcn20_wait_for_vmid_ready() argument 73 void dcn20_vmid_setup(struct dcn20_vmid *vmid, const struct dcn_vmid_page_table_config *config) in dcn20_vmid_setup() argument 95 dcn20_wait_for_vmid_ready(vmid); in dcn20_vmid_setup()
|
/linux/drivers/gpu/drm/amd/amdgpu/ |
A D | amdgpu_amdkfd_gfx_v9.c | 104 lock_srbm(kgd, 0, 0, 0, vmid); in kgd_gfx_v9_program_sh_mem_settings() 114 unsigned int vmid) in kgd_gfx_v9_set_pasid_vmid_mapping() argument 140 (1U << vmid))) in kgd_gfx_v9_set_pasid_vmid_mapping() 145 1U << vmid); in kgd_gfx_v9_set_pasid_vmid_mapping() 157 (1U << (vmid + 16)))) in kgd_gfx_v9_set_pasid_vmid_mapping() 162 1U << (vmid + 16)); in kgd_gfx_v9_set_pasid_vmid_mapping() 644 + vmid); in kgd_gfx_v9_get_atc_vmid_pasid_mapping_info() 703 vmid); in kgd_gfx_v9_set_vm_context_page_table_base() 737 int *wave_cnt, int *vmid) in get_wave_count() argument 748 *vmid = 0xFF; in get_wave_count() [all …]
|
A D | gmc_v10_0.c | 205 uint8_t vmid, uint16_t *p_pasid) in gmc_v10_0_get_atc_vmid_pasid_mapping_info() argument 210 + vmid); in gmc_v10_0_get_atc_vmid_pasid_mapping_info() 280 tmp &= 1 << vmid; in gmc_v10_0_flush_vm_hub() 339 1 << vmid); in gmc_v10_0_flush_gpu_tlb() 412 int vmid, i; in gmc_v10_0_flush_gpu_tlb_pasid() local 444 for (vmid = 1; vmid < AMDGPU_NUM_VMID; vmid++) { in gmc_v10_0_flush_gpu_tlb_pasid() 451 gmc_v10_0_flush_gpu_tlb(adev, vmid, in gmc_v10_0_flush_gpu_tlb_pasid() 454 gmc_v10_0_flush_gpu_tlb(adev, vmid, in gmc_v10_0_flush_gpu_tlb_pasid() 487 (hub->ctx_addr_distance * vmid), in gmc_v10_0_emit_flush_gpu_tlb() 491 (hub->ctx_addr_distance * vmid), in gmc_v10_0_emit_flush_gpu_tlb() [all …]
|
A D | amdgpu_gmc.h | 80 uint32_t (*get_invalidate_req)(unsigned int vmid, uint32_t flush_type); 112 void (*flush_gpu_tlb)(struct amdgpu_device *adev, uint32_t vmid, 118 uint64_t (*emit_flush_gpu_tlb)(struct amdgpu_ring *ring, unsigned vmid, 121 void (*emit_pasid_mapping)(struct amdgpu_ring *ring, unsigned vmid, 265 #define amdgpu_gmc_flush_gpu_tlb(adev, vmid, vmhub, type) ((adev)->gmc.gmc_funcs->flush_gpu_tlb((ad… argument 269 #define amdgpu_gmc_emit_flush_gpu_tlb(r, vmid, addr) (r)->adev->gmc.gmc_funcs->emit_flush_gpu_tlb((… argument 270 #define amdgpu_gmc_emit_pasid_mapping(r, vmid, pasid) (r)->adev->gmc.gmc_funcs->emit_pasid_mapping(… argument
|
A D | amdgpu_amdkfd_gfx_v10.c | 48 uint32_t queue, uint32_t vmid) in lock_srbm() argument 53 nv_grbm_select(adev, mec, pipe, queue, vmid); in lock_srbm() 97 lock_srbm(kgd, 0, 0, 0, vmid); in kgd_program_sh_mem_settings() 107 unsigned int vmid) in kgd_set_pasid_vmid_mapping() argument 132 (1U << vmid))) in kgd_set_pasid_vmid_mapping() 138 1U << vmid); in kgd_set_pasid_vmid_mapping() 687 uint8_t vmid, uint16_t *p_pasid) in get_atc_vmid_pasid_mapping_info() argument 693 + vmid); in get_atc_vmid_pasid_mapping_info() 750 if (!amdgpu_amdkfd_is_kfd_vmid(adev, vmid)) { in set_vm_context_page_table_base() 752 vmid); in set_vm_context_page_table_base() [all …]
|
A D | amdgpu_amdkfd_gfx_v7.c | 75 uint32_t vmid:4; member 91 uint32_t queue, uint32_t vmid) in lock_srbm() argument 132 lock_srbm(kgd, 0, 0, 0, vmid); in kgd_program_sh_mem_settings() 143 unsigned int vmid) in kgd_set_pasid_vmid_mapping() argument 163 WREG32(mmIH_VMID_0_LUT + vmid, pasid_mapping); in kgd_set_pasid_vmid_mapping() 638 uint8_t vmid, uint16_t *p_pasid) in get_atc_vmid_pasid_mapping_info() argument 643 value = RREG32(mmATC_VMID0_PASID_MAPPING + vmid); in get_atc_vmid_pasid_mapping_info() 650 uint64_t va, uint32_t vmid) in set_scratch_backing_va() argument 654 lock_srbm(kgd, 0, 0, 0, vmid); in set_scratch_backing_va() 664 if (!amdgpu_amdkfd_is_kfd_vmid(adev, vmid)) { in set_vm_context_page_table_base() [all …]
|
A D | amdgpu_amdkfd_gfx_v8.c | 48 uint32_t queue, uint32_t vmid) in lock_srbm() argument 89 lock_srbm(kgd, 0, 0, 0, vmid); in kgd_program_sh_mem_settings() 100 unsigned int vmid) in kgd_set_pasid_vmid_mapping() argument 114 WREG32(mmATC_VMID0_PASID_MAPPING + vmid, pasid_mapping); in kgd_set_pasid_vmid_mapping() 121 WREG32(mmIH_VMID_0_LUT + vmid, pasid_mapping); in kgd_set_pasid_vmid_mapping() 553 uint8_t vmid, uint16_t *p_pasid) in get_atc_vmid_pasid_mapping_info() argument 558 value = RREG32(mmATC_VMID0_PASID_MAPPING + vmid); in get_atc_vmid_pasid_mapping_info() 611 uint64_t va, uint32_t vmid) in set_scratch_backing_va() argument 615 lock_srbm(kgd, 0, 0, 0, vmid); in set_scratch_backing_va() 625 if (!amdgpu_amdkfd_is_kfd_vmid(adev, vmid)) { in set_vm_context_page_table_base() [all …]
|
A D | amdgpu_amdkfd_gfx_v9.h | 25 void kgd_gfx_v9_program_sh_mem_settings(struct kgd_dev *kgd, uint32_t vmid, 30 unsigned int vmid); 62 uint8_t vmid, uint16_t *p_pasid); 65 uint32_t vmid, uint64_t page_table_base); 69 uint32_t vmid, uint64_t tba_addr, uint64_t tma_addr);
|
A D | gmc_v9_0.c | 710 uint8_t vmid, uint16_t *p_pasid) in gmc_v9_0_get_atc_vmid_pasid_mapping_info() argument 715 + vmid); in gmc_v9_0_get_atc_vmid_pasid_mapping_info() 774 1 << vmid); in gmc_v9_0_flush_gpu_tlb() 820 if (tmp & (1 << vmid)) in gmc_v9_0_flush_gpu_tlb() 860 int vmid, i; in gmc_v9_0_flush_gpu_tlb_pasid() local 914 for (vmid = 1; vmid < 16; vmid++) { in gmc_v9_0_flush_gpu_tlb_pasid() 921 gmc_v9_0_flush_gpu_tlb(adev, vmid, in gmc_v9_0_flush_gpu_tlb_pasid() 924 gmc_v9_0_flush_gpu_tlb(adev, vmid, in gmc_v9_0_flush_gpu_tlb_pasid() 936 unsigned vmid, uint64_t pd_addr) in gmc_v9_0_emit_flush_gpu_tlb() argument 959 (hub->ctx_addr_distance * vmid), in gmc_v9_0_emit_flush_gpu_tlb() [all …]
|
A D | amdgpu_trace.h | 84 __field(unsigned, vmid) 96 __entry->vmid = iv->vmid; 109 __entry->ring_id, __entry->vmid, 224 __field(u32, vmid) 233 __entry->vmid = job->vmid; 239 __entry->pasid, __get_str(ring), __entry->vmid, 416 TP_PROTO(struct amdgpu_ring *ring, unsigned vmid, 418 TP_ARGS(ring, vmid, pd_addr), 421 __field(u32, vmid) 428 __entry->vmid = vmid; [all …]
|
A D | gmc_v7_0.c | 437 int vmid; in gmc_v7_0_flush_gpu_tlb_pasid() local 443 for (vmid = 1; vmid < 16; vmid++) { in gmc_v7_0_flush_gpu_tlb_pasid() 445 tmp = RREG32(mmATC_VMID0_PASID_MAPPING + vmid); in gmc_v7_0_flush_gpu_tlb_pasid() 448 WREG32(mmVM_INVALIDATE_REQUEST, 1 << vmid); in gmc_v7_0_flush_gpu_tlb_pasid() 478 WREG32(mmVM_INVALIDATE_REQUEST, 1 << vmid); in gmc_v7_0_flush_gpu_tlb() 482 unsigned vmid, uint64_t pd_addr) in gmc_v7_0_emit_flush_gpu_tlb() argument 486 if (vmid < 8) in gmc_v7_0_emit_flush_gpu_tlb() 789 protections, vmid, pasid, addr, in gmc_v7_0_vm_decode_fault() 1275 u32 addr, status, mc_client, vmid; in gmc_v7_0_process_interrupt() local 1302 if (amdgpu_amdkfd_is_kfd_vmid(adev, vmid) in gmc_v7_0_process_interrupt() [all …]
|
A D | amdgpu_amdkfd_gfx_v10_3.c | 47 uint32_t queue, uint32_t vmid) in lock_srbm() argument 52 nv_grbm_select(adev, mec, pipe, queue, vmid); in lock_srbm() 96 lock_srbm(kgd, 0, 0, 0, vmid); in program_sh_mem_settings_v10_3() 107 unsigned int vmid) in set_pasid_vmid_mapping_v10_3() argument 115 vmid, pasid); in set_pasid_vmid_mapping_v10_3() 665 uint32_t vmid, uint64_t tba_addr, uint64_t tma_addr) in program_trap_handler_settings_v10_3() argument 669 lock_srbm(kgd, 0, 0, 0, vmid); in program_trap_handler_settings_v10_3() 694 uint32_t vmid) 767 uint32_t vmid) 780 VMID_MASK, is_mode_set ? 1 << vmid : 0); [all …]
|
/linux/samples/acrn/ |
A D | vm-sample.c | 31 __u16 vmid; variable 43 ioctl(hsm_fd, ACRN_IOCTL_PAUSE_VM, vmid); in vm_exit() 71 vmid = create_vm.vmid; in main() 105 ret = ioctl(hsm_fd, ACRN_IOCTL_START_VM, vmid); in main() 124 notify.vmid = vmid; in main()
|
/linux/drivers/gpu/drm/amd/include/ |
A D | kgd_kfd_interface.h | 52 uint32_t vmid; member 231 void (*program_sh_mem_settings)(struct kgd_dev *kgd, uint32_t vmid, 236 unsigned int vmid); 286 uint8_t vmid, 294 uint64_t va, uint32_t vmid); 297 uint32_t vmid, uint64_t page_table_base); 303 uint32_t vmid, uint64_t tba_addr, uint64_t tma_addr);
|
/linux/arch/riscv/include/asm/ |
A D | kvm_host.h | 53 unsigned long vmid; member 58 struct kvm_vmid vmid; member 216 unsigned long vmid); 217 void __kvm_riscv_hfence_gvma_vmid(unsigned long vmid); 234 bool kvm_riscv_stage2_vmid_ver_changed(struct kvm_vmid *vmid);
|
/linux/drivers/gpu/drm/radeon/ |
A D | radeon_trace.h | 51 TP_PROTO(unsigned vmid, int ring), 52 TP_ARGS(vmid, ring), 54 __field(u32, vmid) 59 __entry->vmid = vmid; 62 TP_printk("vmid=%u, ring=%u", __entry->vmid, __entry->ring)
|