summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bhyve
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2015-05-11 21:24:10 +0000
committergrehan <grehan@FreeBSD.org>2015-05-11 21:24:10 +0000
commitcbd45b5dc8762dcbf2f18282420529ea2b3635e1 (patch)
treee134a15dec2908367a618ab36949654d7ddf06eb /usr.sbin/bhyve
parent42a03d267cf7184208e54872b2d0744656140cd2 (diff)
downloadFreeBSD-src-cbd45b5dc8762dcbf2f18282420529ea2b3635e1.zip
FreeBSD-src-cbd45b5dc8762dcbf2f18282420529ea2b3635e1.tar.gz
Handling indirect descriptors is a capability of the host and
not one that needs to be negotiated. Use the host capabilities field and not the negotiated field when verifying that indirect descriptors are supported. Found with the Redhat Windows viostor driver, which clears the indirect capability in the negotiated caps and then starts using them. Reported and tested by: Leon Dang (ldang@nahannisys.com) MFC after: 2 weeks
Diffstat (limited to 'usr.sbin/bhyve')
-rw-r--r--usr.sbin/bhyve/virtio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/bhyve/virtio.c b/usr.sbin/bhyve/virtio.c
index 41a9e42..11b1e62 100644
--- a/usr.sbin/bhyve/virtio.c
+++ b/usr.sbin/bhyve/virtio.c
@@ -316,7 +316,7 @@ vq_getchain(struct vqueue_info *vq, uint16_t *pidx,
if ((vdir->vd_flags & VRING_DESC_F_INDIRECT) == 0) {
_vq_record(i, vdir, ctx, iov, n_iov, flags);
i++;
- } else if ((vs->vs_negotiated_caps &
+ } else if ((vs->vs_vc->vc_hv_caps &
VIRTIO_RING_F_INDIRECT_DESC) == 0) {
fprintf(stderr,
"%s: descriptor has forbidden INDIRECT flag, "
OpenPOWER on IntegriCloud