virtio: Complete feature negotation before updating status

lguest (in rusty's use-tun-ringfd patch) assumes that the
guest has updated its feature bits before setting its status
to VIRTIO_CONFIG_S_DRIVER_OK.

That's pretty reasonable, so let's make it so.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Mark McLoughlin and committed by Linus Torvalds b92dea67 0269c5c6

+1 -1
+1 -1
drivers/virtio/virtio.c
··· 124 if (err) 125 add_status(dev, VIRTIO_CONFIG_S_FAILED); 126 else { 127 - add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK); 128 /* They should never have set feature bits beyond 32 */ 129 dev->config->set_features(dev, dev->features[0]); 130 } 131 return err; 132 }
··· 124 if (err) 125 add_status(dev, VIRTIO_CONFIG_S_FAILED); 126 else { 127 /* They should never have set feature bits beyond 32 */ 128 dev->config->set_features(dev, dev->features[0]); 129 + add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK); 130 } 131 return err; 132 }