Lines Matching refs:domid
19 static int libxl__set_vcpuaffinity(libxl_ctx *ctx, uint32_t domid, in libxl__set_vcpuaffinity() argument
58 if (xc_vcpu_setaffinity(ctx->xch, domid, vcpuid, in libxl__set_vcpuaffinity()
62 LOGED(ERROR, domid, "Setting vcpu affinity"); in libxl__set_vcpuaffinity()
74 LOGD(DEBUG, domid, "New hard affinity for vcpu %d has unreachable cpus", vcpuid); in libxl__set_vcpuaffinity()
81 LOGD(DEBUG, domid, "New soft affinity for vcpu %d has unreachable cpus", in libxl__set_vcpuaffinity()
84 LOGD(WARN, domid, "All cpus in soft affinity of vcpu %d are unreachable." in libxl__set_vcpuaffinity()
97 int libxl_set_vcpuaffinity(libxl_ctx *ctx, uint32_t domid, uint32_t vcpuid, in libxl_set_vcpuaffinity() argument
101 return libxl__set_vcpuaffinity(ctx, domid, vcpuid, cpumap_hard, in libxl_set_vcpuaffinity()
105 int libxl_set_vcpuaffinity_force(libxl_ctx *ctx, uint32_t domid, in libxl_set_vcpuaffinity_force() argument
110 return libxl__set_vcpuaffinity(ctx, domid, vcpuid, cpumap_hard, in libxl_set_vcpuaffinity_force()
114 int libxl_set_vcpuaffinity_all(libxl_ctx *ctx, uint32_t domid, in libxl_set_vcpuaffinity_all() argument
123 if (libxl_set_vcpuaffinity(ctx, domid, i, cpumap_hard, cpumap_soft)) { in libxl_set_vcpuaffinity_all()
124 LOGD(WARN, domid, "Failed to set affinity for %d", i); in libxl_set_vcpuaffinity_all()
133 int libxl_domain_set_nodeaffinity(libxl_ctx *ctx, uint32_t domid, in libxl_domain_set_nodeaffinity() argument
137 if (xc_domain_node_setaffinity(ctx->xch, domid, nodemap->map)) { in libxl_domain_set_nodeaffinity()
138 LOGED(ERROR, domid, "Setting node affinity"); in libxl_domain_set_nodeaffinity()
146 int libxl_domain_get_nodeaffinity(libxl_ctx *ctx, uint32_t domid, in libxl_domain_get_nodeaffinity() argument
150 if (xc_domain_node_getaffinity(ctx->xch, domid, nodemap->map)) { in libxl_domain_get_nodeaffinity()
151 LOGED(ERROR, domid, "Getting node affinity"); in libxl_domain_get_nodeaffinity()
173 static int sched_arinc653_domain_set(libxl__gc *gc, uint32_t domid, in sched_arinc653_domain_set() argument
181 static int sched_null_domain_set(libxl__gc *gc, uint32_t domid, in sched_null_domain_set() argument
188 static int sched_null_domain_get(libxl__gc *gc, uint32_t domid, in sched_null_domain_get() argument
195 static int sched_credit_domain_get(libxl__gc *gc, uint32_t domid, in sched_credit_domain_get() argument
201 rc = xc_sched_credit_domain_get(CTX->xch, domid, &sdom); in sched_credit_domain_get()
203 LOGED(ERROR, domid, "Getting domain sched credit"); in sched_credit_domain_get()
215 static int sched_credit_domain_set(libxl__gc *gc, uint32_t domid, in sched_credit_domain_set() argument
222 rc = xc_domain_getinfolist(CTX->xch, domid, 1, &domaininfo); in sched_credit_domain_set()
224 LOGED(ERROR, domid, "Getting domain info list"); in sched_credit_domain_set()
227 if (rc != 1 || domaininfo.domain != domid) in sched_credit_domain_set()
230 rc = xc_sched_credit_domain_get(CTX->xch, domid, &sdom); in sched_credit_domain_set()
232 LOGED(ERROR, domid, "Getting domain sched credit"); in sched_credit_domain_set()
238 LOGD(ERROR, domid, "Cpu weight out of range, " in sched_credit_domain_set()
248 LOGD(ERROR, domid, "Cpu cap out of range, " in sched_credit_domain_set()
256 rc = xc_sched_credit_domain_set(CTX->xch, domid, &sdom); in sched_credit_domain_set()
258 LOGED(ERROR, domid, "Setting domain sched credit"); in sched_credit_domain_set()
393 static int sched_credit2_domain_get(libxl__gc *gc, uint32_t domid, in sched_credit2_domain_get() argument
399 rc = xc_sched_credit2_domain_get(CTX->xch, domid, &sdom); in sched_credit2_domain_get()
401 LOGED(ERROR, domid, "Getting domain sched credit2"); in sched_credit2_domain_get()
413 static int sched_credit2_domain_set(libxl__gc *gc, uint32_t domid, in sched_credit2_domain_set() argument
420 rc = xc_domain_getinfolist(CTX->xch, domid, 1, &info); in sched_credit2_domain_set()
422 LOGED(ERROR, domid, "Getting domain info"); in sched_credit2_domain_set()
425 if (rc != 1 || info.domain != domid) in sched_credit2_domain_set()
428 rc = xc_sched_credit2_domain_get(CTX->xch, domid, &sdom); in sched_credit2_domain_set()
430 LOGED(ERROR, domid, "Getting domain sched credit2"); in sched_credit2_domain_set()
436 LOGD(ERROR, domid, "Cpu weight out of range, " in sched_credit2_domain_set()
446 LOGD(ERROR, domid, "Cpu cap out of range, " in sched_credit2_domain_set()
454 rc = xc_sched_credit2_domain_set(CTX->xch, domid, &sdom); in sched_credit2_domain_set()
456 LOGED(ERROR, domid, "Setting domain sched credit2"); in sched_credit2_domain_set()
491 static int sched_rtds_vcpu_get(libxl__gc *gc, uint32_t domid, in sched_rtds_vcpu_get() argument
499 r = xc_domain_getinfo(CTX->xch, domid, 1, &info); in sched_rtds_vcpu_get()
501 LOGED(ERROR, domid, "Getting domain info"); in sched_rtds_vcpu_get()
515 LOGD(ERROR, domid, "VCPU index is out of range, " in sched_rtds_vcpu_get()
525 r = xc_sched_rtds_vcpu_get(CTX->xch, domid, vcpus, num_vcpus); in sched_rtds_vcpu_get()
527 LOGED(ERROR, domid, "Getting vcpu sched rtds"); in sched_rtds_vcpu_get()
545 static int sched_rtds_vcpu_get_all(libxl__gc *gc, uint32_t domid, in sched_rtds_vcpu_get_all() argument
553 r = xc_domain_getinfo(CTX->xch, domid, 1, &info); in sched_rtds_vcpu_get_all()
555 LOGED(ERROR, domid, "Getting domain info"); in sched_rtds_vcpu_get_all()
570 r = xc_sched_rtds_vcpu_get(CTX->xch, domid, vcpus, num_vcpus); in sched_rtds_vcpu_get_all()
572 LOGED(ERROR, domid, "Getting vcpu sched rtds"); in sched_rtds_vcpu_get_all()
594 static int sched_rtds_vcpu_set(libxl__gc *gc, uint32_t domid, in sched_rtds_vcpu_set() argument
603 r = xc_domain_getinfo(CTX->xch, domid, 1, &info); in sched_rtds_vcpu_set()
605 LOGED(ERROR, domid, "Getting domain info"); in sched_rtds_vcpu_set()
618 LOGD(ERROR, domid, "Invalid VCPU %d: valid range is [0, %d]", in sched_rtds_vcpu_set()
641 r = xc_sched_rtds_vcpu_set(CTX->xch, domid, in sched_rtds_vcpu_set()
644 LOGED(ERROR, domid, "Setting vcpu sched rtds"); in sched_rtds_vcpu_set()
654 static int sched_rtds_vcpu_set_all(libxl__gc *gc, uint32_t domid, in sched_rtds_vcpu_set_all() argument
664 r = xc_domain_getinfo(CTX->xch, domid, 1, &info); in sched_rtds_vcpu_set_all()
666 LOGED(ERROR, domid, "Getting domain info"); in sched_rtds_vcpu_set_all()
693 r = xc_sched_rtds_vcpu_set(CTX->xch, domid, in sched_rtds_vcpu_set_all()
696 LOGED(ERROR, domid, "Setting vcpu sched rtds"); in sched_rtds_vcpu_set_all()
705 static int sched_rtds_domain_get(libxl__gc *gc, uint32_t domid, in sched_rtds_domain_get() argument
711 rc = xc_sched_rtds_domain_get(CTX->xch, domid, &sdom); in sched_rtds_domain_get()
713 LOGED(ERROR, domid, "Getting domain sched rtds"); in sched_rtds_domain_get()
726 static int sched_rtds_domain_set(libxl__gc *gc, uint32_t domid, in sched_rtds_domain_set() argument
732 rc = xc_sched_rtds_domain_get(CTX->xch, domid, &sdom); in sched_rtds_domain_set()
734 LOGED(ERROR, domid, "Getting domain sched rtds"); in sched_rtds_domain_set()
749 rc = xc_sched_rtds_domain_set(CTX->xch, domid, &sdom); in sched_rtds_domain_set()
751 LOGED(ERROR, domid, "Setting domain sched rtds"); in sched_rtds_domain_set()
758 int libxl_domain_sched_params_set(libxl_ctx *ctx, uint32_t domid, in libxl_domain_sched_params_set() argument
766 sched = libxl__domain_scheduler(gc, domid); in libxl_domain_sched_params_set()
770 LOGD(ERROR, domid, "SEDF scheduler no longer available"); in libxl_domain_sched_params_set()
774 ret=sched_credit_domain_set(gc, domid, scinfo); in libxl_domain_sched_params_set()
777 ret=sched_credit2_domain_set(gc, domid, scinfo); in libxl_domain_sched_params_set()
780 ret=sched_arinc653_domain_set(gc, domid, scinfo); in libxl_domain_sched_params_set()
783 ret=sched_rtds_domain_set(gc, domid, scinfo); in libxl_domain_sched_params_set()
786 ret=sched_null_domain_set(gc, domid, scinfo); in libxl_domain_sched_params_set()
789 LOGD(ERROR, domid, "Unknown scheduler"); in libxl_domain_sched_params_set()
798 int libxl_vcpu_sched_params_set(libxl_ctx *ctx, uint32_t domid, in libxl_vcpu_sched_params_set() argument
806 sched = libxl__domain_scheduler(gc, domid); in libxl_vcpu_sched_params_set()
810 LOGD(ERROR, domid, "SEDF scheduler no longer available"); in libxl_vcpu_sched_params_set()
817 LOGD(ERROR, domid, "per-VCPU parameter setting not supported for this scheduler"); in libxl_vcpu_sched_params_set()
821 rc = sched_rtds_vcpu_set(gc, domid, scinfo); in libxl_vcpu_sched_params_set()
824 LOGD(ERROR, domid, "Unknown scheduler"); in libxl_vcpu_sched_params_set()
833 int libxl_vcpu_sched_params_set_all(libxl_ctx *ctx, uint32_t domid, in libxl_vcpu_sched_params_set_all() argument
841 sched = libxl__domain_scheduler(gc, domid); in libxl_vcpu_sched_params_set_all()
845 LOGD(ERROR, domid, "SEDF scheduler no longer available"); in libxl_vcpu_sched_params_set_all()
852 LOGD(ERROR, domid, "per-VCPU parameter setting not supported for this scheduler"); in libxl_vcpu_sched_params_set_all()
856 rc = sched_rtds_vcpu_set_all(gc, domid, scinfo); in libxl_vcpu_sched_params_set_all()
859 LOGD(ERROR, domid, "Unknown scheduler"); in libxl_vcpu_sched_params_set_all()
868 int libxl_domain_sched_params_get(libxl_ctx *ctx, uint32_t domid, in libxl_domain_sched_params_get() argument
876 scinfo->sched = libxl__domain_scheduler(gc, domid); in libxl_domain_sched_params_get()
880 LOGD(ERROR, domid, "SEDF scheduler no longer available"); in libxl_domain_sched_params_get()
884 ret=sched_credit_domain_get(gc, domid, scinfo); in libxl_domain_sched_params_get()
887 ret=sched_credit2_domain_get(gc, domid, scinfo); in libxl_domain_sched_params_get()
890 ret=sched_rtds_domain_get(gc, domid, scinfo); in libxl_domain_sched_params_get()
893 ret=sched_null_domain_get(gc, domid, scinfo); in libxl_domain_sched_params_get()
896 LOGD(ERROR, domid, "Unknown scheduler"); in libxl_domain_sched_params_get()
905 int libxl_vcpu_sched_params_get(libxl_ctx *ctx, uint32_t domid, in libxl_vcpu_sched_params_get() argument
911 scinfo->sched = libxl__domain_scheduler(gc, domid); in libxl_vcpu_sched_params_get()
915 LOGD(ERROR, domid, "SEDF scheduler is no longer available"); in libxl_vcpu_sched_params_get()
922 LOGD(ERROR, domid, "per-VCPU parameter getting not supported for this scheduler"); in libxl_vcpu_sched_params_get()
926 rc = sched_rtds_vcpu_get(gc, domid, scinfo); in libxl_vcpu_sched_params_get()
929 LOGD(ERROR, domid, "Unknown scheduler"); in libxl_vcpu_sched_params_get()
938 int libxl_vcpu_sched_params_get_all(libxl_ctx *ctx, uint32_t domid, in libxl_vcpu_sched_params_get_all() argument
944 scinfo->sched = libxl__domain_scheduler(gc, domid); in libxl_vcpu_sched_params_get_all()
948 LOGD(ERROR, domid, "SEDF scheduler is no longer available"); in libxl_vcpu_sched_params_get_all()
955 LOGD(ERROR, domid, "per-VCPU parameter getting not supported for this scheduler"); in libxl_vcpu_sched_params_get_all()
959 rc = sched_rtds_vcpu_get_all(gc, domid, scinfo); in libxl_vcpu_sched_params_get_all()
962 LOGD(ERROR, domid, "Unknown scheduler"); in libxl_vcpu_sched_params_get_all()