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:
Hans Rosenfeld
2026-02-05 13:48:10 -05:00
committed by Ed Maste
parent b773da180e
commit 5379c46277
+1 -1
View File
@@ -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, "