From nobody Tue Apr 23 11:02:42 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1561294709; cv=none; d=zoho.com; s=zohoarc; b=dWrsVPTcLVJnxFzrtEZbHyyqbG/WWQGTtOY+hRYXTpthpfsJiQwvF1Sp2sCIZJBFUVH1uM5Wwp4zyghhms6BxkQ81+H7MBG+jbCQx3cqdgL7lfMnAfwSzdlFJBvcgINu0sRDnGgUFJf/7U/9eQb6n4/UVW/eUSLkgRP0d1J/DzA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561294709; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=3az4I1/GWG2ZtY63cfhlYPA2KAeejMWK7HjA3qpOXhk=; b=Yi+3kxpE3RDpXk59uT2eAG14BHqZAa5ozbk50g9niQ8Y4eNx/9NP7GlZbdlGDxBrQsRXKcGVa+aHukWTgvXIUnjdIHGJT1c1pA+QwnPJv6wcdYaqm88hgZk5iCd3BAcqxBS+8zzZvUA4XJKreBFM27pJXwVQRZRg3c58siSOi8U= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1561294709482645.0010080155326; Sun, 23 Jun 2019 05:58:29 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hf23F-000672-1T; Sun, 23 Jun 2019 12:56:57 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hf23D-00066x-Pf for xen-devel@lists.xenproject.org; Sun, 23 Jun 2019 12:56:55 +0000 Received: from mail-pf1-x444.google.com (unknown [2607:f8b0:4864:20::444]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 601f9eca-95b6-11e9-8980-bc764e045a96; Sun, 23 Jun 2019 12:56:54 +0000 (UTC) Received: by mail-pf1-x444.google.com with SMTP id r7so5961484pfl.3 for ; Sun, 23 Jun 2019 05:56:54 -0700 (PDT) Received: from localhost.localdomain ([223.179.152.0]) by smtp.gmail.com with ESMTPSA id k3sm7712338pgo.81.2019.06.23.05.56.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 23 Jun 2019 05:56:52 -0700 (PDT) X-Inumbo-ID: 601f9eca-95b6-11e9-8980-bc764e045a96 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ZCeGcahujoVd3nyx1OqtQFGH4qBrJPCeRTzcnpoiFsk=; b=V/0QkVRKLV6YjT2NtDJ1q6NHWLekYdG4jLtVhBoxc66TeVMhshd+T1q5Tr8KD6HQ/O tkdvYHLTfydhWHy0RN4ruRlHUOQhMMlkSIZcYmYTrYfnGwigVZ7ds6Gydgo/+wk/0wa1 aFJYblPzwODCFAjjs/g6hs02V/bK18Sr4MyIED/88Kc8YK+D8dS/B5OdUCleS8EwDKCR mVgvCcPGfEmWJUPbdyf++R53CSWNycmJcAszzok7/5/PnwMHpHfKHUCDQxKHuaj3jjUv khHLpMLLNfr/OeYV2md+ErNxAPK6+lXgZd5i3ch7pR0bsskrPHu05JacU+UbpTpkOyLm T+Mg== 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=ZCeGcahujoVd3nyx1OqtQFGH4qBrJPCeRTzcnpoiFsk=; b=QNHZbjDAceXgt9glz0YD/GhvXgLJLX/de+OKUOJDrDJw3pTjBDzSKEqE8pI8XXBKZZ fPd2RTfUY3e4NTV+ihNrDGcRODqew5XYUpmYqluof2idNdSJbPYEYDwZ2/4M9mwZt2MF qmn/MY5Xxfk5Ox2/sXZ9FK9h5GagPyBKrYy7t8GopPLhyDXBAuU9Sx0h/i48h5yZnGJj 87WIxyGVS/eyVYlYdXJ2/qM15dZaUEi9/yBFs8YGyGCkXCrbYXMZuzeMIjN8wppcicZG 4P/wxfPTO3xvDFpjF6PQdiF9cAfXarxvkZUF8RlW0nt44n1KSRa+We9w1JppZ6OuTcV0 TBJQ== X-Gm-Message-State: APjAAAWtIL8Sqr9X9RmaH6eYZvfg1dRWV4hTiwAnbuJfGyFYcyVQgE2r rIYHeo+EBM2prMcBInKOAQBlLJjF X-Google-Smtp-Source: APXvYqwafA1QKByFAENVOhPoviKCwhk7XBXXxSENeaFi/pjny8iHwoxW66pt8M6d6Buwvuaw5GMTvw== X-Received: by 2002:a17:90a:2385:: with SMTP id g5mr19078234pje.12.1561294613183; Sun, 23 Jun 2019 05:56:53 -0700 (PDT) From: Amit Singh Tomar To: xen-devel@lists.xenproject.org Date: Sun, 23 Jun 2019 18:26:31 +0530 Message-Id: <1561294591-14867-1-git-send-email-amittomer25@gmail.com> X-Mailer: git-send-email 2.7.4 Subject: [Xen-devel] [PATCH v3] xen/arm: domain_build: Black list devices using PPIs 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Currently, the vGIC is not able to cope with hardware PPIs routed to guests. One of the solutions to this problem is to skip any device that uses PPI source completely while building the domain itself. This patch goes through all the interrupt sources of a device and skip it if one of the interrupts sources is a PPI. It fixes XEN boot on i.MX8MQ by skipping the PMU node. Suggested-by: Julien Grall Signed-off-by: Amit Singh Tomar Acked-by: Julien Grall --- Changes since v2: * Update subject-line for the patch. * Fix commit message. * Add proper comments for changes. Changes since v1: * Added comment for PPIs range. --- xen/arch/arm/domain_build.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index d983677..53935f8 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, struc= t kernel_info *kinfo, { /* sentinel */ }, }; struct dt_device_node *child; - int res; + int res, i, nirq, irq_id; const char *name; const char *path; =20 @@ -1400,6 +1400,24 @@ static int __init handle_node(struct domain *d, stru= ct kernel_info *kinfo, } =20 /* + * The vGIC does not support routing hardware PPIs to guest. So + * we need to skip any node using PPIs. + */ + nirq =3D dt_number_of_irq(node); + + for ( i =3D 0 ; i < nirq ; i++ ) + { + irq_id =3D platform_get_irq(node, i); + + /* PPIs ranges from ID 16 to 31 */ + if ( irq_id >=3D 16 && irq_id < 32 ) + { + dt_dprintk(" Skip it(using PPIs)\n"); + return 0; + } + } + + /* * Xen is using some path for its own purpose. Warn if a node * already exists with the same path. */ --=20 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel