Received: from eggs.gnu.org ([209.51.188.92]:39895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJy2X-0007fl-Nb for qemu-devel@nongnu.org; Fri, 26 Apr 2019 06:25:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJy2V-0003iu-6G for qemu-devel@nongnu.org; Fri, 26 Apr 2019 06:25:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40432) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hJy2V-0003ib-0I for qemu-devel@nongnu.org; Fri, 26 Apr 2019 06:25:07 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4DB4530BBEBF for ; Fri, 26 Apr 2019 10:25:06 +0000 (UTC) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Fri, 26 Apr 2019 12:24:33 +0200 Message-Id: <20190426102437.16189-3-marcandre.lureau@redhat.com> In-Reply-To: <20190426102437.16189-1-marcandre.lureau@redhat.com> References: <20190426102437.16189-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 2/6] 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: kraxel@redhat.com, mst@redhat.com, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= 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 dcf4a969f2..74d42177c5 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