From patchwork Tue Apr 26 14:52:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 8939571 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 968F9BF4C7 for ; Tue, 26 Apr 2016 14:55:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C7921201FE for ; Tue, 26 Apr 2016 14:55:07 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A497A20125 for ; Tue, 26 Apr 2016 14:55:05 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1av4MR-0007b7-4W; Tue, 26 Apr 2016 14:53:11 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1av4MQ-0007Zq-1l for xen-devel@lists.xenproject.org; Tue, 26 Apr 2016 14:53:10 +0000 Received: from [85.158.137.68] by server-4.bemta-3.messagelabs.com id 1D/46-03606-5D08F175; Tue, 26 Apr 2016 14:53:09 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGIsWRWlGSWpSXmKPExsXitHSDve6VBvl wg+fdJhbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8bVt59ZCqbzVrzq2MfcwNjB1cXIySEh4C9x ov0CO4jNJqAjcXHuTrYuRg4OEQEVidt7DUDCzALFEl9X9bGC2MICQRJPPx5kBilhEVCV2PSrG iTMK+Aqsf75fzaIiboSJ3dvApvICRTfvOAVE4gtJOAisWTTY3aIekGJkzOfsECM15Ro3f6bHc KWl2jeOpsZol5Ron/eA7BrJAS4Jf52209g5J+FpHsWku5ZSLoXMDKvYtQoTi0qSy3SNTTRSyr KTM8oyU3MzNE1NDDWy00tLk5MT81JTCrWS87P3cQIDD8GINjBuGK75yFGSQ4mJVHee3ny4UJ8 SfkplRmJxRnxRaU5qcWHGGU4OJQkeE3qgXKCRanpqRVpmTnASIBJS3DwKInwNoGkeYsLEnOLM 9MhUqcYFaXEeaeAJARAEhmleXBtsOi7xCgrJczLCHSIEE9BalFuZgmq/CtGcQ5GJWHeEJApPJ l5JXDTXwEtZgJafPmQLMjikkSElFQDY6pCZ+J2/gh7k/j8N2Jaht75XHsOf7r+Yv0HzeSeypp ckYLT66qOzY5iX1QV8P+xVX1uW4bQ+4tRvLYJx3fNcknYdrA7UPXzI5n0F/oXz+SufrZoVqPf 5tovqW2VJ7T0PnLKCf2aFBqw+djliQsXaRZV5Srd+2xr+1p/k2iOVNw5uenLX++YocRSnJFoq MVcVJwIAD79BRy5AgAA X-Env-Sender: prvs=917dd492e=roger.pau@citrix.com X-Msg-Ref: server-5.tower-31.messagelabs.com!1461682370!33860613!7 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.28; banners=-,-,- X-VirusChecked: Checked Received: (qmail 64757 invoked from network); 26 Apr 2016 14:53:08 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-5.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 26 Apr 2016 14:53:08 -0000 X-IronPort-AV: E=Sophos;i="5.24,536,1454976000"; d="scan'208";a="356517748" From: Roger Pau Monne To: Date: Tue, 26 Apr 2016 16:52:21 +0200 Message-ID: <1461682343-20597-13-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 2.6.4 (Apple Git-63) In-Reply-To: <1461682343-20597-1-git-send-email-roger.pau@citrix.com> References: <1461682343-20597-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: Wei Liu , Ian Jackson , Roger Pau Monne Subject: [Xen-devel] [PATCH v2 for-4.7 12/14] libxl: fix passing the type argument to xc_psr_* X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The xc_psr_* functions expect the type to be xc_psr_cat_type instead of libxl_psr_cbm_type, so do the conversion. Signed-off-by: Roger Pau Monné Acked-by: Wei Liu Nacked-by: Ian Jackson --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_psr.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_psr.c b/tools/libxl/libxl_psr.c index 3d0dc61..40f2d5f 100644 --- a/tools/libxl/libxl_psr.c +++ b/tools/libxl/libxl_psr.c @@ -298,6 +298,7 @@ int libxl_psr_cat_set_cbm(libxl_ctx *ctx, uint32_t domid, uint64_t cbm) { GC_INIT(ctx); + BUILD_BUG_ON(sizeof(libxl_psr_cbm_type) != sizeof(xc_psr_cat_type)); int rc; int socketid, nr_sockets; @@ -310,7 +311,8 @@ int libxl_psr_cat_set_cbm(libxl_ctx *ctx, uint32_t domid, libxl_for_each_set_bit(socketid, *target_map) { if (socketid >= nr_sockets) break; - if (xc_psr_cat_set_domain_data(ctx->xch, domid, type, socketid, cbm)) { + if (xc_psr_cat_set_domain_data(ctx->xch, domid, (xc_psr_cat_type)type, + socketid, cbm)) { libxl__psr_cat_log_err_msg(gc, errno); rc = ERROR_FAIL; } @@ -328,7 +330,8 @@ int libxl_psr_cat_get_cbm(libxl_ctx *ctx, uint32_t domid, GC_INIT(ctx); int rc = 0; - if (xc_psr_cat_get_domain_data(ctx->xch, domid, type, target, cbm_r)) { + if (xc_psr_cat_get_domain_data(ctx->xch, domid, (xc_psr_cat_type)type, + target, cbm_r)) { libxl__psr_cat_log_err_msg(gc, errno); rc = ERROR_FAIL; }