diff options
author | Stefan Fritsch <sf@cvs.openbsd.org> | 2019-01-19 16:21:01 +0000 |
---|---|---|
committer | Stefan Fritsch <sf@cvs.openbsd.org> | 2019-01-19 16:21:01 +0000 |
commit | 337aac4d274499bb74eed25291a9203fac2bf4e0 (patch) | |
tree | 969a57dcd1c589c8d3a9528e7ae751259f3cdaf0 /sys/dev/pv/viomb.c | |
parent | 94494d631ae1f444f2bf4f608b434600435b9aed (diff) |
viomb: tweak feature negotiation
VIRTIO_F_RING_INDIRECT_DESC is always negotiated by the transport
driver, no need to specify it explicitly.
VIRTIO_BALLOON_F_MUST_TELL_HOST is not offered but is handled in the
code. Offer it during negotiation, too.
Diffstat (limited to 'sys/dev/pv/viomb.c')
-rw-r--r-- | sys/dev/pv/viomb.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/dev/pv/viomb.c b/sys/dev/pv/viomb.c index 98c595dc2e2..0dbb812de25 100644 --- a/sys/dev/pv/viomb.c +++ b/sys/dev/pv/viomb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: viomb.c,v 1.2 2019/01/08 16:23:01 sf Exp $ */ +/* $OpenBSD: viomb.c,v 1.3 2019/01/19 16:21:00 sf Exp $ */ /* $NetBSD: viomb.c,v 1.1 2011/10/30 12:12:21 hannken Exp $ */ /* @@ -136,7 +136,6 @@ viomb_attach(struct device *parent, struct device *self, void *aux) { struct viomb_softc *sc = (struct viomb_softc *)self; struct virtio_softc *vsc = (struct virtio_softc *)parent; - u_int32_t features; int i; if (vsc->sc_child != NULL) { @@ -159,10 +158,8 @@ viomb_attach(struct device *parent, struct device *self, void *aux) vsc->sc_ipl = IPL_BIO; vsc->sc_config_change = viomb_config_change; - /* negotiate features */ - features = VIRTIO_F_RING_INDIRECT_DESC; - features = virtio_negotiate_features(vsc, features, - viomb_feature_names); + virtio_negotiate_features(vsc, VIRTIO_BALLOON_F_MUST_TELL_HOST, + viomb_feature_names); if ((virtio_alloc_vq(vsc, &sc->sc_vq[VQ_INFLATE], VQ_INFLATE, sizeof(u_int32_t) * PGS_PER_REQ, 1, "inflate") != 0)) |