mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 17:23:55 +08:00
vdpa: Consider device id larger than 31
virtio device id value can be more than 31. Hence, use BIT_ULL in
assignment.
Fixes: 33b347503f
("vdpa: Define vdpa mgmt device, ops and a netlink interface")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Parav Pandit <parav@nvidia.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20211130042949.88958-1-parav@nvidia.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
1db8f5fc2e
commit
bb47620be3
@ -404,7 +404,8 @@ static int vdpa_mgmtdev_fill(const struct vdpa_mgmt_dev *mdev, struct sk_buff *m
|
||||
goto msg_err;
|
||||
|
||||
while (mdev->id_table[i].device) {
|
||||
supported_classes |= BIT(mdev->id_table[i].device);
|
||||
if (mdev->id_table[i].device <= 63)
|
||||
supported_classes |= BIT_ULL(mdev->id_table[i].device);
|
||||
i++;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user