From patchwork Fri Jun 9 17:41:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 9779005 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0D36360318 for ; Fri, 9 Jun 2017 17:44:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE865286E2 for ; Fri, 9 Jun 2017 17:44:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E36FC286F6; Fri, 9 Jun 2017 17:44:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7DCF6286E2 for ; Fri, 9 Jun 2017 17:44:02 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJNup-0003J9-Ps; Fri, 09 Jun 2017 17:41:43 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJNuo-0003IF-GA for xen-devel@lists.xenproject.org; Fri, 09 Jun 2017 17:41:42 +0000 Received: from [193.109.254.147] by server-4.bemta-6.messagelabs.com id 67/4F-02956-5DDDA395; Fri, 09 Jun 2017 17:41:41 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOLMWRWlGSWpSXmKPExsVysyfVTffqXat Ig5UTJSy+b5nM5MDocfjDFZYAxijWzLyk/IoE1oyZD+YxF0zjrmh7/o+5gXEBZxcjF4eQwGZG ifubj7FBOMsZJaaufsfexcjJwSagK7Hj5mtmEFtEIFTi6YLvzCBFzALXGSVO75jPBpIQFrCV+ DvpDyuIzSKgKnFk5jOwBl4BK4k7V26B2RICchIN5++D2ZwC1hLb9qwF6xUCqmk5dJl9AiP3Ak aGVYzqxalFZalFuuZ6SUWZ6RkluYmZObqGBmZ6uanFxYnpqTmJScV6yfm5mxiBHmYAgh2MMy/ 7H2KU5GBSEuWdVmAVKcSXlJ9SmZFYnBFfVJqTWnyIUYaDQ0mCt+cOUE6wKDU9tSItMwcYajBp CQ4eJRHeFyeB0rzFBYm5xZnpEKlTjIpS4rwbQfoEQBIZpXlwbbDwvsQoKyXMywh0iBBPQWpRb mYJqvwrRnEORiVh3l0gU3gy80rgpr8CWswEtHjJOwuQxSWJCCmpBsbuQxpKrpZTTjnsaH74on WfdZg/65lIzdXrFi6IDozo9N12M5rpofzM4ESvW5Xu7wTLHklGbjzW9IL/m8ZJL37+t1HBq55 3Pzn0rL2tR2rmYbmlF/5yVh66Ub7FlVHE64GsiXBNyjzerogZb6Oc2ivCrc7xPHG7veDiuose Mgbz1t/L8HGosFJiKc5INNRiLipOBAD+GnH7agIAAA== X-Env-Sender: andre.przywara@arm.com X-Msg-Ref: server-2.tower-27.messagelabs.com!1497030100!47390251!1 X-Originating-IP: [217.140.101.70] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 54275 invoked from network); 9 Jun 2017 17:41:41 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-2.tower-27.messagelabs.com with SMTP; 9 Jun 2017 17:41:41 -0000 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 AE7711596; Fri, 9 Jun 2017 10:41:40 -0700 (PDT) Received: from e104803-lin.lan (unknown [10.1.207.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 65E403F578; Fri, 9 Jun 2017 10:41:39 -0700 (PDT) From: Andre Przywara To: Julien Grall , Stefano Stabellini Date: Fri, 9 Jun 2017 18:41:09 +0100 Message-Id: <20170609174141.5068-3-andre.przywara@arm.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170609174141.5068-1-andre.przywara@arm.com> References: <20170609174141.5068-1-andre.przywara@arm.com> Cc: xen-devel@lists.xenproject.org, Vijaya Kumar K , Vijay Kilari , Shanker Donthineni , Manish Jaggi Subject: [Xen-devel] [PATCH v11 02/34] ARM: GICv3: enable ITS on the host X-BeenThere: xen-devel@lists.xen.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.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Even though the ITS emulation is not yet in place, the host ITS already gets initialized and Xen tries to map the host collections. However for commands to be processed we need to *enable* the ITS, which will be done in a later patch not yet merged. So those MAPC commands are not processed and run into a timeout, leading to a panic on machines which advertise an ITS in their DT. This patch just enables the ITS (but not the LPIs on each redistributor), to get those MAPC commands executed. This patch was part of: "ARM: GICv3: enable ITS and LPIs on the host" (patch v8 06/27 or v10 12/32, which was already acked by Stefano. This fixes booting Xen on ARM64 machines with an ITS and the (EXPERT) ITS Kconfig option enabled. Signed-off-by: Andre Przywara Acked-by: Julien Grall --- xen/arch/arm/gic-v3-its.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xen/arch/arm/gic-v3-its.c b/xen/arch/arm/gic-v3-its.c index 07280b3..aebc257 100644 --- a/xen/arch/arm/gic-v3-its.c +++ b/xen/arch/arm/gic-v3-its.c @@ -505,6 +505,10 @@ static int gicv3_its_init_single_its(struct host_its *hw_its) return -ENOMEM; writeq_relaxed(0, hw_its->its_base + GITS_CWRITER); + /* Now enable interrupt translation and command processing on that ITS. */ + reg = readl_relaxed(hw_its->its_base + GITS_CTLR); + writel_relaxed(reg | GITS_CTLR_ENABLE, hw_its->its_base + GITS_CTLR); + return 0; }