From patchwork Fri May 3 17:02:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Tomer X-Patchwork-Id: 10929041 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 405461390 for ; Fri, 3 May 2019 17:04:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3123C22376 for ; Fri, 3 May 2019 17:04:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 21E8D2838B; Fri, 3 May 2019 17:04:29 +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=-5.0 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,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 AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BC3F522376 for ; Fri, 3 May 2019 17:04:28 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hMbZz-0000lm-Hi; Fri, 03 May 2019 17:02:35 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hMbZx-0000lV-US for xen-devel@lists.xenproject.org; Fri, 03 May 2019 17:02:33 +0000 X-Inumbo-ID: 3d8d2474-6dc5-11e9-843c-bc764e045a96 Received: from mail-pg1-x541.google.com (unknown [2607:f8b0:4864:20::541]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 3d8d2474-6dc5-11e9-843c-bc764e045a96; Fri, 03 May 2019 17:02:32 +0000 (UTC) Received: by mail-pg1-x541.google.com with SMTP id n2so2981880pgg.13 for ; Fri, 03 May 2019 10:02:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=RNjvDy45R8xFdfT0/6bHlm7oz8dWDlSdcBUUHuM6+EM=; b=JUvAh3ptC6uOFuYerA85BVoyKUG4drQRpTL47DOi16j0bTd3s2BREQT/h8bj17FP63 ZnbsRWpzuiXYXUt0O4ongDBx6qPsQMx0JQG3xcjTn522H4/Zy8lz/1BBkgW/S6t+r+61 pxwZBDspK/bV3CVPCDZFInpkuAnTX6v46YOrNXaLw23UN/jeIyE8u2m9o9QG8GXExYGt Jo384+NE+1mIMpA/1nAg1ZWLtg4GOUoHG2ATi9p+MvG8dK6FGsDbz3uoC+VmJxY6bMiE WkE/D3/D3lFnJNWKHAxu0awpx90wi5ZJMqFYSmIw9c2bIaZI3Xu2yncv6Qz5s6RdmpK8 VANQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=RNjvDy45R8xFdfT0/6bHlm7oz8dWDlSdcBUUHuM6+EM=; b=cAJHG8SaxnOaBVhtG0NTt6IBnYu15d08goLyT2xhYoZX/TqG3iuClnmlhathKfEAEH R52K+a/VuwStxymKGPOhhKJV8QWS2egUTlI2h4SLJmTG8+43eRMNd+/XkCz9ZwCCTcDS A9EQxIqtiYEXLQnfCcbqWYTi3mlEKJ8gGnsLybuyLF8Vz8YC5/KNqQqSulosYByW9zFC B1cDr4+3Ctp6IOkXLhHvUBKGFCBjMAaxG7KagXznYLab4mko6rDOgPMDKEq8j1GiOtTk tjFDDut4AA/qx/bKYjdqOrKjdPbXzfofeRv13hVkQhqC36msqjdNtUVkd3Bc6MBrTWNk GivA== X-Gm-Message-State: APjAAAXneG/CtwLNt6y9oKw/fXLf2Wi/YD9Di4k/2gsxEiNKS/WN9jpN G+/ltKgkrmOIpPdQkeDze+4YT0Z1 X-Google-Smtp-Source: APXvYqxx7I+cD2b7QFgUtTzzbo96MyGj7d7SdeHV18TjufbugJcq0K+J155CGb1wG/f2u37XvyC8qQ== X-Received: by 2002:a63:87c6:: with SMTP id i189mr11266345pge.367.1556902951309; Fri, 03 May 2019 10:02:31 -0700 (PDT) Received: from localhost.localdomain ([223.179.133.72]) by smtp.gmail.com with ESMTPSA id j2sm3297667pff.77.2019.05.03.10.02.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 May 2019 10:02:30 -0700 (PDT) From: Amit Singh Tomar To: xen-devel@lists.xenproject.org Date: Fri, 3 May 2019 22:32:07 +0530 Message-Id: <1556902928-18682-1-git-send-email-amittomer25@gmail.com> X-Mailer: git-send-email 2.7.4 Subject: [Xen-devel] [PATCH] xen/arm: Black list everything with a PPI X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: andre.przywara@arm.com, julien.grall@arm.com, sstabellini@kernel.org, Amit Singh Tomar MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP XEN should not forward PPIs to Dom0 as it only support SPIs. One of solution to this problem is to skip any device that uses PPI source completely while building domain itself. This patch goes through all the interrupt sources of device and skip it if one of interrupt source is PPI. It fixes XEN boot on i.MX8MQ by skipping PMU node. Suggested-by: Julien Grall Signed-off-by: Amit Singh Tomar --- * This replaces following patch. https://patchwork.kernel.org/patch/10899881/ --- xen/arch/arm/domain_build.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index d983677..8f54472 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -1353,7 +1353,7 @@ static int __init handle_node(struct domain *d, struct kernel_info *kinfo, { /* sentinel */ }, }; struct dt_device_node *child; - int res; + int res, i, nirq, irq_id; const char *name; const char *path; @@ -1399,6 +1399,20 @@ static int __init handle_node(struct domain *d, struct kernel_info *kinfo, return 0; } + /* Skip the node, using PPI source */ + nirq = dt_number_of_irq(node); + + for ( i = 0 ; i < nirq ; i++ ) + { + irq_id = platform_get_irq(node, i); + + if ( irq_id >= 16 && irq_id < 32 ) + { + dt_dprintk(" Skip node with (PPI source)\n"); + return 0; + } + } + /* * Xen is using some path for its own purpose. Warn if a node * already exists with the same path.