From patchwork Tue Feb 27 15:15:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 129831 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp398823edc; Tue, 27 Feb 2018 07:18:32 -0800 (PST) X-Google-Smtp-Source: AG47ELte/zhXqC5v2kPTMlA4msPmRxWWg6C95k5mdEQQoN0qk1CxnXfhzLQxlmOTrA3Wqgc59DHT X-Received: by 10.107.29.3 with SMTP id d3mr16588956iod.45.1519744712282; Tue, 27 Feb 2018 07:18:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519744712; cv=none; d=google.com; s=arc-20160816; b=TwZ0Lsr5GcB5wPnWgoJ7RuF+PZbDsChGSrEciOXGl3LzduShsBKKIPRQzsqLlcH5pz wja5NfIum/FodIT5Zz0j5TQiiL2OLSvwvAF5lng300UUAGMrJgFQQEuFoJ1ZFa0FZfQ/ rm+zESWC4WDfsmq96M0X1swgT+tyzUEN7Vkl3fQQAfWBAmdY1SL+r9juBakK+e6KNiq0 MiNSbFHUpCbOqlVJ9KafQnwGuV1IVxnqodI5X3v+1pC0tF+69bGYXzXXrteyc7z5YE/B x14zE4E4KZBL1q7v49Gin+JoYk2nqjl6d4d0Rg9eJ0hjo26kYZbVu3ucpDTXAuPkswov mrQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:references:in-reply-to:message-id:date:to :from:arc-authentication-results; bh=g/m9fKQIl2vLRYs9qPpR1zs6vFhMrzVhdunf5TrFapI=; b=sq/Yra4SmiNcYU1zBukv4bPJamGm9wRszTJJHkqJn4i7GD4G8X2rcPCOJG5LQKvETe MdUnkRXBZYBA5/mErYKWlPX1hqOYgWxGfkX0/QcghcgjoX53lWD3ZmAhowG32KVyJH41 c04hHgnmveqBCbzVeH79ARG2Trt0D138bfKo8lN+9ux49TSp2LSpkIs/PUNSJRKmv1U/ ANkHmd6cIDN0gIfLJeV9FahP5lGlBTnFF5aT3pJxHd8RcAX+IGmpbBngHjbkL9APE/Qj XwE7Ay4exX+KbDRqrTJyhoCP3gZId8vo6D9ZdC8n5ag2JluejVmpxuAHWdNLO06GA2Mv ReYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id e69si2076027iof.53.2018.02.27.07.18.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Feb 2018 07:18:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eqgzG-0005FS-KE; Tue, 27 Feb 2018 15:16:14 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eqgzF-0005Es-Dm for xen-devel@lists.xenproject.org; Tue, 27 Feb 2018 15:16:13 +0000 X-Inumbo-ID: 6725a35a-1bd1-11e8-b9b1-635ca7ef6cff Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas1.inumbo.com (Halon) with ESMTP id 6725a35a-1bd1-11e8-b9b1-635ca7ef6cff; Tue, 27 Feb 2018 15:18:02 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 232811610; Tue, 27 Feb 2018 07:16:07 -0800 (PST) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.206.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 147833F25C; Tue, 27 Feb 2018 07:16:05 -0800 (PST) From: julien.grall@arm.com To: xen-devel@lists.xenproject.org Date: Tue, 27 Feb 2018 15:15:53 +0000 Message-Id: <20180227151555.1953-2-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180227151555.1953-1-julien.grall@arm.com> References: <20180227151555.1953-1-julien.grall@arm.com> Cc: stewart.hildebrand@dornerworks.com, andre.przywara@arm.com, Julien Grall , sstabellini@kernel.org Subject: [Xen-devel] [PATCH 1/3] xen/arm: domain_build: Prepare DTB/ACPI tables after specific mappings X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" From: Julien Grall A follow-up patch will require to have all interrupts routed to the hardware registered before calling prepare_dtb/prepare_acpi. At the moment, it is not necessary to call platform specific mappings (gic and platform) after, so it is fine to move them. Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini --- xen/arch/arm/domain_build.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 941688a2ce..a5e5c82355 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -2145,14 +2145,6 @@ int construct_dom0(struct domain *d) allocate_memory(d, &kinfo); find_gnttab_region(d, &kinfo); - if ( acpi_disabled ) - rc = prepare_dtb(d, &kinfo); - else - rc = prepare_acpi(d, &kinfo); - - if ( rc < 0 ) - return rc; - /* Map extra GIC MMIO, irqs and other hw stuffs to dom0. */ rc = gic_map_hwdom_extra_mappings(d); if ( rc < 0 ) @@ -2162,6 +2154,14 @@ int construct_dom0(struct domain *d) if ( rc < 0 ) return rc; + if ( acpi_disabled ) + rc = prepare_dtb(d, &kinfo); + else + rc = prepare_acpi(d, &kinfo); + + if ( rc < 0 ) + return rc; + /* * The following loads use the domain's p2m and require current to * be a vcpu of the domain, temporarily switch