Lines Matching defs:vcpu_id

519  * @vcpu_id:		vCPU id part of the provided core.
528 int core_id, u32 vcpu_id)
532 if (core_id < 0 && vcpu_id == 0) {
541 "CPU %d is not in NE CPU pool\n", vcpu_id);
566 * @vcpu_id: vCPU to get from the NE CPU pool.
573 static int ne_get_cpu_from_cpu_pool(struct ne_enclave *ne_enclave, u32 *vcpu_id)
588 *vcpu_id = cpu;
601 rc = ne_set_enclave_threads_per_core(ne_enclave, core_id, *vcpu_id);
605 *vcpu_id = cpumask_any(ne_enclave->threads_per_core[core_id]);
618 * @vcpu_id: Provided vCPU id to get its associated core id.
626 static int ne_get_vcpu_core_from_cpu_pool(u32 vcpu_id)
632 if (cpumask_test_cpu(vcpu_id, ne_cpu_pool.avail_threads_per_core[i])) {
645 * @vcpu_id: ID of the vCPU to check if available in the NE CPU pool.
652 static int ne_check_cpu_in_cpu_pool(struct ne_enclave *ne_enclave, u32 vcpu_id)
658 if (ne_donated_cpu(ne_enclave, vcpu_id)) {
660 "CPU %d already used\n", vcpu_id);
670 if (cpumask_test_cpu(vcpu_id, ne_enclave->threads_per_core[i]))
680 core_id = ne_get_vcpu_core_from_cpu_pool(vcpu_id);
682 rc = ne_set_enclave_threads_per_core(ne_enclave, core_id, vcpu_id);
698 * @vcpu_id: ID of the CPU to be associated with the given slot,
706 static int ne_add_vcpu_ioctl(struct ne_enclave *ne_enclave, u32 vcpu_id)
717 slot_add_vcpu_req.vcpu_id = vcpu_id;
729 cpumask_set_cpu(vcpu_id, ne_enclave->vcpu_ids);
1152 u32 vcpu_id = 0;
1154 if (copy_from_user(&vcpu_id, (void __user *)arg, sizeof(vcpu_id)))
1168 if (vcpu_id >= (ne_enclave->nr_parent_vm_cores *
1178 if (!vcpu_id) {
1180 rc = ne_get_cpu_from_cpu_pool(ne_enclave, &vcpu_id);
1192 rc = ne_check_cpu_in_cpu_pool(ne_enclave, vcpu_id);
1196 vcpu_id, rc);
1204 rc = ne_add_vcpu_ioctl(ne_enclave, vcpu_id);
1213 if (copy_to_user((void __user *)arg, &vcpu_id, sizeof(vcpu_id)))