From patchwork Tue Jul 25 17:26:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksandr Tyshchenko X-Patchwork-Id: 9862565 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 DE21A601A1 for ; Tue, 25 Jul 2017 17:30:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D052B286DB for ; Tue, 25 Jul 2017 17:30:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C32B3286E0; Tue, 25 Jul 2017 17:30:07 +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=-3.6 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 0AB9D286F9 for ; Tue, 25 Jul 2017 17:30:04 +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 1da3cB-00009e-Mn; Tue, 25 Jul 2017 17:27:23 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1da3cA-00007V-Mj for xen-devel@lists.xenproject.org; Tue, 25 Jul 2017 17:27:22 +0000 Received: from [193.109.254.147] by server-6.bemta-6.messagelabs.com id A3/E7-03937-A7F77795; Tue, 25 Jul 2017 17:27:22 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFIsWRWlGSWpSXmKPExsVyMfS6i25lfXm kwfdnYhbft0xmcmD0OPzhCksAYxRrZl5SfkUCa0bPq/NMBVO4K+68v8zYwPiBo4uRi0NIYBqj xKc9k9lBHBaBlywSB5a9YQFxJAT6WSWuvT/F1sXICeTESfT/2gRkcwDZVRKfe7NAwkICShKvd 25mgpg0m0ni58oL7CAJNgEDif3vnoDZIkBF91ZNZgKxmYHmdE88ywIyR1ggReLE+WKQMIuAqs SnH4+YQWxeAReJ+09mskCslZO4ea4TLM4JFN/6aRsLxF5nifXHDjBPYBRYwMiwilG9OLWoLLV I11IvqSgzPaMkNzEzR9fQwEwvN7W4ODE9NScxqVgvOT93EyMwrBiAYAfj3U0BhxglOZiURHm/ 6ZZHCvEl5adUZiQWZ8QXleakFh9ilOHgUJLgXV4HlBMsSk1PrUjLzAEGOExagoNHSYT3VS1Qm re4IDG3ODMdInWK0ZLjypV1X5g4phzYDiRfTfj/jUmIJS8/L1VKnNcHZJ4ASENGaR7cOFgUXm KUlRLmZQQ6UIinILUoN7MEVf4VozgHo5IwrzrIFJ7MvBK4ra+ADmICOmjOjFKQg0oSEVJSDYx pWyRXv5+zUHObi/nC+l7lpR/+W6UtZ9gS/uPG1NMy5obyD1IXLLIW/q+QKjbrmO6cvqKze/qc JOdtrHJy6Eif//lGV3rNxeRjUp1vs812bLKOqlxyTUIl/NaBqvkPtRv26YgbpFsfqJd8l5XRo fLryI8FBye5C5zd/XQjc/Py2ynHFY9v2MGoxFKckWioxVxUnAgAQUxBdL0CAAA= X-Env-Sender: olekstysh@gmail.com X-Msg-Ref: server-9.tower-27.messagelabs.com!1501003640!108922166!1 X-Originating-IP: [209.85.215.68] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 24007 invoked from network); 25 Jul 2017 17:27:21 -0000 Received: from mail-lf0-f68.google.com (HELO mail-lf0-f68.google.com) (209.85.215.68) by server-9.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 25 Jul 2017 17:27:21 -0000 Received: by mail-lf0-f68.google.com with SMTP id 65so1225186lfa.0 for ; Tue, 25 Jul 2017 10:27:21 -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:in-reply-to:references; bh=gZTtvf3gijvIPpEQw/1DS+ZoSPOYuV1defCaCBl8a5I=; b=CJf5DMY96WwRb8hFIEFsVyL9xtySoyRCZ/dmW1DkTB/W21+VjGXFJMNRmspWD6ikGw Ax7My8Rb8wzOB0wVwevJyACCu7LoZaXPHEPEhR4X4zCDJGnJJuoTe1YRo2Z7eNboQ+ks HvVOg0HQM8tqXI0GcTbc3cyMEruFc6Qp5fJKm1bp1lS27cUwjjmHHPQoe+uJKpZi/B+k mrXFiFKl/JknvwxYQn1I+57IHm0Zz1CS6XXILAMJxcYDXSOI8ItAhMgYQCWSPrmgFMpt 3KK1c1L4c19CuSp5GnwzWjXpG/Lc5b5wGrceeCoaaT5F+oEjFGmE3ZN9kX61sTxVAqgK jbXw== 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:in-reply-to :references; bh=gZTtvf3gijvIPpEQw/1DS+ZoSPOYuV1defCaCBl8a5I=; b=Ifhrqutp2T+RSh2v1Fj+26DJGgdZYK5lx2JeddKzXxKr4wz7Cpb33efXm8/nl21Yee 6a+olozbbokfFlYekULHK0b/IKQ+Hp8RISX4eVaiXXQKgkNvtCRrCva49B7EBkNJ/EV+ JWfKOA6Fg7z8ERc55MxV+VpiDu6JLV2DyVCY0SHC9/9zjwf9IlCYaoA5NVNVfC+lCIBF /RJnULeapsIv6BZhNwm127nMJDD3BHMwZUhzw0QCXoIv0GiPD+nladOUxoxt2anTrhaz q2MyAE17MftO4LXrGfi1rSHBrvugOwaGWMvCnSqLk4x/2diISCI8iKx4zhipn2T2oRdX 9xkg== X-Gm-Message-State: AIVw111DUMNvxzVCS10DIFJYB9cmU34X0jBIgGQw/DPDqIN1D3gnjIoE LvquKEe/2MmGkzAX X-Received: by 10.25.207.204 with SMTP id f195mr6836729lfg.40.1501003640297; Tue, 25 Jul 2017 10:27:20 -0700 (PDT) Received: from otyshchenko.kyiv.epam.com (ll-59.209.223.85.sovam.net.ua. [85.223.209.59]) by smtp.gmail.com with ESMTPSA id v145sm411748lfa.21.2017.07.25.10.27.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 25 Jul 2017 10:27:19 -0700 (PDT) From: Oleksandr Tyshchenko To: xen-devel@lists.xenproject.org Date: Tue, 25 Jul 2017 20:26:52 +0300 Message-Id: <1501003615-15274-11-git-send-email-olekstysh@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1501003615-15274-1-git-send-email-olekstysh@gmail.com> References: <1501003615-15274-1-git-send-email-olekstysh@gmail.com> Cc: Oleksandr Tyshchenko , Julien Grall Subject: [Xen-devel] [PATCH v2 10/13] xen/arm: domain_build: Don't expose IOMMU specific properties to the guest 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 From: Oleksandr Tyshchenko We don't passthrough IOMMU device to DOM0 even if it is not used by Xen. Therefore exposing the properties that describe relationship between master devices and IOMMUs does not make any sense. According to the: 1. Documentation/devicetree/bindings/iommu/iommu.txt 2. Documentation/devicetree/bindings/pci/pci-iommu.txt Signed-off-by: Oleksandr Tyshchenko CC: Julien Grall Acked-by: Julien Grall --- Changes in v1: - Changes in v2: - Skip optional properties too. - Clarify patch description --- xen/arch/arm/domain_build.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 3abacc0..fadfbbc 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -432,6 +432,16 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo, continue; } + /* Don't expose IOMMU specific properties to the guest */ + if ( dt_property_name_is_equal(prop, "iommus") ) + continue; + + if ( dt_property_name_is_equal(prop, "iommu-map") ) + continue; + + if ( dt_property_name_is_equal(prop, "iommu-map-mask") ) + continue; + res = fdt_property(kinfo->fdt, prop->name, prop_data, prop_len); if ( res )