[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 14/15] tools: implement new generic set value interface and MBA set value command
On 17-09-26 12:39:21, Roger Pau Monn� wrote: > On Sat, Sep 23, 2017 at 09:48:23AM +0000, Yi Sun wrote: > > int libxl_psr_cat_get_cbm(libxl_ctx *ctx, uint32_t domid, > > @@ -450,7 +425,32 @@ int libxl_psr_set_val(libxl_ctx *ctx, uint32_t domid, > > libxl_psr_type type, libxl_bitmap *target_map, > > uint64_t val) > > { > > - return ERROR_FAIL; > > + GC_INIT(ctx); > > + int rc, socketid, nr_sockets; > > + > > + rc = libxl__count_physical_sockets(gc, &nr_sockets); > > + if (rc) { > > + LOG(ERROR, "failed to get system socket count"); > > + goto out; > > + } > > + > > + libxl_for_each_set_bit(socketid, *target_map) { > > + xc_psr_type xc_type; > > + > > + if (socketid >= nr_sockets) > > + break; > > + > > + xc_type = libxl__psr_type_to_libxc_psr_type(type); > > No need to do this for every loop, AFAICT you could define and > initialize this together with the other local variables. > Thanks! > > + if (xc_psr_set_domain_data(ctx->xch, domid, xc_type, > > + socketid, val)) { > > + libxl__psr_alloc_log_err_msg(gc, errno, type); > > + rc = ERROR_FAIL; > goto out; or break; > > Or it is intended to not break the loop? > Yes, I intended to try to set value on next socket. > Thanks, Roger. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |