From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [RFC 09/19] xen/dts: Add hypercalls to retrieve device node information Date: Thu, 19 Jun 2014 13:25:53 +0100 Message-ID: <53A2D6D1.2010603@linaro.org> References: <1402935486-29136-1-git-send-email-julien.grall@linaro.org> <1402935486-29136-10-git-send-email-julien.grall@linaro.org> <53A2D04C.1070708@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WxbPi-0005n7-8m for xen-devel@lists.xenproject.org; Thu, 19 Jun 2014 12:25:58 +0000 Received: by mail-wg0-f46.google.com with SMTP id y10so2227592wgg.5 for ; Thu, 19 Jun 2014 05:25:56 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: ian.campbell@citrix.com, tim@xen.org, Ian Jackson , stefano.stabellini@citrix.com, xen-devel@lists.xenproject.org, Christoffer Dall List-Id: xen-devel@lists.xenproject.org On 06/19/2014 01:21 PM, Stefano Stabellini wrote: >>> I know that we talked about this face to face already, but this troubles >>> me: is it really so uncommon for a device tree node corresponding to a >>> device to have a key-value pair that is critical for the initialization >>> of the device? >> >> I remembered a chat with Christoffer (I think you were in CC) about >> specific device properties. But I can't find it in my mailbox. >> >> I think the idea was Xen provides the generic properties (regs, >> interrupts) and we implement device specific properties in a >> configuration file that could be share with KVM (IIRC, KVM has the same >> needs). > > What configuration file? Where would it live? > I would rather avoid forcing the user to specify these properties in the > VM config file. I meant an host config file. >>> The ACPI on ARM people are discussing how to introduce these key-value >>> pairs in ACPI too, so I wonder if we can really dismiss them so easily >>> for device assignment. >>> >>> Could Xen discard everything that it knows cannot be passed to the guest >>> (information on clocks and phandles for example), but return to the >>> toolstack other harmless key-value pairs, such as device specific >>> configurations? Maybe we could introduce PHYSDEVOP_DTDEV_GET_KEYVALUE. >> >> A blacklist won't work here because Xen may return properties that >> contain a list of phandle (for instance see the SMMU bindings). The name >> of those properties are not necessary generic. >> >> IHMO, need to let the toolstack device whether we need to add specific >> properties. Those properties can be write down in a configuration file >> which will be parsed by the toolstack. > > Could we simply remove anything that contains phandles? Is there a way > to detect if a value is a phandle? A phandle is only a way to interpret a number. AFAIK, there is no way to differentiate it. Regards, -- Julien Grall