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

vdpa: allow a 32 bit vq alignment



get_vq_align returns u16 now, but that's not enough for
systems/devices with 64K pages. All callers assign it to
a u32 variable anyway, so let's just change the return
value type to u32.

Reported-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 5038a567
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -226,7 +226,7 @@ static u32 ifcvf_vdpa_get_vendor_id(struct vdpa_device *vdpa_dev)
	return IFCVF_SUBSYS_VENDOR_ID;
}

static u16 ifcvf_vdpa_get_vq_align(struct vdpa_device *vdpa_dev)
static u32 ifcvf_vdpa_get_vq_align(struct vdpa_device *vdpa_dev)
{
	return IFCVF_QUEUE_ALIGNMENT;
}
+1 −1
Original line number Diff line number Diff line
@@ -435,7 +435,7 @@ static u64 vdpasim_get_vq_state(struct vdpa_device *vdpa, u16 idx)
	return vrh->last_avail_idx;
}

static u16 vdpasim_get_vq_align(struct vdpa_device *vdpa)
static u32 vdpasim_get_vq_align(struct vdpa_device *vdpa)
{
	return VDPASIM_QUEUE_ALIGN;
}
+1 −1
Original line number Diff line number Diff line
@@ -164,7 +164,7 @@ struct vdpa_config_ops {
	u64 (*get_vq_state)(struct vdpa_device *vdev, u16 idx);

	/* Device ops */
	u16 (*get_vq_align)(struct vdpa_device *vdev);
	u32 (*get_vq_align)(struct vdpa_device *vdev);
	u64 (*get_features)(struct vdpa_device *vdev);
	int (*set_features)(struct vdpa_device *vdev, u64 features);
	void (*set_config_cb)(struct vdpa_device *vdev,