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()
402 static int sched_credit2_domain_get(libxl__gc *gc, uint32_t domid, in sched_credit2_domain_get() argument
408 rc = xc_sched_credit2_domain_get(CTX->xch, domid, &sdom); in sched_credit2_domain_get()
410 LOGED(ERROR, domid, "Getting domain sched credit2"); in sched_credit2_domain_get()
422 static int sched_credit2_domain_set(libxl__gc *gc, uint32_t domid, in sched_credit2_domain_set() argument
429 rc = xc_domain_getinfolist(CTX->xch, domid, 1, &info); in sched_credit2_domain_set()
431 LOGED(ERROR, domid, "Getting domain info"); in sched_credit2_domain_set()
434 if (rc != 1 || info.domain != domid) in sched_credit2_domain_set()
437 rc = xc_sched_credit2_domain_get(CTX->xch, domid, &sdom); in sched_credit2_domain_set()
439 LOGED(ERROR, domid, "Getting domain sched credit2"); in sched_credit2_domain_set()
445 LOGD(ERROR, domid, "Cpu weight out of range, " in sched_credit2_domain_set()
455 LOGD(ERROR, domid, "Cpu cap out of range, " in sched_credit2_domain_set()
463 rc = xc_sched_credit2_domain_set(CTX->xch, domid, &sdom); in sched_credit2_domain_set()
465 LOGED(ERROR, domid, "Setting domain sched credit2"); in sched_credit2_domain_set()
500 static int sched_rtds_vcpu_get(libxl__gc *gc, uint32_t domid, in sched_rtds_vcpu_get() argument
508 r = xc_domain_getinfo(CTX->xch, domid, 1, &info); in sched_rtds_vcpu_get()
510 LOGED(ERROR, domid, "Getting domain info"); in sched_rtds_vcpu_get()
524 LOGD(ERROR, domid, "VCPU index is out of range, " in sched_rtds_vcpu_get()
534 r = xc_sched_rtds_vcpu_get(CTX->xch, domid, vcpus, num_vcpus); in sched_rtds_vcpu_get()
536 LOGED(ERROR, domid, "Getting vcpu sched rtds"); in sched_rtds_vcpu_get()
554 static int sched_rtds_vcpu_get_all(libxl__gc *gc, uint32_t domid, in sched_rtds_vcpu_get_all() argument
562 r = xc_domain_getinfo(CTX->xch, domid, 1, &info); in sched_rtds_vcpu_get_all()
564 LOGED(ERROR, domid, "Getting domain info"); in sched_rtds_vcpu_get_all()
579 r = xc_sched_rtds_vcpu_get(CTX->xch, domid, vcpus, num_vcpus); in sched_rtds_vcpu_get_all()
581 LOGED(ERROR, domid, "Getting vcpu sched rtds"); in sched_rtds_vcpu_get_all()
603 static int sched_rtds_vcpu_set(libxl__gc *gc, uint32_t domid, in sched_rtds_vcpu_set() argument
612 r = xc_domain_getinfo(CTX->xch, domid, 1, &info); in sched_rtds_vcpu_set()
614 LOGED(ERROR, domid, "Getting domain info"); in sched_rtds_vcpu_set()
627 LOGD(ERROR, domid, "Invalid VCPU %d: valid range is [0, %d]", in sched_rtds_vcpu_set()
650 r = xc_sched_rtds_vcpu_set(CTX->xch, domid, in sched_rtds_vcpu_set()
653 LOGED(ERROR, domid, "Setting vcpu sched rtds"); in sched_rtds_vcpu_set()
663 static int sched_rtds_vcpu_set_all(libxl__gc *gc, uint32_t domid, in sched_rtds_vcpu_set_all() argument
673 r = xc_domain_getinfo(CTX->xch, domid, 1, &info); in sched_rtds_vcpu_set_all()
675 LOGED(ERROR, domid, "Getting domain info"); in sched_rtds_vcpu_set_all()
702 r = xc_sched_rtds_vcpu_set(CTX->xch, domid, in sched_rtds_vcpu_set_all()
705 LOGED(ERROR, domid, "Setting vcpu sched rtds"); in sched_rtds_vcpu_set_all()
714 static int sched_rtds_domain_get(libxl__gc *gc, uint32_t domid, in sched_rtds_domain_get() argument
720 rc = xc_sched_rtds_domain_get(CTX->xch, domid, &sdom); in sched_rtds_domain_get()
722 LOGED(ERROR, domid, "Getting domain sched rtds"); in sched_rtds_domain_get()
735 static int sched_rtds_domain_set(libxl__gc *gc, uint32_t domid, in sched_rtds_domain_set() argument
741 rc = xc_sched_rtds_domain_get(CTX->xch, domid, &sdom); in sched_rtds_domain_set()
743 LOGED(ERROR, domid, "Getting domain sched rtds"); in sched_rtds_domain_set()
758 rc = xc_sched_rtds_domain_set(CTX->xch, domid, &sdom); in sched_rtds_domain_set()
760 LOGED(ERROR, domid, "Setting domain sched rtds"); in sched_rtds_domain_set()
767 int libxl_domain_sched_params_set(libxl_ctx *ctx, uint32_t domid, in libxl_domain_sched_params_set() argument
775 sched = libxl__domain_scheduler(gc, domid); in libxl_domain_sched_params_set()
779 LOGD(ERROR, domid, "SEDF scheduler no longer available"); in libxl_domain_sched_params_set()
783 ret=sched_credit_domain_set(gc, domid, scinfo); in libxl_domain_sched_params_set()
786 ret=sched_credit2_domain_set(gc, domid, scinfo); in libxl_domain_sched_params_set()
789 ret=sched_arinc653_domain_set(gc, domid, scinfo); in libxl_domain_sched_params_set()
792 ret=sched_rtds_domain_set(gc, domid, scinfo); in libxl_domain_sched_params_set()
795 ret=sched_null_domain_set(gc, domid, scinfo); in libxl_domain_sched_params_set()
798 LOGD(ERROR, domid, "Unknown scheduler"); in libxl_domain_sched_params_set()
807 int libxl_vcpu_sched_params_set(libxl_ctx *ctx, uint32_t domid, in libxl_vcpu_sched_params_set() argument
815 sched = libxl__domain_scheduler(gc, domid); in libxl_vcpu_sched_params_set()
819 LOGD(ERROR, domid, "SEDF scheduler no longer available"); in libxl_vcpu_sched_params_set()
826 LOGD(ERROR, domid, "per-VCPU parameter setting not supported for this scheduler"); in libxl_vcpu_sched_params_set()
830 rc = sched_rtds_vcpu_set(gc, domid, scinfo); in libxl_vcpu_sched_params_set()
833 LOGD(ERROR, domid, "Unknown scheduler"); in libxl_vcpu_sched_params_set()
842 int libxl_vcpu_sched_params_set_all(libxl_ctx *ctx, uint32_t domid, in libxl_vcpu_sched_params_set_all() argument
850 sched = libxl__domain_scheduler(gc, domid); in libxl_vcpu_sched_params_set_all()
854 LOGD(ERROR, domid, "SEDF scheduler no longer available"); in libxl_vcpu_sched_params_set_all()
861 LOGD(ERROR, domid, "per-VCPU parameter setting not supported for this scheduler"); in libxl_vcpu_sched_params_set_all()
865 rc = sched_rtds_vcpu_set_all(gc, domid, scinfo); in libxl_vcpu_sched_params_set_all()
868 LOGD(ERROR, domid, "Unknown scheduler"); in libxl_vcpu_sched_params_set_all()
877 int libxl_domain_sched_params_get(libxl_ctx *ctx, uint32_t domid, in libxl_domain_sched_params_get() argument
885 scinfo->sched = libxl__domain_scheduler(gc, domid); in libxl_domain_sched_params_get()
889 LOGD(ERROR, domid, "SEDF scheduler no longer available"); in libxl_domain_sched_params_get()
893 ret=sched_credit_domain_get(gc, domid, scinfo); in libxl_domain_sched_params_get()
896 ret=sched_credit2_domain_get(gc, domid, scinfo); in libxl_domain_sched_params_get()
899 ret=sched_rtds_domain_get(gc, domid, scinfo); in libxl_domain_sched_params_get()
902 ret=sched_null_domain_get(gc, domid, scinfo); in libxl_domain_sched_params_get()
905 LOGD(ERROR, domid, "Unknown scheduler"); in libxl_domain_sched_params_get()
914 int libxl_vcpu_sched_params_get(libxl_ctx *ctx, uint32_t domid, in libxl_vcpu_sched_params_get() argument
920 scinfo->sched = libxl__domain_scheduler(gc, domid); in libxl_vcpu_sched_params_get()
924 LOGD(ERROR, domid, "SEDF scheduler is no longer available"); in libxl_vcpu_sched_params_get()
931 LOGD(ERROR, domid, "per-VCPU parameter getting not supported for this scheduler"); in libxl_vcpu_sched_params_get()
935 rc = sched_rtds_vcpu_get(gc, domid, scinfo); in libxl_vcpu_sched_params_get()
938 LOGD(ERROR, domid, "Unknown scheduler"); in libxl_vcpu_sched_params_get()
947 int libxl_vcpu_sched_params_get_all(libxl_ctx *ctx, uint32_t domid, in libxl_vcpu_sched_params_get_all() argument
953 scinfo->sched = libxl__domain_scheduler(gc, domid); in libxl_vcpu_sched_params_get_all()
957 LOGD(ERROR, domid, "SEDF scheduler is no longer available"); in libxl_vcpu_sched_params_get_all()
964 LOGD(ERROR, domid, "per-VCPU parameter getting not supported for this scheduler"); in libxl_vcpu_sched_params_get_all()
968 rc = sched_rtds_vcpu_get_all(gc, domid, scinfo); in libxl_vcpu_sched_params_get_all()
971 LOGD(ERROR, domid, "Unknown scheduler"); in libxl_vcpu_sched_params_get_all()