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] [PATCH V2 1/2] virtio: introduce virtqueue state as basic facility


On Wed, Mar 24, 2021 at 04:15:55PM +0800, Jason Wang wrote:
> å 2021/3/23 äå6:27, Stefan Hajnoczi åé:
> > On Mon, Mar 22, 2021 at 11:47:16AM +0800, Jason Wang wrote:
> > > +The \field{used_wrap_counter} field is the wrap counter that is used
> > > +by the device.
> > > +
> > > +The used state is unnecessary when VIRTIO_RING_F_PACKED is not
> > > +negotiated.
> > > +
> > > +See also \ref{sec:Packed Virtqueues / Driver and Device Ring Wrap Counters}.
> > > +
> > > +\drivernormative{\subsection}{Virtqueue State}{Basic Facilities of a Virtio Device / Virtqueue State}
> > > +
> > > +If VIRTIO_F_QUEUE_STATE has been negotiated, a driver MUST set the
> > > +state of each virtqueue after setting the FEATURE_OK status bit but
> > > +before setting the DRIVER_OK status bit.
> > > +
> > > +If VIRTIO_F_QUEUE_STATE has been negotiated. a driver MUST reset the
> > s/negotiated./negotiated,/
> > 
> > > +device before getting the virtqueue state.
> > Interesting approach, but it makes sense that the device must be stopped
> > before we mess with the queue state :).
> > 
> > I wonder whether requiring the device to keep state across reset will
> > cause issues in the future or for testing/fuzzing.
> > 
> > Another approach would have been to add a new status register bit for
> > pausing the device. That reminds me of vhost.
> 
> 
> That's the way I did here:
> https://lists.oasis-open.org/archives/virtio-comment/202012/msg00027.html

That design seems less risky. I think modifying the semantics of device
reset might end up being a problem. Defining an explicit paused state
for saving/loading state seems cleaner.

Why did you end up switching approaches?

Stefan

Attachment: signature.asc
Description: PGP signature



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