/openbmc/linux/arch/arm64/kvm/ |
H A D | vmid.c | 32 #define vmid2idx(vmid) ((vmid) & ~VMID_MASK) argument 42 #define vmid_gen_match(vmid) \ argument 48 u64 vmid; in flush_context() local 56 if (vmid == 0) in flush_context() 98 if (vmid != 0) { in new_vmid() 125 __set_bit(vmid, vmid_map); in new_vmid() 126 cur_idx = vmid; in new_vmid() 127 vmid = idx2vmid(vmid) | generation; in new_vmid() 129 return vmid; in new_vmid() 141 u64 vmid, old_active_vmid; in kvm_arm_vmid_update() local [all …]
|
/openbmc/linux/drivers/virt/acrn/ |
H 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 …]
|
H 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 …]
|
H A D | hsm.c | 37 vm->vmid = ACRN_INVALID_VMID; in acrn_dev_open() 160 ret = hcall_start_vm(vm->vmid); in acrn_dev_ioctl() 163 "Failed to start VM %u!\n", vm->vmid); in acrn_dev_ioctl() 166 ret = hcall_pause_vm(vm->vmid); in acrn_dev_ioctl() 169 "Failed to pause VM %u!\n", vm->vmid); in acrn_dev_ioctl() 172 ret = hcall_reset_vm(vm->vmid); in acrn_dev_ioctl() 175 "Failed to restart VM %u!\n", vm->vmid); in acrn_dev_ioctl() 215 vm->vmid); in acrn_dev_ioctl() 286 ret = hcall_create_vdev(vm->vmid, virt_to_phys(vdev)); in acrn_dev_ioctl() 328 ret = hcall_set_irqline(vm->vmid, ioctl_param); in acrn_dev_ioctl() [all …]
|
/openbmc/linux/arch/riscv/kvm/ |
H A D | tlb.c | 160 unsigned long vmid; in kvm_riscv_local_tlb_sanitize() local 177 vmid = READ_ONCE(vcpu->kvm->arch.vmid.vmid); in kvm_riscv_local_tlb_sanitize() 189 struct kvm_vmid *vmid; in kvm_riscv_hfence_gvma_vmid_all_process() local 191 vmid = &vcpu->kvm->arch.vmid; in kvm_riscv_hfence_gvma_vmid_all_process() 192 kvm_riscv_local_hfence_gvma_vmid_all(READ_ONCE(vmid->vmid)); in kvm_riscv_hfence_gvma_vmid_all_process() 197 struct kvm_vmid *vmid; in kvm_riscv_hfence_vvma_all_process() local 199 vmid = &vcpu->kvm->arch.vmid; in kvm_riscv_hfence_vvma_all_process() 200 kvm_riscv_local_hfence_vvma_all(READ_ONCE(vmid->vmid)); in kvm_riscv_hfence_vvma_all_process() 263 READ_ONCE(v->vmid), in kvm_riscv_hfence_process() 269 READ_ONCE(v->vmid), d.asid, in kvm_riscv_hfence_process() [all …]
|
H A D | vmid.c | 51 kvm->arch.vmid.vmid_version = 0; in kvm_riscv_gstage_vmid_init() 52 kvm->arch.vmid.vmid = 0; in kvm_riscv_gstage_vmid_init() 57 bool kvm_riscv_gstage_vmid_ver_changed(struct kvm_vmid *vmid) in kvm_riscv_gstage_vmid_ver_changed() argument 62 return unlikely(READ_ONCE(vmid->vmid_version) != in kvm_riscv_gstage_vmid_ver_changed() 75 struct kvm_vmid *vmid = &vcpu->kvm->arch.vmid; in kvm_riscv_gstage_vmid_update() local 77 if (!kvm_riscv_gstage_vmid_ver_changed(vmid)) in kvm_riscv_gstage_vmid_update() 86 if (!kvm_riscv_gstage_vmid_ver_changed(vmid)) { in kvm_riscv_gstage_vmid_update() 113 vmid->vmid = vmid_next; in kvm_riscv_gstage_vmid_update() 117 WRITE_ONCE(vmid->vmid_version, READ_ONCE(vmid_version)); in kvm_riscv_gstage_vmid_update()
|
/openbmc/linux/drivers/gpu/drm/amd/display/modules/vmid/ |
H 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 …]
|
/openbmc/linux/drivers/gpu/drm/amd/amdkfd/ |
H 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->adev); in cik_event_interrupt_isr() 54 ret = f2g->get_atc_vmid_pasid_mapping_info(dev->adev, 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 …]
|
H A D | kfd_int_process_v9.c | 218 uint16_t source_id, client_id, pasid, vmid; in event_interrupt_isr_v9() local 225 vmid = SOC15_VMID_FROM_IH_ENTRY(ih_ring_entry); in event_interrupt_isr_v9() 227 (vmid < dev->vm_info.first_vmid_kfd || in event_interrupt_isr_v9() 228 vmid > dev->vm_info.last_vmid_kfd)) in event_interrupt_isr_v9() 264 pasid = dev->dqm->vmid_pasid[vmid]; in event_interrupt_isr_v9() 272 client_id, source_id, vmid, pasid); in event_interrupt_isr_v9() 313 uint16_t source_id, client_id, pasid, vmid; in event_interrupt_wq_v9() local 320 vmid = SOC15_VMID_FROM_IH_ENTRY(ih_ring_entry); in event_interrupt_wq_v9() 422 info.vmid = vmid; in event_interrupt_wq_v9() 455 uint16_t node_id, vmid; in event_interrupt_isr_v9_4_3() local [all …]
|
/openbmc/linux/drivers/gpu/drm/amd/display/dc/dcn20/ |
H 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()
|
/openbmc/linux/drivers/gpu/drm/amd/amdgpu/ |
H A D | amdgpu_amdkfd_gfx_v9.h | 23 void kgd_gfx_v9_program_sh_mem_settings(struct amdgpu_device *adev, uint32_t vmid, 28 unsigned int vmid, uint32_t inst); 52 uint8_t vmid, uint16_t *p_pasid); 54 uint32_t vmid, uint64_t page_table_base); 58 uint32_t vmid, uint64_t tba_addr, uint64_t tma_addr, 66 uint32_t vmid, 70 uint32_t vmid); 73 uint32_t vmid); 79 uint32_t vmid); 81 uint32_t vmid,
|
H A D | amdgpu_amdkfd_gfx_v9.c | 126 (1U << vmid))) in kgd_gfx_v9_set_pasid_vmid_mapping() 131 1U << vmid); in kgd_gfx_v9_set_pasid_vmid_mapping() 143 (1U << (vmid + 16)))) in kgd_gfx_v9_set_pasid_vmid_mapping() 623 + vmid); in kgd_gfx_v9_get_atc_vmid_pasid_mapping_info() 674 uint32_t vmid, in kgd_gfx_v9_set_wave_launch_stall() argument 705 uint32_t vmid) in kgd_gfx_v9_enable_debug_trap() argument 728 uint32_t vmid) in kgd_gfx_v9_disable_debug_trap() argument 797 uint32_t vmid) in kgd_gfx_v9_set_wave_launch_mode() argument 920 vmid); in kgd_gfx_v9_set_vm_context_page_table_base() 966 *vmid = 0xFF; in get_wave_count() [all …]
|
H A D | amdgpu_amdkfd_gfx_v10.c | 45 uint32_t queue, uint32_t vmid) in lock_srbm() argument 86 lock_srbm(adev, 0, 0, 0, vmid); in kgd_program_sh_mem_settings() 119 (1U << vmid))) in kgd_set_pasid_vmid_mapping() 125 1U << vmid); in kgd_set_pasid_vmid_mapping() 671 + vmid); in get_atc_vmid_pasid_mapping_info() 706 vmid); in set_vm_context_page_table_base() 755 uint32_t vmid) in kgd_gfx_v10_enable_debug_trap() argument 767 VMID_SEL, 1 << vmid); in kgd_gfx_v10_enable_debug_trap() 792 uint32_t vmid) in kgd_gfx_v10_disable_debug_trap() argument 826 uint32_t vmid, in kgd_gfx_v10_set_wave_launch_trap_override() argument [all …]
|
H A D | gmc_v11_0.c | 131 entry->src_id, entry->ring_id, entry->vmid, in gmc_v11_0_process_interrupt() 180 uint8_t vmid, uint16_t *p_pasid) in gmc_v11_0_get_vmid_pasid_mapping_info() argument 238 tmp &= 1 << vmid; in gmc_v11_0_flush_vm_hub() 306 1 << vmid); in gmc_v11_0_flush_gpu_tlb() 330 int vmid, i; in gmc_v11_0_flush_gpu_tlb_pasid() local 362 for (vmid = 1; vmid < 16; vmid++) { in gmc_v11_0_flush_gpu_tlb_pasid() 369 gmc_v11_0_flush_gpu_tlb(adev, vmid, in gmc_v11_0_flush_gpu_tlb_pasid() 372 gmc_v11_0_flush_gpu_tlb(adev, vmid, in gmc_v11_0_flush_gpu_tlb_pasid() 404 (hub->ctx_addr_distance * vmid), in gmc_v11_0_emit_flush_gpu_tlb() 408 (hub->ctx_addr_distance * vmid), in gmc_v11_0_emit_flush_gpu_tlb() [all …]
|
H A D | amdgpu_amdkfd_gfx_v7.c | 49 uint32_t queue, uint32_t vmid) in lock_srbm() argument 83 lock_srbm(adev, 0, 0, 0, vmid); in kgd_program_sh_mem_settings() 94 unsigned int vmid, uint32_t inst) in kgd_set_pasid_vmid_mapping() argument 105 WREG32(mmATC_VMID0_PASID_MAPPING + vmid, pasid_mapping); in kgd_set_pasid_vmid_mapping() 112 WREG32(mmIH_VMID_0_LUT + vmid, pasid_mapping); in kgd_set_pasid_vmid_mapping() 521 uint8_t vmid, uint16_t *p_pasid) in get_atc_vmid_pasid_mapping_info() argument 525 value = RREG32(mmATC_VMID0_PASID_MAPPING + vmid); in get_atc_vmid_pasid_mapping_info() 532 uint64_t va, uint32_t vmid) in set_scratch_backing_va() argument 534 lock_srbm(adev, 0, 0, 0, vmid); in set_scratch_backing_va() 540 uint32_t vmid, uint64_t page_table_base) in set_vm_context_page_table_base() argument [all …]
|
H A D | vcn_sw_ring.c | 47 uint32_t vmid = AMDGPU_JOB_GET_VMID(job); in vcn_dec_sw_ring_emit_ib() local 50 amdgpu_ring_write(ring, vmid); in vcn_dec_sw_ring_emit_ib() 66 uint32_t vmid, uint64_t pd_addr) in vcn_dec_sw_ring_emit_vm_flush() argument 71 pd_addr = amdgpu_gmc_emit_flush_gpu_tlb(ring, vmid, pd_addr); in vcn_dec_sw_ring_emit_vm_flush() 74 data0 = hub->ctx0_ptb_addr_lo32 + vmid * hub->ctx_addr_distance; in vcn_dec_sw_ring_emit_vm_flush()
|
H A D | amdgpu_amdkfd_gfx_v10.h | 25 uint32_t vmid); 28 uint32_t vmid); 33 uint32_t vmid, 41 uint32_t vmid);
|
H A D | amdgpu_amdkfd_gfx_v8.c | 43 uint32_t queue, uint32_t vmid) in lock_srbm() argument 77 lock_srbm(adev, 0, 0, 0, vmid); in kgd_program_sh_mem_settings() 88 unsigned int vmid, uint32_t inst) in kgd_set_pasid_vmid_mapping() argument 100 WREG32(mmATC_VMID0_PASID_MAPPING + vmid, pasid_mapping); in kgd_set_pasid_vmid_mapping() 107 WREG32(mmIH_VMID_0_LUT + vmid, pasid_mapping); in kgd_set_pasid_vmid_mapping() 532 uint8_t vmid, uint16_t *p_pasid) in get_atc_vmid_pasid_mapping_info() argument 536 value = RREG32(mmATC_VMID0_PASID_MAPPING + vmid); in get_atc_vmid_pasid_mapping_info() 567 uint64_t va, uint32_t vmid) in set_scratch_backing_va() argument 569 lock_srbm(adev, 0, 0, 0, vmid); in set_scratch_backing_va() 575 uint32_t vmid, uint64_t page_table_base) in set_vm_context_page_table_base() argument [all …]
|
/openbmc/linux/drivers/gpu/drm/amd/include/ |
H A D | kgd_kfd_interface.h | 51 uint32_t vmid; member 231 void (*program_sh_mem_settings)(struct amdgpu_device *adev, uint32_t vmid, 237 unsigned int vmid, uint32_t inst); 280 uint8_t vmid, 288 uint64_t va, uint32_t vmid); 291 uint32_t vmid, uint64_t page_table_base); 296 uint32_t vmid); 299 uint32_t vmid); 304 uint32_t vmid, 312 uint32_t vmid); [all …]
|
/openbmc/qemu/hw/arm/ |
H A D | smmu-common.c | 57 (k1->vmid == k2->vmid); in smmu_iotlb_key_equal() 63 SMMUIOTLBKey key = {.asid = asid, .vmid = vmid, .iova = iova, in smmu_get_iotlb_key() 175 int vmid = *(int *)user_data; in smmu_hash_remove_by_vmid() local 178 return SMMU_IOTLB_VMID(*iotlb_key) == vmid; in smmu_hash_remove_by_vmid() 184 int vmid = *(int *)user_data; in smmu_hash_remove_by_vmid_s1() local 202 if (info->vmid >= 0 && info->vmid != SMMU_IOTLB_VMID(iotlb_key)) { in smmu_hash_remove_by_asid_vmid_iova() 248 .vmid = vmid, in smmu_iotlb_inv_iova() 276 .vmid = vmid, in smmu_iotlb_inv_ipa() 288 .vmid = vmid, in smmu_iotlb_inv_asid_vmid() 297 trace_smmu_iotlb_inv_vmid(vmid); in smmu_iotlb_inv_vmid() [all …]
|
H A D | trace-events | 14 smmu_iotlb_inv_asid_vmid(int asid, int vmid) "IOTLB invalidate asid=%d vmid=%d" 15 smmu_iotlb_inv_vmid(int vmid) "IOTLB invalidate vmid=%d" 16 smmu_iotlb_inv_vmid_s1(int vmid) "IOTLB invalidate vmid=%d" 19 …iotlb_lookup_hit(int asid, int vmid, uint64_t addr, uint32_t hit, uint32_t miss, uint32_t p) "IOTL… 20 …tlb_lookup_miss(int asid, int vmid, uint64_t addr, uint32_t hit, uint32_t miss, uint32_t p) "IOTLB… 21 smmu_iotlb_insert(int asid, int vmid, uint64_t addr, uint8_t tg, uint8_t level) "IOTLB ++ asid=%d v… 50 smmuv3_range_inval(int vmid, int asid, uint64_t addr, uint8_t tg, uint64_t num_pages, uint8_t ttl, … 51 smmuv3_cmdq_tlbi_nh(int vmid) "vmid=%d" 54 smmuv3_cmdq_tlbi_s12_vmid(int vmid) "vmid=%d" 58 …const char *name, int asid, int vmid, uint64_t iova, uint8_t tg, uint64_t num_pages, int stage) "i…
|
/openbmc/linux/drivers/scsi/lpfc/ |
H A D | lpfc_vmid.c | 81 int lpfc_vmid_hash_fn(const char *vmid, int len) in lpfc_vmid_hash_fn() argument 89 c = *vmid++; in lpfc_vmid_hash_fn() 130 struct lpfc_vmid *vmid) in lpfc_vmid_assign_cs_ctl() argument 136 vmid->un.cs_ctl_vmid = lpfc_vmid_get_cs_ctl(vport); in lpfc_vmid_assign_cs_ctl() 138 hash = lpfc_vmid_hash_fn(vmid->host_vmid, vmid->vmid_len); in lpfc_vmid_assign_cs_ctl() 141 vmid->host_vmid); in lpfc_vmid_assign_cs_ctl() 143 vmid->un.cs_ctl_vmid = pvmid->un.cs_ctl_vmid; in lpfc_vmid_assign_cs_ctl() 145 vmid->un.cs_ctl_vmid = lpfc_vmid_get_cs_ctl(vport); in lpfc_vmid_assign_cs_ctl() 215 vmp = vport->vmid + i; in lpfc_vmid_get_appid() 309 vmp = &vport->vmid[i]; in lpfc_reinit_vmid()
|
/openbmc/linux/samples/acrn/ |
H A D | vm-sample.c | 30 __u16 vmid; variable 40 ioctl(hsm_fd, ACRN_IOCTL_PAUSE_VM, vmid); in vm_exit() 67 vmid = create_vm.vmid; in main() 101 ret = ioctl(hsm_fd, ACRN_IOCTL_START_VM, vmid); in main() 120 notify.vmid = vmid; in main()
|
/openbmc/qemu/include/hw/arm/ |
H A D | smmu-common.h | 92 int vmid; /* Virtual Machine ID (S2VMID) */ member 141 int vmid; member 213 SMMUIOTLBKey smmu_get_iotlb_key(int asid, int vmid, uint64_t iova, 216 void smmu_iotlb_inv_asid_vmid(SMMUState *s, int asid, int vmid); 217 void smmu_iotlb_inv_vmid(SMMUState *s, int vmid); 218 void smmu_iotlb_inv_vmid_s1(SMMUState *s, int vmid); 219 void smmu_iotlb_inv_iova(SMMUState *s, int asid, int vmid, dma_addr_t iova, 221 void smmu_iotlb_inv_ipa(SMMUState *s, int vmid, dma_addr_t ipa, uint8_t tg,
|
/openbmc/linux/arch/riscv/include/asm/ |
H A D | kvm_host.h | 88 unsigned long vmid; member 93 struct kvm_vmid vmid; member 256 void kvm_riscv_local_hfence_gvma_vmid_gpa(unsigned long vmid, 259 void kvm_riscv_local_hfence_gvma_vmid_all(unsigned long vmid); 263 void kvm_riscv_local_hfence_vvma_asid_gva(unsigned long vmid, 268 void kvm_riscv_local_hfence_vvma_asid_all(unsigned long vmid, 270 void kvm_riscv_local_hfence_vvma_gva(unsigned long vmid, 273 void kvm_riscv_local_hfence_vvma_all(unsigned long vmid); 322 bool kvm_riscv_gstage_vmid_ver_changed(struct kvm_vmid *vmid);
|