From patchwork Tue Sep 10 14:49:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 19922 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6A730246A4 for ; Tue, 10 Sep 2013 14:49:52 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id c14sf8075982vea.5 for ; Tue, 10 Sep 2013 07:49:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state: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=OeALzjTIMXrApIn5SbiqjoPlqcbUH8Zes90OeKGW0jw=; b=GUERinHjm+ZfAooIE+L8xlhCi0GstX0IE+GMp8+ZuTJY17rOZNyREmFWzw5X/Kz5D8 VOj46jCDZzAJ+3b9MoRs0KnXWXpiIx2QRUQwB2VTHEStq/+ODuJKdkYWGXUAPQaPtEGB XfRlk64+uUU54a/uTbPOD9LaSeNhnBGPLlFfPukVTg+l+HQ9MqxJJwWbG3l+3pUXDLp+ fXD90OTFj0mg/zyV+iRELgl1CIbEMfrQhqiXVy938uAxbe3biSk/4CUAIeF2E+s1Z66y V4UX+wXjw30qbkkO8f80Eg5HBhXWAUrO2gk0+kEBtj1NCphy/KR3uOWKurdlVwAYFdnV 5OmQ== X-Received: by 10.236.45.102 with SMTP id o66mr3300446yhb.47.1378824592238; Tue, 10 Sep 2013 07:49:52 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.108.7 with SMTP id hg7ls2205615qeb.95.gmail; Tue, 10 Sep 2013 07:49:52 -0700 (PDT) X-Received: by 10.220.145.75 with SMTP id c11mr864626vcv.30.1378824591965; Tue, 10 Sep 2013 07:49:51 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id l1si4516989vcl.139.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Sep 2013 07:49:51 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id ht10so5207756vcb.10 for ; Tue, 10 Sep 2013 07:49:51 -0700 (PDT) X-Gm-Message-State: ALoCoQmL44tQs6WYZ5+KGe3J5vtuoRn8zEyoAW+2fe/1Uo4LpOdkyeHiMU/Ldrrwg0QaNYN/tbp7 X-Received: by 10.52.23.113 with SMTP id l17mr7458846vdf.23.1378824591889; Tue, 10 Sep 2013 07:49:51 -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 u4csp4673vcz; Tue, 10 Sep 2013 07:49:51 -0700 (PDT) X-Received: by 10.14.223.134 with SMTP id v6mr338408eep.88.1378824590729; Tue, 10 Sep 2013 07:49:50 -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 7si15334070eeu.68.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Sep 2013 07:49:50 -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 b15so3961379eek.40 for ; Tue, 10 Sep 2013 07:49:49 -0700 (PDT) X-Received: by 10.15.67.131 with SMTP id u3mr39266373eex.34.1378824589649; Tue, 10 Sep 2013 07:49:49 -0700 (PDT) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id i1sm31911644eeg.0.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Sep 2013 07:49:49 -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 v3 20/27] xen/arm: Remove devices used by Xen from dom0 device tree Date: Tue, 10 Sep 2013 15:49:08 +0100 Message-Id: <1378824555-16564-21-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1378824555-16564-1-git-send-email-julien.grall@linaro.org> References: <1378824555-16564-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.220.179 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 8da71f2..55bbee8 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -656,7 +656,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; @@ -664,15 +665,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);