[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [PATCH v7 13/13] newdevice: Extend informative guidance on capabilities, resources
Add few informative guidance/notes about which use cases to use device capabilities, and device resources. Fixes: https://github.com/oasis-tcs/virtio-spec/issues/179 Signed-off-by: Parav Pandit <parav@nvidia.com> --- newdevice.tex | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/newdevice.tex b/newdevice.tex index 93feb71..fc10632 100644 --- a/newdevice.tex +++ b/newdevice.tex @@ -26,6 +26,29 @@ \section{What Device Configuration Space Layout?}\label{sec:Creating New Device writable by the driver. Therefore, no writeable field which triggers an action ought to be wider than 32 bits. +\section{When to use Device Resource?}\label{sec:Creating New Device Types or Extending the Device / When to use Device Resource?} +For a desired functionality if majority of fields are configured by the +driver, or if device sets majority of fields which are changing often and +driver wants to query them, in both of those cases, using a device +resource is preferred. + +Even if such functionality is limited to small count as small as one, +using a device resource can be helpful with large number of devices. + +\section{When to use the Capabilities?}\label{sec:Creating New Device Types or Extending the Device / When to use the Capabilities?} +Any field which is more than a bit that a device want to expose to the +driver, can be exposed as a device capability. Device and driver +capabilities are not constantly changing fields during the life cycle +of the driver and device; capabilities are rarely changing parameters +used during the life time of driver possibly dynamically. Sometimes a +system may have many similar devices, but each device may have different +attributes, it is better to use capabilities for such attributes as well. + +\section{Read only attributes as capabilities?}\label{sec:Creating New Device Types or Extending the Device / Read only attributes as capabilities?} +If there are one or more device attributes which are read only for the driver, +they can also be used as device capabilities. They must be documented as +read only so that driver do not try to change them. + \section{What Device Number?}\label{sec:Creating New Device Types or Extending the Device / What Device Number?} Device numbers for the new devices can be reserved by the OASIS committee: email -- 2.34.1
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]