From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=KYB3n+Tr; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id 475615A0274 for ; Thu, 19 Dec 2024 12:14:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734606854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ta6KXmVBpD8gVlo2oD9FxwSjz4mfnAk6ih8pg874UjM=; b=KYB3n+TrxF9FTatvrkJO1kDEiqYTVn1odbEhNO0vXUEmFc2UWy8TWUZu8FnXyiI0m1Zho1 2CW5hJ84xPIUj4hrQ8gQEONoKNGOynzXfjWO1fLshD3cGZbXcYyYjxGhuzWd0VC2pjPk5d B4llY5yBy+62/GDi+BJ3JN20kPmy+nk= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-614-xLt2w1gtODyoEBJiUyvH2g-1; Thu, 19 Dec 2024 06:14:13 -0500 X-MC-Unique: xLt2w1gtODyoEBJiUyvH2g-1 X-Mimecast-MFC-AGG-ID: xLt2w1gtODyoEBJiUyvH2g Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 28B2F19560A6 for ; Thu, 19 Dec 2024 11:14:12 +0000 (UTC) Received: from lenovo-t14s.redhat.com (unknown [10.39.193.37]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2EC4219560A2; Thu, 19 Dec 2024 11:14:10 +0000 (UTC) From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH 6/9] vhost-user: Report to front-end we support VHOST_USER_PROTOCOL_F_LOG_SHMFD Date: Thu, 19 Dec 2024 12:13:57 +0100 Message-ID: <20241219111400.2352110-7-lvivier@redhat.com> In-Reply-To: <20241219111400.2352110-1-lvivier@redhat.com> References: <20241219111400.2352110-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: PCbG4fvoXTSiXnfEdz9pQMBiMPmLY4xxRPXjLIrkRaw_1734606852 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: DU23XC5PANDLL24DAOYSCJRPNPGW2ZUN X-Message-ID-Hash: DU23XC5PANDLL24DAOYSCJRPNPGW2ZUN X-MailFrom: lvivier@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Laurent Vivier X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This features allows QEMU to be migrated. We need also to report VHOST_F_LOG_ALL. This protocol feature reports we can log the page update and implement VHOST_USER_SET_LOG_BASE and VHOST_USER_SET_LOG_FD. Signed-off-by: Laurent Vivier --- vhost_user.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vhost_user.c b/vhost_user.c index c2fac58badf1..3264949e349e 100644 --- a/vhost_user.c +++ b/vhost_user.c @@ -334,6 +334,7 @@ static bool vu_get_features_exec(struct vu_dev *vdev, uint64_t features = 1ULL << VIRTIO_F_VERSION_1 | 1ULL << VIRTIO_NET_F_MRG_RXBUF | + 1ULL << VHOST_F_LOG_ALL | 1ULL << VHOST_USER_F_PROTOCOL_FEATURES; (void)vdev; @@ -912,7 +913,8 @@ static bool vu_set_vring_err_exec(struct vu_dev *vdev, static bool vu_get_protocol_features_exec(struct vu_dev *vdev, struct vhost_user_msg *msg) { - uint64_t features = 1ULL << VHOST_USER_PROTOCOL_F_REPLY_ACK; + uint64_t features = 1ULL << VHOST_USER_PROTOCOL_F_REPLY_ACK | + 1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD; (void)vdev; vmsg_set_reply_u64(msg, features); -- 2.47.1