On 12/02/2015 05:43 PM, Michael S. Tsirkin wrote: > On Wed, Dec 02, 2015 at 03:09:58PM +0100, Cornelia Huck wrote: >> If you run a qemu advertising VERSION_1 with an old kernel where >> vhost did not yet support VERSION_1, you'll end up with a device >> that is {modern pci|ccw revision 1} but does not advertise VERSION_1. >> This is not a sensible configuration and is rejected by the Linux >> guest drivers. >> >> To fix this, add a ->post_plugged() callback invoked after features >> have been queried that can handle the VERSION_1 bit being withdrawn >> and change pci (only setup modern if VERSION_1 is still present) and >> ccw (fall back to revision 0 if VERSION_1 is gone). >> >> Signed-off-by: Cornelia Huck <cornelia.h...@de.ibm.com> > > > Unfortunately this is too late: we need to know > whether modern will be supported to know whether > to add the pci express capability :(
I can at least confirm that this patch "fixes" the guest error message virtio_net virtio0: virtio: device uses modern interface but does not have VIRTIO_F_VERSION_1 virtio_net: probe of virtio0 failed with error -22 is gone. but yes, its not enough for the other aspects. > > Maybe this should be moved into plugged > callback?