bhyve/virtio: check negotiated_caps for indirect descriptor support
vq_getchain() erroneously checked vc_hv_caps for indirect descriptor support when it encountered an indirect descriptor. vc_hv_caps is used in feature negotiation to advertise what features our device emulation supports, but we should really check what features we have negotiated with the driver. Reviewed by: corvink Differential Revision: https://reviews.freebsd.org/D53465
This commit is contained in:
@@ -331,7 +331,7 @@ vq_getchain(struct vqueue_info *vq, struct iovec *iov, int niov,
|
||||
if ((vdir->flags & VRING_DESC_F_INDIRECT) == 0) {
|
||||
_vq_record(i, vdir, ctx, iov, niov, &req);
|
||||
i++;
|
||||
} else if ((vs->vs_vc->vc_hv_caps &
|
||||
} else if ((vs->vs_negotiated_caps &
|
||||
VIRTIO_RING_F_INDIRECT_DESC) == 0) {
|
||||
EPRINTLN(
|
||||
"%s: descriptor has forbidden INDIRECT flag, "
|
||||
|
||||
Reference in New Issue
Block a user