From patchwork Wed Apr 27 11:11:51 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: 8955021 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 793499F1C1 for ; Wed, 27 Apr 2016 11:14:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A901420268 for ; Wed, 27 Apr 2016 11:14:28 +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 9E2C92025B for ; Wed, 27 Apr 2016 11:14:27 +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 1avNOp-0003lF-2B; Wed, 27 Apr 2016 11:12:55 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avNOn-0003g9-Hw for xen-devel@lists.xenproject.org; Wed, 27 Apr 2016 11:12:53 +0000 Received: from [85.158.139.211] by server-11.bemta-5.messagelabs.com id EC/F9-27787-5BE90275; Wed, 27 Apr 2016 11:12:53 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKIsWRWlGSWpSXmKPExsXitHSDve6WeQr hBr2nzCy+b5nM5MDocfjDFZYAxijWzLyk/IoE1ozbV3YyFeznrdj37x9rA+Mari5GTg4JAX+J HwveMIHYbAI6Ehfn7mTrYuTgEBFQkbi91wAkzCxQLPF1VR8riC0sECRx4+ZedpASFgFViXlLd EDCvAKuEidfrGCCmKgrcXL3JnYQmxMo3tY0gQXEFhJwkXh6+w4rRL2gxMmZT1ggxmtKtG7/zQ 5hy0s0b53NDFGvKNE/7wHYNRIC3BJ/u+0nMPLPQtI9C0n3LCTdCxiZVzGqF6cWlaUW6RrqJRV lpmeU5CZm5ugaGpjq5aYWFyemp+YkJhXrJefnbmIEBl89AwPjDsamXudDjJIcTEqivAvbFcKF +JLyUyozEosz4otKc1KLDzHKcHAoSfCenguUEyxKTU+tSMvMAcYBTFqCg0dJhLd+DlCat7ggM bc4Mx0idYpRUUqcNxGkTwAkkVGaB9cGi71LjLJSwryMDAwMQjwFqUW5mSWo8q8YxTkYlYR5D4 BM4cnMK4Gb/gpoMRPQ4suHZEEWlyQipKQaGCMf8C6d80S5f/UluXfZ1/dmJL25LPolmY3dn3d 9O3P8+XkT82ZmWT5JO3yMJadI/cu3A6kn5uX5Ht/A6/fds9EudWvkx2kNp6cGvmZ/aNHy+2/u TqHFqmX3eC3yNoTxH97i/JRxPhPDxbnbJs9fUxv4k7GF5e8ajdYlr5jc1Fr+d9Zfm1+25JASS 3FGoqEWc1FxIgBK/SAjuAIAAA== X-Env-Sender: prvs=918322aae=roger.pau@citrix.com X-Msg-Ref: server-7.tower-206.messagelabs.com!1461755568!36497476!4 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.34; banners=-,-,- X-VirusChecked: Checked Received: (qmail 54716 invoked from network); 27 Apr 2016 11:12:52 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-7.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 27 Apr 2016 11:12:52 -0000 X-IronPort-AV: E=Sophos;i="5.24,541,1454976000"; d="scan'208";a="356738747" From: Roger Pau Monne To: Date: Wed, 27 Apr 2016 13:11:51 +0200 Message-ID: <1461755514-23754-14-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 2.6.4 (Apple Git-63) In-Reply-To: <1461755514-23754-1-git-send-email-roger.pau@citrix.com> References: <1461755514-23754-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 v3 for-4.7 13/16] 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 --- 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; }