]> git.baikalelectronics.ru Git - kernel.git/commit
virtio: meet virtio spec by finalizing features before using device
authorRusty Russell <rusty@rustcorp.com.au>
Sat, 13 Jun 2009 04:16:35 +0000 (22:16 -0600)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 12 Jun 2009 12:46:35 +0000 (22:16 +0930)
commitae2df39abd15746170e46522319e239cc6d05e81
tree841d0b0bcd8a5f72f8d8bdc455672d9a6e7468ca
parente8f7e738a6d170b296d1951c52eb5b079533fda1
virtio: meet virtio spec by finalizing features before using device

Virtio devices are supposed to negotiate features before they start using
the device, but the current code doesn't do this.  This is because the
driver's probe() function invariably has to add buffers to a virtqueue,
or probe the disk (virtio_blk).

This currently doesn't matter since no existing backend is strict about
the feature negotiation.  But it's possible to imagine a future feature
which completely changes how a device operates: in this case, we'd need
to acknowledge it before using the device.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/virtio/virtio.c