Skip to content

Commit

Permalink
vdpa: fix VHOST_BACKEND_F_IOTLB_ASID flag check
Browse files Browse the repository at this point in the history
VHOST_BACKEND_F_IOTLB_ASID is the feature bit, not the bitmask. Since
the device under test also provided VHOST_BACKEND_F_IOTLB_MSG_V2 and
VHOST_BACKEND_F_IOTLB_BATCH, this went unnoticed.

Fixes: c1a1008 ("vdpa: always start CVQ in SVQ mode if possible")
Signed-off-by: Eugenio Pérez <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Acked-by: Jason Wang <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
  • Loading branch information
eugpermar authored and jasowang committed Feb 17, 2023
1 parent 148fbf0 commit 525ae11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/vhost-vdpa.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ static int vhost_vdpa_net_cvq_start(NetClientState *nc)
g_strerror(errno), errno);
return -1;
}
if (!(backend_features & VHOST_BACKEND_F_IOTLB_ASID) ||
if (!(backend_features & BIT_ULL(VHOST_BACKEND_F_IOTLB_ASID)) ||
!vhost_vdpa_net_valid_svq_features(v->dev->features, NULL)) {
return 0;
}
Expand Down

0 comments on commit 525ae11

Please sign in to comment.