From patchwork Tue Mar 28 15:53:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijay Kilari X-Patchwork-Id: 9650085 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 75250602C8 for ; Tue, 28 Mar 2017 15:57:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6226424151 for ; Tue, 28 Mar 2017 15:57:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5511428403; Tue, 28 Mar 2017 15:57:45 +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 E984A24151 for ; Tue, 28 Mar 2017 15:57:44 +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 1cstSl-0007mU-EP; Tue, 28 Mar 2017 15:55:15 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cstSk-0007kW-7F for xen-devel@lists.xen.org; Tue, 28 Mar 2017 15:55:14 +0000 Received: from [193.109.254.147] by server-9.bemta-6.messagelabs.com id 3C/25-03420-1678AD85; Tue, 28 Mar 2017 15:55:13 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFIsWRWlGSWpSXmKPExsXiVRvsqJvYfiv C4OF/NoslHxezODB6HN39mymAMYo1My8pvyKBNePOt1+MBfd4KuZfOMvWwPies4uRi0NIYBKj xP0/Z5lAHBaBlywSh899ZOli5OSQEOhnlViyIArCjpE4sbQLKl4hcb1/JxuILSSgKtHx/y07x KRvjBJdbZvZQRJsAjISR54fYAKxRQSkJa59vswIUsQs0Mwk0bd7CVi3sICHRNuKN0A2B9BqVY nVN4tAwrwC7hJfD79lAglLCChIzJlkAxLmBApverKWGWKvm8TtMxcZJzAKLGBkWMWoXpxaVJZ apGuql1SUmZ5RkpuYmaNraGCml5taXJyYnpqTmFSsl5yfu4kRGFYMQLCDcfpl/0OMkhxMSqK8 H4JuRQjxJeWnVGYkFmfEF5XmpBYfYtTg4BDYvHb1BUYplrz8vFQlCd7ENqA6waLU9NSKtMwcY ODDlEpw8CiJ8Na1AqV5iwsSc4sz0yFSpxh1OT70H37DJAQ2Q0qcNwxkhgBIUUZpHtwIWBReYp SVEuZlBDpQiKcgtSg3swRV/hWjOAejkjDvPJApPJl5JXCbXgEdwQR0hLgN2BEliQgpqQbGrRe 2tXHeWD5tSluwkrLzinm7K5/dui9zdOUMR83PcnYOkSUl1ZrS4mFcm+XnmkZNqzz6Yc3Lg07J DgJS7oIl5zeoTtXWF/sY8DHIlJ/nlmxq6rJ7eireBn3ps6teh4f8eHRmI1sGhwlP7ubtnLkXj XxFq2fs+iwaNpn9uuytdPea4Hk6re+UWIozEg21mIuKEwGQ4B0qvQIAAA== X-Env-Sender: vijay.kilari@gmail.com X-Msg-Ref: server-3.tower-27.messagelabs.com!1490716511!93874961!1 X-Originating-IP: [74.125.83.65] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.2.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 38477 invoked from network); 28 Mar 2017 15:55:12 -0000 Received: from mail-pg0-f65.google.com (HELO mail-pg0-f65.google.com) (74.125.83.65) by server-3.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 28 Mar 2017 15:55:12 -0000 Received: by mail-pg0-f65.google.com with SMTP id o123so19570695pga.1 for ; Tue, 28 Mar 2017 08:55:12 -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=qlv1+x2jwohDsdkgy0sBpvyBUHRSeB24/u9by0EdAew=; b=OqRzs/9Cqxcw/j3tuA421eG0CuuxCrKcJgRyGrs6yyHIoOpEhezQxR3Rxfi0ARLh6x xUDV2eI9eShjjxrnMRWjVfN8jGNg4rIqo6V9mc+GLoNeTSnSYAgLvWj9051Wt0pfxneP hCHlHG6dUZ6IU4c5J3Mrpn9j/R4gfIJ76MxHCZE6rbrgvi4srK3UVozUtAf3y9n/msM1 gflNZ/dJtF28hNgIoJoho0YqPQUBnRMHUB1V/Vrec1t9sSTBkHCOzObenG+biSTccrTZ aquEWEUyLuAwae0w0V+/hDzkk3kqsxFX085vBSAEYhF/XiQxwsP0eYPUjsmY1Oy5fNVv 5kqQ== 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=qlv1+x2jwohDsdkgy0sBpvyBUHRSeB24/u9by0EdAew=; b=ExH3TOmaalwSjbj3qveEtUrnfYZUetMu8zqz8McifYpggTZfKPhOUoHWAeddrc6vLW /U5Qm1kr+im4VRVsIsNZXSRF81mc+ynkPFzyilQs+BMnWHnym3Xy9Ee4Rlsc8vWKx2eG u7oh91IvxIIbLMKN8DKyVyKWB/reYFXcmxNsWIxR81V6avPNpeHIJx2WhO6zKdM0HvsE 7eWdlpo9oo7xVcb967hWIhJibX9OyQklB7xPBmya6SEhWi5yyMF4rpa3l435GR1V4Ggu IUbZcnbYTM11NOPppg+ARSGtLBSg8UruKCwQMlejoNXOFN7OcSZJAU+Nx2ilPRQPozjG oipw== X-Gm-Message-State: AFeK/H3xywkHFwj6PKUG5C4xymj/ZLVPdZMqFRmKZot3bzzE/fcKRi/5MWBHGfaCA0pikA== X-Received: by 10.98.29.87 with SMTP id d84mr15461568pfd.68.1490716511412; Tue, 28 Mar 2017 08:55:11 -0700 (PDT) Received: from localhost.localdomain ([14.140.2.178]) by smtp.gmail.com with ESMTPSA id y7sm8298867pfk.93.2017.03.28.08.55.07 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Mar 2017 08:55:10 -0700 (PDT) From: vijay.kilari@gmail.com To: xen-devel@lists.xen.org Date: Tue, 28 Mar 2017 21:23:26 +0530 Message-Id: <1490716413-19796-19-git-send-email-vijay.kilari@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1490716413-19796-1-git-send-email-vijay.kilari@gmail.com> References: <1490716413-19796-1-git-send-email-vijay.kilari@gmail.com> Cc: sstabellini@kernel.org, wei.liu2@citrix.com, George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com, tim@xen.org, julien.grall@arm.com, jbeulich@suse.com, Vijaya Kumar K Subject: [Xen-devel] [RFC PATCH v2 18/25] ARM: NUMA: Do not expose numa info to DOM0 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: Vijaya Kumar K Delete numa-node-id and distance map from DOM0 DT so that NUMA information is not exposed to DOM0. This helps particularly to boot Node 1 devices as if booting on Node0. However this approach has limitation where memory allocation for the devices should be local. Also, do not expose numa distance node to DOM0. Signed-off-by: Vijaya Kumar --- xen/arch/arm/domain_build.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index de59e5f..4a7e645 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -421,6 +421,10 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo, } } + /* Don't expose the property numa to the guest */ + if ( dt_property_name_is_equal(prop, "numa-node-id") ) + continue; + /* Don't expose the property "xen,passthrough" to the guest */ if ( dt_property_name_is_equal(prop, "xen,passthrough") ) continue; @@ -1173,6 +1177,11 @@ static int handle_node(struct domain *d, struct kernel_info *kinfo, DT_MATCH_TYPE("memory"), /* The memory mapped timer is not supported by Xen. */ DT_MATCH_COMPATIBLE("arm,armv7-timer-mem"), + /* + * NUMA info is not exposed to Dom0. + * So, skip distance-map infomation + */ + DT_MATCH_COMPATIBLE("numa-distance-map-v1"), { /* sentinel */ }, }; static const struct dt_device_match timer_matches[] __initconst =