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

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-dev message

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


Subject: RE: [virtio-dev] queue_reset register polarity to improve



> From: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
> Sent: Tuesday, April 26, 2022 5:55 AM

> > > The current definition relies on the driver maintaining internal
> > > state (although this could just be assumptions in the code rather
> > > than variables stored in memory) because it cannot determine the
> > > state by reading q_enable and q_reset.
> > >
> > > Introspection may not be important for regular drivers because they
> > > know which previous operations they performed, but in some cases
> > > like driver crash recovery or live migration introspection can be
> > > useful. That said, they can reset the entire device to return to a
> > > known state, if necessary.
> > >
> > > Stefan
> >
> > Sounds like a valid reason, probably a good idea to include in the
> > commit log.
> 
> In this way, in addition to this reason, one is the complexity of the hardware
> state. The other is register polarity, I don't understand what special effect
> this problem has? It seems to be a hardware related problem.

Not sure I follow your comment.
The proposed fix is simple, q_reset register value has to be same regardless of how the queue is reset.
Either reset VQ using q_reset register or VQ during initial reset time or device reset time.
All has to show the same value when q reset is completed regardless of hw/sw/vendor etc.

Adding to Stefan's point, current definition requires little weird state on the device side implementation too.
I showed both the example pseudo code in the commit log based on current and new polarity.
Please check that show that new polarity makes it much easier to implement.


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