Received: from eggs.gnu.org ([209.51.188.92]:36942) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEyFR-0000ad-21 for qemu-devel@nongnu.org; Fri, 12 Apr 2019 11:37:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hEyFQ-0001iC-3E for qemu-devel@nongnu.org; Fri, 12 Apr 2019 11:37:49 -0400 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Fri, 12 Apr 2019 17:36:40 +0200 Message-Id: <20190412153647.19027-7-marcandre.lureau@redhat.com> In-Reply-To: <20190412153647.19027-1-marcandre.lureau@redhat.com> References: <20190412153647.19027-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v5 06/13] libvhost-user: add PROTOCOL_F_CONFIG if {set, get}_config List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: David Gibson , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-ppc@nongnu.org, Paolo Bonzini , Gerd Hoffmann , "Michael S. Tsirkin" Add the config protocol feature bit if the set_config & get_config callbacks are implemented. Signed-off-by: Marc-Andr=C3=A9 Lureau --- contrib/libvhost-user/libvhost-user.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost-use= r/libvhost-user.c index e08d6c7b97..e738f6ce88 100644 --- a/contrib/libvhost-user/libvhost-user.c +++ b/contrib/libvhost-user/libvhost-user.c @@ -1157,6 +1157,10 @@ vu_get_protocol_features_exec(VuDev *dev, VhostUse= rMsg *vmsg) features |=3D 1ULL << VHOST_USER_PROTOCOL_F_PAGEFAULT; } =20 + if (dev->iface->get_config && dev->iface->set_config) { + features |=3D 1ULL << VHOST_USER_PROTOCOL_F_CONFIG; + } + if (dev->iface->get_protocol_features) { features |=3D dev->iface->get_protocol_features(dev); } --=20 2.21.0.313.ge35b8cb8e2