lkml.org 
[lkml]   [2022]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 1/5] vfio: Add the device features for the low power entry and exit
On Tue, Jul 26, 2022 at 06:17:18PM +0530, Abhishek Sahu wrote:
> Thanks Alex for your thorough review of uAPI.
> I have incorporated all the suggestions.
> Following is the updated uAPI.
>
> /*
> * Upon VFIO_DEVICE_FEATURE_SET, allow the device to be moved into a low power
> * state with the platform-based power management. Device use of lower power
> * states depends on factors managed by the runtime power management core,
> * including system level support and coordinating support among dependent
> * devices. Enabling device low power entry does not guarantee lower power
> * usage by the device, nor is a mechanism provided through this feature to
> * know the current power state of the device. If any device access happens
> * (either from the host or through the vfio uAPI) when the device is in the
> * low power state, then the host will move the device out of the low power
> * state as necessary prior to the access. Once the access is completed, the
> * device may re-enter the low power state. For single shot low power support
> * with wake-up notification, see
> * VFIO_DEVICE_FEATURE_LOW_POWER_ENTRY_WITH_WAKEUP below. Access to mmap'd
> * device regions is disabled on LOW_POWER_ENTRY and may only be resumed after
> * calling LOW_POWER_EXIT.
> */
> #define VFIO_DEVICE_FEATURE_LOW_POWER_ENTRY 3
>
> /*
> * This device feature has the same behavior as
> * VFIO_DEVICE_FEATURE_LOW_POWER_ENTRY with the exception that the user
> * provides an eventfd for wake-up notification.

It feels like this should be one entry point instead of two.

A flag "automatic re-sleep" and an optional eventfd (-1 means not
provided) seems to capture both of these behaviors in a bit clearer
and extendable way.

Jason

\
 
 \ /
  Last update: 2022-07-26 19:25    [W:0.106 / U:0.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site