[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [virtio] [PATCH v2] initialization: add extra device status handshake
On Wed, Sep 25, 2013 at 10:18:10AM +0200, Paolo Bonzini wrote: > Il 25/09/2013 09:49, Michael S. Tsirkin ha scritto: > >> > + > >> > +8. The DRIVER_OK status bit is set. This is simply informational, > >> > + as the device may already be active at this point. > > > > So we have a separate issue I think: there's lots > > of device specific configuration that really > > would benefit from "OK now go" bit. > > > > For example, we register network device and we > > really don't want e.g. config interrupts before that is done. > > > > Also qemu relied on DRIVER_OK to kick off vhost net and > > vhost scsi. > > True, but that is wrong. The virtio-scsi driver had to be modified to > support vhost-scsi, because it used the virtqueues before setting > DRIVER_OK and this didn't work with vhost-scsi. This was ugly. > > The right thing to do would be to start vhost upon the driver setting > FEATURES_OK. With current proposal, this makes things very hard for the implementation: we can't support this easily because rings are not yet setup (not even sized) on FEATURES_OK. We really want a flag that says "rings are now setup". > Failure to start vhost (which is fatal for vhost-scsi, > since there is no userspace fallback unlike vhost-net) could be reported > by not acknowledging FEATURES_OK. > > Paolo I think what you are asking for really, is DEVICE_OK flag that locks both features and rings and enables device. It would have to be set from driver quite late in life. -- MST
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]