From patchwork Fri Sep 13 12:49:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 20045 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f198.google.com (mail-vc0-f198.google.com [209.85.220.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7173628E9F for ; Fri, 13 Sep 2013 12:50:04 +0000 (UTC) Received: by mail-vc0-f198.google.com with SMTP id ht10sf1166945vcb.5 for ; Fri, 13 Sep 2013 05:50:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=JJIVAtesCltWSYYiWIm0ACHOeJpCaMO3iR4fvAQWsyg=; b=T2DQxtD84M+n5/h1gUOgG0Eey1vJSb3f9YV7/VIj3Jv6VO/dlRgWyqqMSxbRR6jYng o7g1KYCvFPOwwXMFmE8JO/UHg+jhudeJFwGTUa7F81FBajNvwfXiHqft0Rf/ltmZsb4a R2bxlrsT0yjXQ5+P8cdc1bw/VGKrW9AQRV73cA4cWS3otn7sHwgHODubVlfLZE8UM27Y zs1NIuuJbW7pP2zKSeWrLqjCTMIxT/WgLXKtf30W0ANPe2MQkl8IQ/5Y5xeoVcNFvsHD g3HZ1valzkCOIFhbKEEgY/9WOZX5CmjYDl7298aCmqJ4Lp0ig05ZbA8mhrn6cz5YO1AG H5sw== X-Gm-Message-State: ALoCoQk0S6UnXz3UeBJtDnwbRI67A+GZTZN6Ngj7GRWf6zVAcM9ApUeDmLZLzHf/HeGAQySd1JIb X-Received: by 10.236.145.34 with SMTP id o22mr5139783yhj.22.1379076604152; Fri, 13 Sep 2013 05:50:04 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.81.230 with SMTP id d6ls1159230qey.93.gmail; Fri, 13 Sep 2013 05:50:03 -0700 (PDT) X-Received: by 10.52.170.232 with SMTP id ap8mr83545vdc.40.1379076603910; Fri, 13 Sep 2013 05:50:03 -0700 (PDT) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id se9si3052531vdc.153.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 05:50:03 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.177; Received: by mail-ve0-f177.google.com with SMTP id db12so896742veb.8 for ; Fri, 13 Sep 2013 05:50:03 -0700 (PDT) X-Received: by 10.58.233.173 with SMTP id tx13mr177987vec.31.1379076603832; Fri, 13 Sep 2013 05:50:03 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp78793vcz; Fri, 13 Sep 2013 05:50:03 -0700 (PDT) X-Received: by 10.14.9.72 with SMTP id 48mr17866385ees.42.1379076602525; Fri, 13 Sep 2013 05:50:02 -0700 (PDT) Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com [74.125.83.53]) by mx.google.com with ESMTPS id x45si2539079eey.6.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 05:50:02 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.53 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=74.125.83.53; Received: by mail-ee0-f53.google.com with SMTP id b15so561518eek.12 for ; Fri, 13 Sep 2013 05:50:02 -0700 (PDT) X-Received: by 10.14.225.199 with SMTP id z47mr18370953eep.24.1379076601902; Fri, 13 Sep 2013 05:50:01 -0700 (PDT) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id p5sm14678420eeg.5.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 05:50:01 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Cc: stefano.stabellini@eu.citrix.com, ian.campbell@citrix.com, patches@linaro.org, andre.przywara@linaro.org, Julien Grall Subject: [PATCH v4 20/27] xen/arm: Remove devices used by Xen from dom0 device tree Date: Fri, 13 Sep 2013 13:49:27 +0100 Message-Id: <1379076574-28316-21-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1379076574-28316-1-git-send-email-julien.grall@linaro.org> References: <1379076574-28316-1-git-send-email-julien.grall@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Devices used by Xen should not be pass-through to dom0. If the device is really usefull for dom0 (for instance the timer and the GIC), it will recreate the node. Signed-off-by: Julien Grall --- xen/arch/arm/domain_build.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 300a64d..82003c1 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -677,7 +677,8 @@ static int handle_node(struct domain *d, struct kernel_info *kinfo, /* Skip theses nodes and the sub-nodes */ if ( dt_match_node(skip_matches, np ) || - platform_device_is_blacklisted(np) ) + platform_device_is_blacklisted(np) || + dt_device_used_by(np) == DOMID_XEN ) { DPRINT(" Skip it!\n"); return 0; @@ -685,15 +686,13 @@ static int handle_node(struct domain *d, struct kernel_info *kinfo, /* * Some device doesn't need to be mapped in Xen: - * - Device used by Xen: Obviously dom0 can't use them * - Memory: the guest will see a different view of memory. It will * be allocated later. * - Disabled device: Linux is able to cope with status="disabled" * property. Therefore these device doesn't need to be mapped. This * solution can be use later for pass through. */ - if ( dt_device_used_by(np) != DOMID_XEN && - !dt_device_type_is_equal(np, "memory") && + if ( !dt_device_type_is_equal(np, "memory") && dt_device_is_available(np) ) { res = map_device(d, np);