On Thu, Oct 26, 2023 at 09:22:25AM +0000, Parav Pandit wrote:
>
> > From: Michael S. Tsirkin <>
> > Sent: Thursday, October 26, 2023 2:48 PM
> >
> > On Thu, Oct 26, 2023 at 08:38:51AM +0000, Parav Pandit wrote:
> > > > 2 can be solved if we allow resetting a queue before DRIVER_OK,
> > > This is just the hack of enabling and reset for no apparent gain.
> > > Future devices may have many queues and enabling 1000 queues, resetting
> > them is just an ugly interface.
> >
> > Yes I can't say I love it either. The main driver is to try and make it possible for
> > device to know in advance the max # of queues that will be used. We could
> > alternatively just add this in a config register maybe?
>
> I didn't follow your suggestion - what you want to add in the config register?
The reason devices want vqs to be enabled before DRIVER_OK is so that
they can preallocate device resources. Problems with this:
- no way to fail
- wasting driver resources too
Idea: a new writeable common config space register max_vqs +
a way for device to fail. Maybe set it before FEATURES_OK?
--
MST