From 337aac4d274499bb74eed25291a9203fac2bf4e0 Mon Sep 17 00:00:00 2001 From: Stefan Fritsch Date: Sat, 19 Jan 2019 16:21:01 +0000 Subject: 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. --- sys/dev/pv/viomb.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'sys/dev/pv/viomb.c') 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)) -- cgit v1.2.3