Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d0254773 authored by Michael S. Tsirkin's avatar Michael S. Tsirkin
Browse files

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: default avatarRusty Russell <rusty@rustcorp.com.au>
Signed-off-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: default avatarDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>


parent 0ffaeadf
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -94,7 +94,7 @@ static unsigned desc_size(const struct lguest_device_desc *desc)
}
}


/* This gets the device's feature bits. */
/* This gets the device's feature bits. */
static u32 lg_get_features(struct virtio_device *vdev)
static u64 lg_get_features(struct virtio_device *vdev)
{
{
	unsigned int i;
	unsigned int i;
	u32 features = 0;
	u32 features = 0;
+1 −1
Original line number Original line Diff line number Diff line
@@ -68,7 +68,7 @@ static inline struct device *mic_dev(struct mic_vdev *mvdev)
}
}


/* This gets the device's feature bits. */
/* This gets the device's feature bits. */
static u32 mic_get_features(struct virtio_device *vdev)
static u64 mic_get_features(struct virtio_device *vdev)
{
{
	unsigned int i, bits;
	unsigned int i, bits;
	u32 features = 0;
	u32 features = 0;
+1 −1
Original line number Original line Diff line number Diff line
@@ -207,7 +207,7 @@ static void rproc_virtio_reset(struct virtio_device *vdev)
}
}


/* provide the vdev features as retrieved from the firmware */
/* provide the vdev features as retrieved from the firmware */
static u32 rproc_virtio_get_features(struct virtio_device *vdev)
static u64 rproc_virtio_get_features(struct virtio_device *vdev)
{
{
	struct rproc_vdev *rvdev = vdev_to_rvdev(vdev);
	struct rproc_vdev *rvdev = vdev_to_rvdev(vdev);
	struct fw_rsc_vdev *rsc;
	struct fw_rsc_vdev *rsc;
+1 −1
Original line number Original line Diff line number Diff line
@@ -80,7 +80,7 @@ static unsigned desc_size(const struct kvm_device_desc *desc)
}
}


/* This gets the device's feature bits. */
/* 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;
	unsigned int i;
	u32 features = 0;
	u32 features = 0;
+1 −1
Original line number Original line Diff line number Diff line
@@ -660,7 +660,7 @@ static void virtio_ccw_reset(struct virtio_device *vdev)
	kfree(ccw);
	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_ccw_device *vcdev = to_vc_device(vdev);
	struct virtio_feature_desc *features;
	struct virtio_feature_desc *features;
Loading