virtio: add feature checking helpers
commitef546f1275f6563e8934dd5e338d29d9f9909ca6
authorCornelia Huck <cornelia.huck@de.ibm.com>
Thu, 11 Dec 2014 13:25:06 +0000 (11 14:25 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 26 Feb 2015 12:04:07 +0000 (26 13:04 +0100)
tree49f88ac3f5533f612a0e9f93be451c54edd41917
parent0cd09c3a6cc2230ba38c462fc410b4acce59eb6f
virtio: add feature checking helpers

Add a helper function for checking whether a bit is set in the guest
features for a vdev as well as one that works on a feature bit set.

Convert code that open-coded this: It cleans up the code and makes it
easier to extend the guest feature bits.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/block/virtio-blk.c
hw/char/virtio-serial-bus.c
hw/net/virtio-net.c
hw/scsi/virtio-scsi.c
hw/virtio/dataplane/vring.c
hw/virtio/virtio-balloon.c
hw/virtio/virtio.c
include/hw/virtio/virtio.h