From patchwork Fri Dec 18 12:23:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Dunlap X-Patchwork-Id: 7882811 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 586F8BEEE5 for ; Fri, 18 Dec 2015 12:26:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 92E2220431 for ; Fri, 18 Dec 2015 12:26:28 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B4F712041D for ; Fri, 18 Dec 2015 12:26:27 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1a9u4f-0005Rt-2L; Fri, 18 Dec 2015 12:23:53 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1a9u4d-0005Rc-HA for xen-devel@lists.xen.org; Fri, 18 Dec 2015 12:23:51 +0000 Received: from [85.158.137.68] by server-7.bemta-3.messagelabs.com id 93/B7-23747-6DAF3765; Fri, 18 Dec 2015 12:23:50 +0000 X-Env-Sender: prvs=787e22e97=George.Dunlap@citrix.com X-Msg-Ref: server-12.tower-31.messagelabs.com!1450441428!11518275!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 53427 invoked from network); 18 Dec 2015 12:23:50 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-12.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 18 Dec 2015 12:23:50 -0000 X-IronPort-AV: E=Sophos;i="5.20,446,1444694400"; d="scan'208";a="320263527" From: George Dunlap To: Date: Fri, 18 Dec 2015 12:23:41 +0000 Message-ID: <1450441425-10755-2-git-send-email-george.dunlap@eu.citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1450441425-10755-1-git-send-email-george.dunlap@eu.citrix.com> References: <1450441425-10755-1-git-send-email-george.dunlap@eu.citrix.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: George Dunlap , Ian Jackson , Wei Liu , George Dunlap , Ian Campbell Subject: [Xen-devel] [PATCH v4 1/5] libxl: Remove pointless hypercall from libxl_set_memory_target X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org 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 There's no obvious reason for the call to xc_domain_getinfolist -- all it seems to be doing is checking that the domain exists; but if it doesn't exist, it will have already failed by this point. NB that this will change the return value for libxl_set_memory_target: now it will return 0 on success, rather than returning 1 (which was the previous behavior). This is more in line with expected behavior, and also allows the caller to distingiush between success and other failure modes (some of which also return 1). Signed-off-by: George Dunlap Acked-by: Ian Jackson --- v4: - Split this change into a separate patch CC: Ian Campbell CC: Ian Jackson CC: Wei Liu --- tools/libxl/libxl.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 9207621..a36101d 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -4859,11 +4859,6 @@ retry_transaction: libxl__xs_printf(gc, t, GCSPRINTF("%s/memory/target", dompath), "%"PRIu32, new_target_memkb); - rc = xc_domain_getinfolist(ctx->xch, domid, 1, &info); - if (rc != 1 || info.domain != domid) { - abort_transaction = 1; - goto out; - } libxl_dominfo_init(&ptr); xcinfo2xlinfo(ctx, &info, &ptr);