From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: [PATCH v4 1/5] libxl: Remove pointless hypercall from libxl_set_memory_target Date: Fri, 18 Dec 2015 12:23:41 +0000 Message-ID: <1450441425-10755-2-git-send-email-george.dunlap@eu.citrix.com> References: <1450441425-10755-1-git-send-email-george.dunlap@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1450441425-10755-1-git-send-email-george.dunlap@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: George Dunlap , Ian Jackson , Wei Liu , George Dunlap , Ian Campbell List-Id: xen-devel@lists.xenproject.org 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 --- 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); -- 2.1.4