From patchwork Fri May 3 16:42:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Tomer X-Patchwork-Id: 10928993 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 4A0CB933 for ; Fri, 3 May 2019 16:45:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3874A27C05 for ; Fri, 3 May 2019 16:45:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 27B0D283C9; Fri, 3 May 2019 16:45:46 +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 C18CB27C05 for ; Fri, 3 May 2019 16:45:45 +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 1hMbHc-0005tN-Su; Fri, 03 May 2019 16:43:36 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hMbHc-0005tI-0M for xen-devel@lists.xenproject.org; Fri, 03 May 2019 16:43:36 +0000 X-Inumbo-ID: 976644e3-6dc2-11e9-843c-bc764e045a96 Received: from mail-pg1-x542.google.com (unknown [2607:f8b0:4864:20::542]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 976644e3-6dc2-11e9-843c-bc764e045a96; Fri, 03 May 2019 16:43:34 +0000 (UTC) Received: by mail-pg1-x542.google.com with SMTP id j26so2981777pgl.5 for ; Fri, 03 May 2019 09:43:34 -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=Ke4/hXD3EQgdo5LIQMPk12sJRbvDmSJQ3IPvwmmcegw=; b=FK/Ru+8DU723IFP0S8sCqUElEjqvzitVhhUCDLEeRswvH5RYeYIVqXXTqw8Okc7tOw WuINGO6a5YRcds56Rl+UKemyDUXF2Bk80S5Dc2QAC2P2jwNM7fsrSGOxmA9K9AhgcxJ5 VEPKHi7tTOUupfWN++zYuul/A/3GVLNUfKrc+Yma6cUyw40me7xAOeZ/7U/Nb6k3xUbi Q3tQ1QBFViwg0qu8p0np/gw4NpxcuZ48h11fJiy57X1K6NyT5fFm6Pg90HV80IUY7pHd Xf18+dp3I67NDpJa2b0KVnN6NBhTwm0/AY46SaMbQaXia/2wczkCMDhMMQ23CjVlfUOs 9jXA== 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=Ke4/hXD3EQgdo5LIQMPk12sJRbvDmSJQ3IPvwmmcegw=; b=k4/6KxUXlKwA1uBfsWrdCsac99ek/yIUZsfx6TZwDR2tBrnF57XVuWTczyYIO3B4n4 5KGJwjgB+MGorNAURUabRRMiAmhUGeEiv1QNVQmXEGTphcjdCTq4C8FVmT8mivd6MfH7 409zX27sT4QI4Uz202L+sItRHYZv/NlrrcHSapE0IbzoB+c9ySFYExGBmFcvWpoU20wO 1JtnJqpQjygH4BDrsmhYLv7dd9jpgDUB9HuabwspiA3ix+dBXiSkw17626rcUWSu7feJ SJdS8sjbR4s/IcPLrMGA79XRMFMaoOTmL7nCfa1LlODuAuaVDFRe0MTeG0Prsa1/4mHn gdxA== X-Gm-Message-State: APjAAAUrAVZyaW07pTlRKlMpTUDY8ihfJ8mWYk2841+KiaxKzANJTqcH uBJ6ive1TD7B0PqioKTAr+7TMdd3 X-Google-Smtp-Source: APXvYqyH70PfYzU8ZD/RGA+/IIUoyyvyK/sZlxvF0dwUtOWo88BgaMgkOr1sAwdYsTD9RKoBUR+ibg== X-Received: by 2002:a62:4607:: with SMTP id t7mr12409391pfa.138.1556901813275; Fri, 03 May 2019 09:43:33 -0700 (PDT) Received: from localhost.localdomain ([223.179.133.72]) by smtp.gmail.com with ESMTPSA id g128sm3716658pfb.131.2019.05.03.09.43.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 May 2019 09:43:32 -0700 (PDT) From: Amit Singh Tomar To: xen-devel@lists.xenproject.org Date: Fri, 3 May 2019 22:12:03 +0530 Message-Id: <1556901723-11740-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 | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index d983677..0ae54db 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -1334,6 +1334,7 @@ static int __init handle_node(struct domain *d, struct kernel_info *kinfo, DT_MATCH_COMPATIBLE("arm,cortex-a15-pmu"), DT_MATCH_COMPATIBLE("arm,cortex-a53-edac"), DT_MATCH_COMPATIBLE("arm,armv8-pmuv3"), + DT_MATCH_COMPATIBLE("arm,cortex-a53-pmu"), DT_MATCH_PATH("/cpus"), DT_MATCH_TYPE("memory"), /* The memory mapped timer is not supported by Xen. */ @@ -1353,7 +1354,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 +1400,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.