Next in thread → Next in month →

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

From
Fam Zheng <>
Date
2014-04-30T01:00:54+00:00
ID
Thread
Re: [virtio-comment] Public review comment for virtio-v1.0-csprd02: 2.1 Device Status Field
On Tue, 04/29 13:51, Rusty Russell wrote:
> Rusty Russell <> writes:
> > Fam Zheng <> writes:
> >> DEVICE_NEEDS_RESET (16)
> >> Indicate that the device is in an unrecoverable failed state, and need reset.
> 
> Minor point, I chose 64 (closer to FAILED, which is 128) instead.
> 
> >> The driver MUST reset the device upon seeing a set DEVICE_NEEDS_RESET before
> >> doing other operations on this device.
> 
> This implies an extra read on each operation, so I think it's too
> strict.  How about:
> 
>         The driver SHOULD NOT rely on completion of operations of a
>         device if DEVICE_NEEDS_RESET is set.
> 
>         Example: The driver can't assume requests in flight will be
>         completed if DEVICE_NEEDS_RESET is set, nor can it assume that
>         they have not been completed.  A good implementation will try to
>         recover by issuing a reset.
> 
> >> 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.
> 
> I think we can be stricter here, however:
> 
>         The device SHOULD set DEVICE_NEEDS_RESET when it enters an error
>         state that a reset is needed.  After it sets DEVICE_NEEDS_RESET,
>         the device MUST send a device configuration change notification
>         to the driver.

OK, this looks good to me!

Thanks,
Fam

> 
> Here's what I ended up with:
> 
<snip>
Next in thread → Next in month →