virtio: add support for 64 bit features.

Change u32 to u64, and use BIT_ULL and 1ULL everywhere.

Note: transports are unchanged, and only set low 32 bit.
This guarantees that no transport sets e.g. VERSION_1
by mistake without proper support.

Based on patch by Rusty.

Signed-off-by: Rusty Russell <[email protected]>
Signed-off-by: Cornelia Huck <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Reviewed-by: Cornelia Huck <[email protected]>
This commit is contained in:
Michael S. Tsirkin 2014-10-07 16:39:43 +02:00
commit d025477368
11 changed files with 23 additions and 23 deletions

View file

@ -80,7 +80,7 @@ static unsigned desc_size(const struct kvm_device_desc *desc)
}
/* This gets the device's feature bits. */
static u32 kvm_get_features(struct virtio_device *vdev)
static u64 kvm_get_features(struct virtio_device *vdev)
{
unsigned int i;
u32 features = 0;

View file

@ -660,7 +660,7 @@ static void virtio_ccw_reset(struct virtio_device *vdev)
kfree(ccw);
}
static u32 virtio_ccw_get_features(struct virtio_device *vdev)
static u64 virtio_ccw_get_features(struct virtio_device *vdev)
{
struct virtio_ccw_device *vcdev = to_vc_device(vdev);
struct virtio_feature_desc *features;