|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 14/15] tools: implement new generic set value interface and MBA set value command
On 17-08-30 10:47:37, Roger Pau Monn� wrote:
> On Thu, Aug 24, 2017 at 09:14:48AM +0800, Yi Sun wrote:
> > int libxl_psr_cat_get_cbm(libxl_ctx *ctx, uint32_t domid,
> > @@ -457,7 +431,33 @@ int libxl_psr_set_val(libxl_ctx *ctx, uint32_t domid,
> > libxl_psr_cbm_type type, libxl_bitmap *target_map,
> > uint64_t val)
> > {
> > - return ERROR_FAIL;
> > + GC_INIT(ctx);
> > + int rc;
> > + int socketid, nr_sockets;
> > +
> > + rc = libxl__count_physical_sockets(gc, &nr_sockets);
> > + if (rc) {
> > + LOGED(ERROR, domid, "failed to get system socket count");
> > + goto out;
> > + }
> > +
> > + libxl_for_each_set_bit(socketid, *target_map) {
> > + xc_psr_val_type xc_type;
> > +
> > + if (socketid >= nr_sockets)
> > + break;
> > +
> > + xc_type = libxl__psr_cbm_type_to_libxc_psr_val_type(type);
> > + 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;
> > + }
> > + }
> > +
> > +out:
> > + GC_FREE;
> > + return rc;
>
> Is there no libxl_psr_get_val?
>
Yes, patch 13 implements it.
> > }
> >
> > +int main_psr_mba_set(int argc, char **argv)
> > +{
> > + uint32_t domid;
> > + libxl_psr_cbm_type type;
> > + uint64_t thrtl;
> > + int ret, opt = 0;
> > + libxl_bitmap target_map;
> > + char *value;
> > + libxl_string_list socket_list;
> > + unsigned long start, end;
> > + unsigned int i, j, len;
> > +
> > + static struct option opts[] = {
>
> const
>
Got it.
> Roger.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |