Home
last modified time | relevance | path

Searched refs:vmid (Results 1 – 25 of 158) sorted by relevance

1234567

/drivers/virt/acrn/
Dhypercall.h76 static inline long hcall_start_vm(u64 vmid) in hcall_start_vm() argument
78 return acrn_hypercall1(HC_START_VM, vmid); in hcall_start_vm()
87 static inline long hcall_pause_vm(u64 vmid) in hcall_pause_vm() argument
89 return acrn_hypercall1(HC_PAUSE_VM, vmid); in hcall_pause_vm()
98 static inline long hcall_destroy_vm(u64 vmid) in hcall_destroy_vm() argument
100 return acrn_hypercall1(HC_DESTROY_VM, vmid); in hcall_destroy_vm()
109 static inline long hcall_reset_vm(u64 vmid) in hcall_reset_vm() argument
111 return acrn_hypercall1(HC_RESET_VM, vmid); in hcall_reset_vm()
121 static inline long hcall_set_vcpu_regs(u64 vmid, u64 regs_state) in hcall_set_vcpu_regs() argument
123 return acrn_hypercall2(HC_SET_VCPU_REGS, vmid, regs_state); in hcall_set_vcpu_regs()
[all …]
Dvm.c31 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()
91 dev_dbg(acrn_dev.this_device, "VM %u destroyed.\n", vm->vmid); in acrn_vm_destroy()
92 vm->vmid = ACRN_INVALID_VMID; in acrn_vm_destroy()
[all …]
Dhsm.c37 vm->vmid = ACRN_INVALID_VMID; in acrn_dev_open()
124 if (vm->vmid == ACRN_INVALID_VMID && cmd != ACRN_IOCTL_CREATE_VM) { in acrn_dev_ioctl()
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()
209 ret = hcall_set_vcpu_regs(vm->vmid, virt_to_phys(cpu_regs)); in acrn_dev_ioctl()
213 vm->vmid); in acrn_dev_ioctl()
[all …]
Dmm.c27 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()
257 regions_info->vmid = vm->vmid; in acrn_vm_ram_map()
285 "Failed to set regions, VM[%u]!\n", vm->vmid); in acrn_vm_ram_map()
292 __func__, vm->vmid, in acrn_vm_ram_map()
/drivers/gpu/drm/amd/display/modules/vmid/
Dvmid.c41 static void add_ptb_to_table(struct core_vmid *core_vmid, unsigned int vmid, uint64_t ptb) in add_ptb_to_table() argument
43 if (vmid < MAX_VMID) { in add_ptb_to_table()
44 core_vmid->ptb_assigned_to_vmid[vmid] = ptb; in add_ptb_to_table()
49 static void clear_entry_from_vmid_table(struct core_vmid *core_vmid, unsigned int vmid) in clear_entry_from_vmid_table() argument
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()
[all …]
/drivers/gpu/drm/amd/amdkfd/
Dcik_event_interrupt.c37 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 …]
Dkfd_int_process_v9.c97 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()
Dkfd_dbgdev.c234 unsigned int index, unsigned int vmid) in dbgdev_address_watch_set_registers() argument
258 cntl->bitfields.vmid = (uint32_t) vmid; in dbgdev_address_watch_set_registers()
303 &cntl, i, pdd->qpd.vmid); in dbgdev_address_watch_nodiq()
307 pr_debug("\t\t%20s %08x\n", "vmid is :", 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()
402 pr_debug("\t\t%20s %08x\n", "vmid is :", vmid); in dbgdev_address_watch_diq()
416 cntl.bitfields.vmid); in dbgdev_address_watch_diq()
723 reg_sq_cmd.bits.vm_id = pdd->qpd.vmid; in dbgdev_wave_control_nodiq()
[all …]
/drivers/gpu/drm/amd/display/dc/dcn20/
Ddcn20_vmid.c32 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()
/drivers/gpu/drm/amd/amdgpu/
Damdgpu_amdkfd_gfx_v9.c55 uint32_t queue, uint32_t vmid) in lock_srbm() argument
60 soc15_grbm_select(adev, mec, pipe, queue, vmid); in lock_srbm()
96 void kgd_gfx_v9_program_sh_mem_settings(struct kgd_dev *kgd, uint32_t vmid, in kgd_gfx_v9_program_sh_mem_settings() argument
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
134 WREG32(SOC15_REG_OFFSET(ATHUB, 0, mmATC_VMID0_PASID_MAPPING) + vmid, in kgd_gfx_v9_set_pasid_vmid_mapping()
140 (1U << vmid))) in kgd_gfx_v9_set_pasid_vmid_mapping()
145 1U << vmid); in kgd_gfx_v9_set_pasid_vmid_mapping()
148 WREG32(SOC15_REG_OFFSET(OSSSYS, 0, mmIH_VMID_0_LUT) + vmid, in kgd_gfx_v9_set_pasid_vmid_mapping()
151 WREG32(SOC15_REG_OFFSET(ATHUB, 0, mmATC_VMID16_PASID_MAPPING) + vmid, in kgd_gfx_v9_set_pasid_vmid_mapping()
[all …]
Dgmc_v10_0.c153 entry->src_id, entry->ring_id, entry->vmid, in gmc_v10_0_process_interrupt()
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()
223 static void gmc_v10_0_flush_vm_hub(struct amdgpu_device *adev, uint32_t vmid, in gmc_v10_0_flush_vm_hub() argument
228 u32 inv_req = hub->vmhub_funcs->get_invalidate_req(vmid, flush_type); in gmc_v10_0_flush_vm_hub()
280 tmp &= 1 << vmid; in gmc_v10_0_flush_vm_hub()
314 static void gmc_v10_0_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid, in gmc_v10_0_flush_gpu_tlb() argument
334 u32 inv_req = hub->vmhub_funcs->get_invalidate_req(vmid, flush_type); in gmc_v10_0_flush_gpu_tlb()
339 1 << vmid); in gmc_v10_0_flush_gpu_tlb()
348 gmc_v10_0_flush_vm_hub(adev, vmid, AMDGPU_MMHUB_0, 0); in gmc_v10_0_flush_gpu_tlb()
[all …]
Damdgpu_gmc.h80 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
Damdgpu_amdkfd_gfx_v10.c48 uint32_t queue, uint32_t vmid) in lock_srbm() argument
53 nv_grbm_select(adev, mec, pipe, queue, vmid); in lock_srbm()
89 static void kgd_program_sh_mem_settings(struct kgd_dev *kgd, uint32_t vmid, in kgd_program_sh_mem_settings() argument
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
121 pr_debug("pasid 0x%x vmid %d, reg value %x\n", pasid, vmid, pasid_mapping); in kgd_set_pasid_vmid_mapping()
123 pr_debug("ATHUB, reg %x\n", SOC15_REG_OFFSET(ATHUB, 0, mmATC_VMID0_PASID_MAPPING) + vmid); in kgd_set_pasid_vmid_mapping()
124 WREG32(SOC15_REG_OFFSET(ATHUB, 0, mmATC_VMID0_PASID_MAPPING) + vmid, in kgd_set_pasid_vmid_mapping()
132 (1U << vmid))) in kgd_set_pasid_vmid_mapping()
138 1U << vmid); in kgd_set_pasid_vmid_mapping()
[all …]
Damdgpu_amdkfd_gfx_v7.c75 uint32_t vmid:4; member
91 uint32_t queue, uint32_t vmid) in lock_srbm() argument
94 uint32_t value = PIPEID(pipe) | MEID(mec) | VMID(vmid) | QUEUEID(queue); in lock_srbm()
124 static void kgd_program_sh_mem_settings(struct kgd_dev *kgd, uint32_t vmid, in kgd_program_sh_mem_settings() 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
156 WREG32(mmATC_VMID0_PASID_MAPPING + vmid, pasid_mapping); in kgd_set_pasid_vmid_mapping()
158 while (!(RREG32(mmATC_VMID_PASID_MAPPING_UPDATE_STATUS) & (1U << vmid))) in kgd_set_pasid_vmid_mapping()
160 WREG32(mmATC_VMID_PASID_MAPPING_UPDATE_STATUS, 1U << vmid); in kgd_set_pasid_vmid_mapping()
163 WREG32(mmIH_VMID_0_LUT + vmid, pasid_mapping); in kgd_set_pasid_vmid_mapping()
[all …]
Damdgpu_amdkfd_gfx_v8.c48 uint32_t queue, uint32_t vmid) in lock_srbm() argument
51 uint32_t value = PIPEID(pipe) | MEID(mec) | VMID(vmid) | QUEUEID(queue); in lock_srbm()
81 static void kgd_program_sh_mem_settings(struct kgd_dev *kgd, uint32_t vmid, in kgd_program_sh_mem_settings() 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()
116 while (!(RREG32(mmATC_VMID_PASID_MAPPING_UPDATE_STATUS) & (1U << vmid))) in kgd_set_pasid_vmid_mapping()
118 WREG32(mmATC_VMID_PASID_MAPPING_UPDATE_STATUS, 1U << vmid); 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
[all …]
Damdgpu_amdkfd_gfx_v9.h25 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);
Dgmc_v9_0.c569 entry->src_id, entry->ring_id, entry->vmid, in gmc_v9_0_process_interrupt()
671 static uint32_t gmc_v9_0_get_invalidate_req(unsigned int vmid, in gmc_v9_0_get_invalidate_req() argument
677 PER_VMID_INVALIDATE_REQ, 1 << vmid); in gmc_v9_0_get_invalidate_req()
711 uint8_t vmid, uint16_t *p_pasid) in gmc_v9_0_get_atc_vmid_pasid_mapping_info() argument
716 + vmid); in gmc_v9_0_get_atc_vmid_pasid_mapping_info()
739 static void gmc_v9_0_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid, in gmc_v9_0_flush_gpu_tlb() argument
758 inv_req = gmc_v9_0_get_invalidate_req(vmid, 2); in gmc_v9_0_flush_gpu_tlb()
759 inv_req2 = gmc_v9_0_get_invalidate_req(vmid, flush_type); in gmc_v9_0_flush_gpu_tlb()
761 inv_req = gmc_v9_0_get_invalidate_req(vmid, flush_type); in gmc_v9_0_flush_gpu_tlb()
775 1 << vmid); in gmc_v9_0_flush_gpu_tlb()
[all …]
Damdgpu_trace.h84 __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 …]
Dgmc_v7_0.c438 int vmid; in gmc_v7_0_flush_gpu_tlb_pasid() local
444 for (vmid = 1; vmid < 16; vmid++) { in gmc_v7_0_flush_gpu_tlb_pasid()
446 tmp = RREG32(mmATC_VMID0_PASID_MAPPING + vmid); in gmc_v7_0_flush_gpu_tlb_pasid()
449 WREG32(mmVM_INVALIDATE_REQUEST, 1 << vmid); in gmc_v7_0_flush_gpu_tlb_pasid()
475 static void gmc_v7_0_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid, in gmc_v7_0_flush_gpu_tlb() argument
479 WREG32(mmVM_INVALIDATE_REQUEST, 1 << vmid); in gmc_v7_0_flush_gpu_tlb()
483 unsigned vmid, uint64_t pd_addr) in gmc_v7_0_emit_flush_gpu_tlb() argument
487 if (vmid < 8) in gmc_v7_0_emit_flush_gpu_tlb()
488 reg = mmVM_CONTEXT0_PAGE_TABLE_BASE_ADDR + vmid; in gmc_v7_0_emit_flush_gpu_tlb()
490 reg = mmVM_CONTEXT8_PAGE_TABLE_BASE_ADDR + vmid - 8; in gmc_v7_0_emit_flush_gpu_tlb()
[all …]
Damdgpu_amdkfd_gfx_v10_3.c47 uint32_t queue, uint32_t vmid) in lock_srbm() argument
52 nv_grbm_select(adev, mec, pipe, queue, vmid); in lock_srbm()
88 static void program_sh_mem_settings_v10_3(struct kgd_dev *kgd, uint32_t vmid, in program_sh_mem_settings_v10_3() argument
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()
116 WREG32(SOC15_REG_OFFSET(OSSSYS, 0, mmIH_VMID_0_LUT) + vmid, value); in set_pasid_vmid_mapping_v10_3()
655 static void set_vm_context_page_table_base_v10_3(struct kgd_dev *kgd, uint32_t vmid, in set_vm_context_page_table_base_v10_3() argument
661 adev->gfxhub.funcs->setup_vm_pt_regs(adev, vmid, page_table_base); in set_vm_context_page_table_base_v10_3()
665 uint32_t vmid, uint64_t tba_addr, uint64_t tma_addr) in program_trap_handler_settings_v10_3() argument
[all …]
Dgmc_v8_0.c636 int vmid; in gmc_v8_0_flush_gpu_tlb_pasid() local
642 for (vmid = 1; vmid < 16; vmid++) { in gmc_v8_0_flush_gpu_tlb_pasid()
644 tmp = RREG32(mmATC_VMID0_PASID_MAPPING + vmid); in gmc_v8_0_flush_gpu_tlb_pasid()
647 WREG32(mmVM_INVALIDATE_REQUEST, 1 << vmid); in gmc_v8_0_flush_gpu_tlb_pasid()
674 static void gmc_v8_0_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid, in gmc_v8_0_flush_gpu_tlb() argument
678 WREG32(mmVM_INVALIDATE_REQUEST, 1 << vmid); in gmc_v8_0_flush_gpu_tlb()
682 unsigned vmid, uint64_t pd_addr) in gmc_v8_0_emit_flush_gpu_tlb() argument
686 if (vmid < 8) in gmc_v8_0_emit_flush_gpu_tlb()
687 reg = mmVM_CONTEXT0_PAGE_TABLE_BASE_ADDR + vmid; in gmc_v8_0_emit_flush_gpu_tlb()
689 reg = mmVM_CONTEXT8_PAGE_TABLE_BASE_ADDR + vmid - 8; in gmc_v8_0_emit_flush_gpu_tlb()
[all …]
Djpeg_v1_0.c299 unsigned vmid = AMDGPU_JOB_GET_VMID(job); in jpeg_v1_0_decode_ring_emit_ib() local
303 amdgpu_ring_write(ring, (vmid | (vmid << 4))); in jpeg_v1_0_decode_ring_emit_ib()
307 amdgpu_ring_write(ring, (vmid | (vmid << 4))); in jpeg_v1_0_decode_ring_emit_ib()
377 unsigned vmid, uint64_t pd_addr) in jpeg_v1_0_decode_ring_emit_vm_flush() argument
382 pd_addr = amdgpu_gmc_emit_flush_gpu_tlb(ring, vmid, pd_addr); in jpeg_v1_0_decode_ring_emit_vm_flush()
385 data0 = hub->ctx0_ptb_addr_lo32 + vmid * hub->ctx_addr_distance; in jpeg_v1_0_decode_ring_emit_vm_flush()
/drivers/gpu/drm/amd/include/
Dkgd_kfd_interface.h52 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);
/drivers/gpu/drm/radeon/
Dradeon_trace.h51 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)
/drivers/soc/qcom/
Drmtfs_mem.c178 u32 vmid; in qcom_rmtfs_mem_probe() local
229 ret = of_property_read_u32(node, "qcom,vmid", &vmid); in qcom_rmtfs_mem_probe()
239 perms[0].vmid = QCOM_SCM_VMID_HLOS; in qcom_rmtfs_mem_probe()
241 perms[1].vmid = vmid; in qcom_rmtfs_mem_probe()
271 perm.vmid = QCOM_SCM_VMID_HLOS; in qcom_rmtfs_mem_remove()

1234567