]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
libvhost-user: add PROTOCOL_F_CONFIG if {set, get}_config
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Fri, 3 May 2019 13:00:30 +0000 (15:00 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 10 May 2019 10:48:35 +0000 (12:48 +0200)
Add the config protocol feature bit if the set_config & get_config
callbacks are implemented.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20190503130034.24916-3-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
contrib/libvhost-user/libvhost-user.c

index dcf4a969f238c32265ff501d8a9f210dcdf7da99..74d42177c5c8bd9f6a1d0395ec23b51a93cbb79c 100644 (file)
@@ -1157,6 +1157,10 @@ vu_get_protocol_features_exec(VuDev *dev, VhostUserMsg *vmsg)
         features |= 1ULL << VHOST_USER_PROTOCOL_F_PAGEFAULT;
     }
 
+    if (dev->iface->get_config && dev->iface->set_config) {
+        features |= 1ULL << VHOST_USER_PROTOCOL_F_CONFIG;
+    }
+
     if (dev->iface->get_protocol_features) {
         features |= dev->iface->get_protocol_features(dev);
     }