From patchwork Wed Aug 28 14:47:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 19590 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f197.google.com (mail-vc0-f197.google.com [209.85.220.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C36BC25E58 for ; Wed, 28 Aug 2013 14:48:57 +0000 (UTC) Received: by mail-vc0-f197.google.com with SMTP id ha11sf6778304vcb.4 for ; Wed, 28 Aug 2013 07:48:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; 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=bvUHui9q1vIZ002ZEsrt1D3XqWZDkaoTgpSoIHSWGFw=; b=cBcLpxgWu+LSH70aes7kyak1iVV27z9KbnH9dJytBH2XCWmOcQU53lPzCC18tJI/6d 6TAicy5qjORMTZCSiKLdlXbt+CDIDmCY/HX6EAk2WCFeXWquPYbE9hbAdsRrtglhcAN2 geG11gg6TKifVjEh94QwmUBDUmolfDfMbcfgKxM4yA0etyi/f9KazpyxhYO/KqRiOYtd Fioq1dilpY7agNddyvQB2JAvLdGwGC4OSPSsE4s/9jC9sWuZlDGmaQgDwEkTCwD8w+KF bcKZx5n+3xpiLSp5SM+RS0/McO/+HBYtz+m+HtZgpAmf6p46pVNynuyzosrWQUVMc98+ A69Q== X-Received: by 10.236.115.198 with SMTP id e46mr10794733yhh.33.1377701337546; Wed, 28 Aug 2013 07:48:57 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.42.39 with SMTP id k7ls410034qel.52.gmail; Wed, 28 Aug 2013 07:48:57 -0700 (PDT) X-Received: by 10.52.96.100 with SMTP id dr4mr21493042vdb.17.1377701337418; Wed, 28 Aug 2013 07:48:57 -0700 (PDT) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx.google.com with ESMTPS id b6si6626436veo.60.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 Aug 2013 07:48:57 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.54 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.54; Received: by mail-vb0-f54.google.com with SMTP id q14so4061897vbe.41 for ; Wed, 28 Aug 2013 07:48:57 -0700 (PDT) X-Gm-Message-State: ALoCoQn9CX7Qt4xIu4BGmGQgdJgijK6iDEfhJPLjvmWTgypvBLWSUmWgNytUKmwnpNHg9/bMUCGZ X-Received: by 10.58.100.234 with SMTP id fb10mr26223435veb.5.1377701337347; Wed, 28 Aug 2013 07:48:57 -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 u4csp359986vcz; Wed, 28 Aug 2013 07:48:50 -0700 (PDT) X-Received: by 10.194.109.68 with SMTP id hq4mr20638601wjb.12.1377701324734; Wed, 28 Aug 2013 07:48:44 -0700 (PDT) Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by mx.google.com with ESMTPS id jw4si9510273wjc.123.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 Aug 2013 07:48:44 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.169 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=209.85.212.169; Received: by mail-wi0-f169.google.com with SMTP id l12so6845746wiv.0 for ; Wed, 28 Aug 2013 07:48:44 -0700 (PDT) X-Received: by 10.194.176.163 with SMTP id cj3mr20474589wjc.8.1377701311161; Wed, 28 Aug 2013 07:48:31 -0700 (PDT) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id a8sm5590498wie.6.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 Aug 2013 07:48:30 -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 V1 18/29] xen/arm: Don't map disabled device in DOM0 Date: Wed, 28 Aug 2013 15:47:32 +0100 Message-Id: <1377701263-3319-19-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1377701263-3319-1-git-send-email-julien.grall@linaro.org> References: <1377701263-3319-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.212.54 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: , Linux should cope with 'status = "disabled"' in the Device Tree. This solution can be used later to pass-through device to a specific guest. Signed-off-by: Julien Grall --- Changes in v2: - Add a comment --- xen/arch/arm/domain_build.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index d56bc70a..11f247b 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -416,9 +416,13 @@ static int handle_node(struct domain *d, struct kernel_info *kinfo, * - 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") ) + !dt_device_type_is_equal(np, "memory") && + dt_device_is_available(np) ) { res = map_device(d, np);