On Fri, Sep 09, 2016 at 04:14:59PM +0200, Maxime Coquelin wrote:
> Currently, devices are plugged before features are negotiated.
> If the backend doesn't support VIRTIO_F_VERSION_1, the transport
> need to rewind some settings.
>
> This is the case for both PCI and CCW.
> For CCW, a post_plugged callback had been introduced, where
> max_rev field is just updated if VIRTIO_F_VERSION_1 is not
> supported by the backend.
> For PCI, implementing the post_plugged would be much more
> complicated, so the current fix consists in checking whether
> the backend supports VIRTIO_F_VERSION_1 in the backend.
>
> This patch propose to replace existing solutions with a common
> approach by negociating features before ->device_plugged() is
> called. A pre_plugged callback is introduced so that the
> transports can set their supported features.
>
> Cc: Cornelia Huck <address@hidden>
> Cc: Marcel Apfelbaum <address@hidden>
> Cc: Michael S. Tsirkin <address@hidden>
> Signed-off-by: Maxime Coquelin <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
Looks good - can you pls test and post a non-RFC?