OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [virtio-comment] Public review comment for virtio-v1.0-csprd02: 2.1 Device Status Field


Hi Fam!

        This is an interesting idea.  Originally the status field was
entirely owned by the driver, but we already broke this with FEATURES_OK
(which the device can refuse to set).  

I've put this in the bug tracker as VIRTIO-98:

https://tools.oasis-open.org/issues/browse/VIRTIO-98

Thanks,
Rusty.

Fam Zheng <famz@redhat.com> writes:
>> 2.1 Device Status Field
>> 
>> During device initialization by a driver, the driver follows the sequence of
>> steps specified in 3.1.
>> 
>> The device status field provides a simple low-level indication of the
>> completed steps of this sequence. It’s most useful to imagine it hooked up to
>> traffic lights on the console indicating the status of each device. The
>> following bits are defined:
>> 
>> ACKNOWLEDGE (1)
>> Indicates that the guest OS has found the device and recognized it as a valid
>> virtio device.
>> DRIVER (2)
>> Indicates that the guest OS knows how to drive the device. Note: There could
>> be a significant (or infinite) delay before setting this bit. For example,
>> under Linux, drivers can be loadable modules.
>> FEATURES_OK (8)
>> Indicates that the driver has acknowledged all the features it understands,
>> and feature negotiation is complete.
>> DRIVER_OK (4)
>> Indicates that the driver is set up and ready to drive the device.
>> FAILED (128)
>> Indicates that something went wrong in the guest, and it has given up on the
>> device. This could be an internal error, or the driver didn’t like the device
>> for some reason, or even a fatal error during device operation.
>
> There is no bit to indicate the status of device. When device detects errors
> such as: host resource error, device implementation error, invalid input from
> user, invalid command or request from driver, and the error is not recoverable
> for the device, we should be able to communicate this. Suggest add:
>
> DEVICE_NEEDS_RESET (16)
> Indicate that the device is in an unrecoverable failed state, and need reset.
>
>> 2.1.1 Driver Requirements: Device Status Field
>> 
>> The driver MUST update device status, setting bits to indicate the completed
>> steps of the driver initialization sequence specified in 3.1. The driver MUST
>> NOT clear a device status bit. If the driver sets the FAILED bit, the driver
>> MUST later reset the device before attempting to re-initialize.
>
> The driver MUST reset the device upon seeing a set DEVICE_NEEDS_RESET before
> doing other operations on this device.
>
>> 
>> 2.1.2 Device Requirements: Device Status Field
>> 
>> The device MUST initialize device status to 0 upon reset.
>> 
>> The device MUST NOT consume buffers or notify the driver before DRIVER_OK.
>
> The device SHOULD set DEVICE_NEEDS_RESET when it enters an error state that a
> reset is needed, and MAY send a notification of device configuration changes to
> driver.
>
> -- 
> Thanks,
> Fam
>
> This publicly archived list offers a means to provide input to the
> OASIS Virtual I/O Device (VIRTIO) TC.
>
> In order to verify user consent to the Feedback License terms and
> to minimize spam in the list archive, subscription is required
> before posting.
>
> Subscribe: virtio-comment-subscribe@lists.oasis-open.org
> Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
> List help: virtio-comment-help@lists.oasis-open.org
> List archive: https://lists.oasis-open.org/archives/virtio-comment/
> Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
> List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
> Committee: https://www.oasis-open.org/committees/virtio/
> Join OASIS: https://www.oasis-open.org/join/



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]