All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Schopp <joel.schopp@amd.com>
To: Antonios Motakis <a.motakis@virtualopensystems.com>,
	alex.williamson@redhat.com, kvmarm@lists.cs.columbia.edu,
	iommu@lists.linux-foundation.org
Cc: tech@virtualopensystems.com, a.rigo@virtualopensystems.com,
	kvm@vger.kernel.org, christoffer.dall@linaro.org,
	will.deacon@arm.com, kim.phillips@freescale.com,
	stuart.yoder@freescale.com, eric.auger@linaro.org,
	marc.zyngier@arm.com
Subject: Re: [RFC 0/4] VFIO: PLATFORM: Return device tree info for a platform device node
Date: Tue, 19 Aug 2014 15:27:24 -0500	[thread overview]
Message-ID: <53F3B32C.6080101@amd.com> (raw)
In-Reply-To: <1407927740-14993-1-git-send-email-a.motakis@virtualopensystems.com>


> This RFC's intention is to show what an interface to access device node
> properties for VFIO_PLATFORM can look like.
>
> If a device tree node corresponding to a platform device bound by VFIO_PLATFORM
> is available, this patch series will allow the user to query the properties
> associated with this device node. This can be useful for userspace drivers
> to automatically query parameters related to the device.
>
> An API to return data from a device's device tree has been proposed before on
> these lists. The API proposed here is slightly different.
>
> Properties to parse from the device tree are not indexed by a numerical id.
> The host system doesn't guarantee any specific ordering for the available
> properties, or that those will remain the same; while this does not happen in
> practice, there is nothing from the host changing the device nodes during
> operation. So properties are accessed by property name.
>
> The type of the property accessed must also be known by the user. Properties
> types implemented in this RFC:
> - VFIO_DEVTREE_ARR_TYPE_STRING (strings sepparated by the null character)
> - VFIO_DEVTREE_ARR_TYPE_U32
> - VFIO_DEVTREE_ARR_TYPE_U16
> - VFIO_DEVTREE_ARR_TYPE_U8
>
> These can all be access by the ioctl VFIO_DEVICE_GET_DEVTREE_INFO. A new ioctl
> was preferred instead of shoehorning the functionality in VFIO_DEVICE_GET_INFO.
> The structure exchanged looks like this:

You'll have to forgive my ignorance on the history.  But with the dtc
tool already supporting a filesystem representation (--in-format=fs),
with the dtc tool source already built into qemu, and having an example
implementation of such an interface in /proc/device-tree/ why is an
ioctl interface preferred over a filesystem interface? 


WARNING: multiple messages have this Message-ID (diff)
From: Joel Schopp <joel.schopp@amd.com>
To: Antonios Motakis <a.motakis@virtualopensystems.com>,
	<alex.williamson@redhat.com>, <kvmarm@lists.cs.columbia.edu>,
	<iommu@lists.linux-foundation.org>
Cc: <tech@virtualopensystems.com>, <a.rigo@virtualopensystems.com>,
	<kvm@vger.kernel.org>, <christoffer.dall@linaro.org>,
	<will.deacon@arm.com>, <kim.phillips@freescale.com>,
	<stuart.yoder@freescale.com>, <eric.auger@linaro.org>,
	<marc.zyngier@arm.com>
Subject: Re: [RFC 0/4] VFIO: PLATFORM: Return device tree info for a platform device node
Date: Tue, 19 Aug 2014 15:27:24 -0500	[thread overview]
Message-ID: <53F3B32C.6080101@amd.com> (raw)
In-Reply-To: <1407927740-14993-1-git-send-email-a.motakis@virtualopensystems.com>


> This RFC's intention is to show what an interface to access device node
> properties for VFIO_PLATFORM can look like.
>
> If a device tree node corresponding to a platform device bound by VFIO_PLATFORM
> is available, this patch series will allow the user to query the properties
> associated with this device node. This can be useful for userspace drivers
> to automatically query parameters related to the device.
>
> An API to return data from a device's device tree has been proposed before on
> these lists. The API proposed here is slightly different.
>
> Properties to parse from the device tree are not indexed by a numerical id.
> The host system doesn't guarantee any specific ordering for the available
> properties, or that those will remain the same; while this does not happen in
> practice, there is nothing from the host changing the device nodes during
> operation. So properties are accessed by property name.
>
> The type of the property accessed must also be known by the user. Properties
> types implemented in this RFC:
> - VFIO_DEVTREE_ARR_TYPE_STRING (strings sepparated by the null character)
> - VFIO_DEVTREE_ARR_TYPE_U32
> - VFIO_DEVTREE_ARR_TYPE_U16
> - VFIO_DEVTREE_ARR_TYPE_U8
>
> These can all be access by the ioctl VFIO_DEVICE_GET_DEVTREE_INFO. A new ioctl
> was preferred instead of shoehorning the functionality in VFIO_DEVICE_GET_INFO.
> The structure exchanged looks like this:

You'll have to forgive my ignorance on the history.  But with the dtc
tool already supporting a filesystem representation (--in-format=fs),
with the dtc tool source already built into qemu, and having an example
implementation of such an interface in /proc/device-tree/ why is an
ioctl interface preferred over a filesystem interface? 


  parent reply	other threads:[~2014-08-19 20:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-13 11:02 [RFC 0/4] VFIO: PLATFORM: Return device tree info for a platform device node Antonios Motakis
     [not found] ` <1407927740-14993-1-git-send-email-a.motakis-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>
2014-08-13 11:02   ` [PATCH 1/4] VFIO: PLATFORM: Add device tree info API and skeleton Antonios Motakis
2014-08-13 11:02     ` Antonios Motakis
2014-08-13 11:02     ` Antonios Motakis
2014-08-13 11:02   ` [PATCH 2/4] VFIO: PLATFORM: DEVTREE: Return available property names Antonios Motakis
2014-08-13 11:02     ` Antonios Motakis
2014-08-13 11:02   ` [PATCH 3/4] VFIO: PLATFORM: DEVTREE: Access property as a list of strings Antonios Motakis
2014-08-13 11:02     ` Antonios Motakis
2014-08-13 11:02   ` [PATCH 4/4] VFIO: PLATFORM: DEVTREE: Return arrays of u32, u16, or u8 Antonios Motakis
2014-08-13 11:02     ` Antonios Motakis
2014-08-19 20:27 ` Joel Schopp [this message]
2014-08-19 20:27   ` [RFC 0/4] VFIO: PLATFORM: Return device tree info for a platform device node Joel Schopp
     [not found]   ` <53F3B32C.6080101-5C7GfCeVMHo@public.gmane.org>
2014-08-21 12:19     ` Antonios Motakis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53F3B32C.6080101@amd.com \
    --to=joel.schopp@amd.com \
    --cc=a.motakis@virtualopensystems.com \
    --cc=a.rigo@virtualopensystems.com \
    --cc=alex.williamson@redhat.com \
    --cc=christoffer.dall@linaro.org \
    --cc=eric.auger@linaro.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=kim.phillips@freescale.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=marc.zyngier@arm.com \
    --cc=stuart.yoder@freescale.com \
    --cc=tech@virtualopensystems.com \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.