From patchwork Wed Jan 13 15:43:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 8026461 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 281DEBEEE5 for ; Wed, 13 Jan 2016 15:46:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 523F520497 for ; Wed, 13 Jan 2016 15:46:43 +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 5AF0A2041B for ; Wed, 13 Jan 2016 15:46:42 +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 1aJNaS-0003dP-S6; Wed, 13 Jan 2016 15:43:52 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aJNaR-0003dD-F0 for xen-devel@lists.xensource.com; Wed, 13 Jan 2016 15:43:51 +0000 Received: from [85.158.139.211] by server-5.bemta-5.messagelabs.com id B9/7C-03235-6B076965; Wed, 13 Jan 2016 15:43:50 +0000 X-Env-Sender: armbru@redhat.com X-Msg-Ref: server-10.tower-206.messagelabs.com!1452699828!15628727!1 X-Originating-IP: [209.132.183.28] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMjA5LjEzMi4xODMuMjggPT4gNTQwNjQ=\n X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 28201 invoked from network); 13 Jan 2016 15:43:49 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by server-10.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 13 Jan 2016 15:43:49 -0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 2E426C0AA56D; Wed, 13 Jan 2016 15:43:48 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-113-28.phx2.redhat.com [10.3.113.28]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0DFhjiq017261 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 13 Jan 2016 10:43:47 -0500 Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id A2D193002548; Wed, 13 Jan 2016 16:43:40 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Wed, 13 Jan 2016 16:43:14 +0100 Message-Id: <1452699819-26608-17-git-send-email-armbru@redhat.com> In-Reply-To: <1452699819-26608-1-git-send-email-armbru@redhat.com> References: <1452699819-26608-1-git-send-email-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Cc: xen-devel@lists.xensource.com, Stefano Stabellini Subject: [Xen-devel] [PULL 16/41] xen-hvm: Mark inappropriate error handling FIXME 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: , MIME-Version: 1.0 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 Cc: Stefano Stabellini Cc: xen-devel@lists.xensource.com Signed-off-by: Markus Armbruster Message-Id: <1450370121-5768-14-git-send-email-armbru@redhat.com> --- xen-hvm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xen-hvm.c b/xen-hvm.c index 3d78a0c..2a93390 100644 --- a/xen-hvm.c +++ b/xen-hvm.c @@ -240,6 +240,7 @@ static void xen_ram_init(PCMachineState *pcms, void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, MemoryRegion *mr) { + /* FIXME caller ram_block_add() wants error_setg() on failure */ unsigned long nr_pfn; xen_pfn_t *pfn_list; int i; @@ -1192,6 +1193,12 @@ static void xen_wakeup_notifier(Notifier *notifier, void *data) int xen_hvm_init(PCMachineState *pcms, MemoryRegion **ram_memory) { + /* + * FIXME Returns -1 without cleaning up on some errors (harmless + * as long as the caller exit()s on error), dies with hw_error() + * on others. hw_error() isn't approprate here. Should probably + * simply exit() on all errors. + */ int i, rc; xen_pfn_t ioreq_pfn; xen_pfn_t bufioreq_pfn;