From patchwork Fri Jan 9 13:54:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 42910 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f70.google.com (mail-ee0-f70.google.com [74.125.83.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 708A42055F for ; Fri, 9 Jan 2015 13:56:36 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id b57sf8342186eek.1 for ; Fri, 09 Jan 2015 05:56:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:cc:subject :precedence:list-id:list-unsubscribe:list-post:list-help :list-subscribe:mime-version:content-type:content-transfer-encoding :sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive; bh=nfyFX2iYGvAxVEJVLEVeDNCKmnsYAtfYl3RVotMQFaQ=; b=VLTQzFYi1wHiEPnK3HtlOw17MslPCW+6CUxfec/hZIa/+MiRJcKpOriIFDXY9+EicA y8di6yyqmc5YCbV5/rVPKN37umSrfBSWVQAPMS2vki2hUTjaa3ZfQOeCvyzeyuRbLBHM VpnkRwrY6Q8jl1iqJIYDMT9tCZTsyhbZdxtjDKhmFzyUFEmWxJVpy4n7APXvcUAy/sGr lc4hVkCDOcVL0iXItVqMtrUeFZpOTVQDc/1nilbn6dY2LyHUh4infqY2JH5E3+XXKw0B BUDET/12iAkMBtz55pz5KeDl2HnHUmx6iqKhCfOhzj5K1IQeY9eZCNHzTLJ/7/n4i2at gxDQ== X-Gm-Message-State: ALoCoQlF7kfpYFItZiZTpC2XWr4Q22VmvLfdUnfb6xJubq4e9W7DKLyCCMQCeDiYAx7n+v66bKfM X-Received: by 10.194.78.42 with SMTP id y10mr447967wjw.4.1420811795666; Fri, 09 Jan 2015 05:56:35 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.19.39 with SMTP id b7ls420873lae.93.gmail; Fri, 09 Jan 2015 05:56:35 -0800 (PST) X-Received: by 10.112.129.228 with SMTP id nz4mr21531806lbb.8.1420811795433; Fri, 09 Jan 2015 05:56:35 -0800 (PST) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id tz3si13123129lbb.66.2015.01.09.05.56.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Jan 2015 05:56:35 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by mail-la0-f50.google.com with SMTP id pn19so14917683lab.9 for ; Fri, 09 Jan 2015 05:56:35 -0800 (PST) X-Received: by 10.112.98.99 with SMTP id eh3mr21387693lbb.32.1420811795009; Fri, 09 Jan 2015 05:56:35 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp342250lbb; Fri, 9 Jan 2015 05:56:34 -0800 (PST) X-Received: by 10.224.114.81 with SMTP id d17mr16302765qaq.27.1420811793723; Fri, 09 Jan 2015 05:56:33 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id p61si12061900qga.97.2015.01.09.05.56.33 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 09 Jan 2015 05:56:33 -0800 (PST) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Y9a1g-0000Y4-N1; Fri, 09 Jan 2015 13:54:56 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Y9a1e-0000Xw-WC for xen-devel@lists.xenproject.org; Fri, 09 Jan 2015 13:54:55 +0000 Received: from [85.158.137.68] by server-13.bemta-3.messagelabs.com id 63/FD-27623-EADDFA45; Fri, 09 Jan 2015 13:54:54 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-12.tower-31.messagelabs.com!1420811693!18369041!1 X-Originating-IP: [74.125.82.172] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.12.5; banners=-,-,- X-VirusChecked: Checked Received: (qmail 13428 invoked from network); 9 Jan 2015 13:54:53 -0000 Received: from mail-we0-f172.google.com (HELO mail-we0-f172.google.com) (74.125.82.172) by server-12.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 9 Jan 2015 13:54:53 -0000 Received: by mail-we0-f172.google.com with SMTP id k11so8042078wes.3 for ; Fri, 09 Jan 2015 05:54:53 -0800 (PST) X-Received: by 10.180.107.228 with SMTP id hf4mr5288282wib.47.1420811692620; Fri, 09 Jan 2015 05:54:52 -0800 (PST) Received: from chilopoda.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id kn7sm10082997wjc.45.2015.01.09.05.54.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Jan 2015 05:54:51 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Fri, 9 Jan 2015 13:54:22 +0000 Message-Id: <1420811662-18465-1-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 2.1.4 Cc: Wei Liu , Julien Grall , Ian Jackson , Ian Campbell , Stefano Stabellini Subject: [Xen-devel] [PATCH] libxl: Don't ignore error when we fail to give access to ioport/irq X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: If we fail to give the access, the domain will unlikely work correctly. So we should bail out at the first error. Signed-off-by: Julien Grall Cc: Ian Jackson Cc: Stefano Stabellini Cc: Ian Campbell Cc: Wei Liu --- This patch is candidate for a backport for at least Xen 4.4 and Xen 4.5. --- tools/libxl/libxl_create.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index 1198225..09d481a 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -1167,6 +1167,7 @@ static void domcreate_launch_dm(libxl__egc *egc, libxl__multidev *multidev, "failed give dom%d access to ioports %"PRIx32"-%"PRIx32, domid, io->first, io->first + io->number - 1); ret = ERROR_FAIL; + goto error_out; } } @@ -1182,6 +1183,7 @@ static void domcreate_launch_dm(libxl__egc *egc, libxl__multidev *multidev, if (ret < 0) { LOGE(ERROR, "failed give dom%d access to irq %d", domid, irq); ret = ERROR_FAIL; + goto error_out; } }