From nobody Sun Nov 24 03:23:24 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1726152368; cv=none; d=zohomail.com; s=zohoarc; b=EoyWaa7sJX8ZmD871qrBJ+0UmVHGFw1rraGsH+aNs0kW9ELvhsOjKpSSVlI6Vy4Qqyfn4CB7wxBiSUe4TTNW5tQ7kZYAGGi3fCSDEAH59/eRietyxp/QUM5Jozn8tTuOLC7dNX724lBEzqXHV9mNqlJMnzosfCEI7gS8ETXu/Js= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1726152368; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=KlmskoTXBOAwzKR48rQ3Cepi8YVWQsXbb1zR1XmUbwY=; b=cltHa/oUrk4+F+mdBH6ZLN6rTh+yXlMwy2eFfbaHHZ9UIKvEYy7QmYvG4kKK+O1F3rWu1uWvWM8c+eKAdjd7nm0gWiz28TSCcHTGytVkOtndRFrGGc7PIeJkgvPj9KmmVepGCQK1AfHGiywjZUPX9nzj5CwqGH+KtxKwnSuqUFA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17261523688685.39591869340893; Thu, 12 Sep 2024 07:46:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sol47-0008Pn-4Q; Thu, 12 Sep 2024 10:44:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sol44-0008Ls-Fp for qemu-devel@nongnu.org; Thu, 12 Sep 2024 10:44:56 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sol42-0007Qe-08 for qemu-devel@nongnu.org; Thu, 12 Sep 2024 10:44:55 -0400 Received: from mx-prod-mc-02.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-414-6xyiptLrOmqqCd7uFf3uKA-1; Thu, 12 Sep 2024 10:44:49 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2A3141953955; Thu, 12 Sep 2024 14:44:48 +0000 (UTC) Received: from localhost.localdomain (unknown [10.45.224.195]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8F16A3000235; Thu, 12 Sep 2024 14:44:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1726152292; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KlmskoTXBOAwzKR48rQ3Cepi8YVWQsXbb1zR1XmUbwY=; b=GEiMAXCmVmcS5upFmAslNAYI/bOPNOH0QmjGMvdqzHNla0mFXRotnLy1GKFp3o0/Z/FU/2 aSJiULwahC6f1F8GSwRFPAQViAxspoCtL6682SzqawTEhN1bHnH1hmz3xt/6hqFjtGTiYF zz0U2NB5YmciKi0fJWtkFalfwD/1wgI= X-MC-Unique: 6xyiptLrOmqqCd7uFf3uKA-1 From: Albert Esteve To: qemu-devel@nongnu.org Cc: slp@redhat.com, hi@alyssa.is, mst@redhat.com, stefanha@redhat.com, Stefano Garzarella , david@redhat.com, stevensd@chromium.org, jasowang@redhat.com, Albert Esteve Subject: [PATCH 1/3] vhost_user.rst: Add SHMEM_MAP/_UNMAP to spec Date: Thu, 12 Sep 2024 16:44:30 +0200 Message-ID: <20240912144432.126717-2-aesteve@redhat.com> In-Reply-To: <20240912144432.126717-1-aesteve@redhat.com> References: <20240912144432.126717-1-aesteve@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=aesteve@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.143, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1726152370191116600 Content-Type: text/plain; charset="utf-8" Add SHMEM_MAP/_UNMAP request to the vhost-user spec documentation. Signed-off-by: Albert Esteve Reviewed-by: Stefan Hajnoczi --- docs/interop/vhost-user.rst | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst index d8419fd2f1..d680fea4a3 100644 --- a/docs/interop/vhost-user.rst +++ b/docs/interop/vhost-user.rst @@ -369,6 +369,7 @@ In QEMU the vhost-user message is implemented with the = following struct: VhostUserConfig config; VhostUserVringArea area; VhostUserInflight inflight; + VhostUserMMap mmap; }; } QEMU_PACKED VhostUserMsg; =20 @@ -1859,6 +1860,36 @@ is sent by the front-end. when the operation is successful, or non-zero otherwise. Note that if the operation fails, no fd is sent to the backend. =20 +``VHOST_USER_BACKEND_SHMEM_MAP`` + :id: 9 + :equivalent ioctl: N/A + :request payload: fd and ``struct VhostUserMMap`` + :reply payload: N/A + + This message can be submitted by the backends to advertise a new mapping + to be made in a given VIRTIO Shared Memory Region. Upon receiving the me= ssage, + The front-end will mmap the given fd into the VIRTIO Shared Memory Region + with the requested ``shmid``. A reply is generated indicating whether ma= pping + succeeded. + + Mapping over an already existing map is not allowed and request shall fa= il. + Therefore, the memory range in the request must correspond with a valid, + free region of the VIRTIO Shared Memory Region. Also, note that mappings + consume resources and that the request can fail when there are no resour= ces + available. + +``VHOST_USER_BACKEND_SHMEM_UNMAP`` + :id: 10 + :equivalent ioctl: N/A + :request payload: ``struct VhostUserMMap`` + :reply payload: N/A + + This message can be submitted by the backends so that the front-end un-m= map + a given range (``shm_offset``, ``len``) in the VIRTIO Shared Memory Regi= on + with the requested ``shmid``. Note that the given range shall correspond= to + the entirety of a valid mapped region. + A reply is generated indicating whether unmapping succeeded. + .. _reply_ack: =20 VHOST_USER_PROTOCOL_F_REPLY_ACK --=20 2.45.2 From nobody Sun Nov 24 03:23:24 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1726152353; cv=none; d=zohomail.com; s=zohoarc; b=m+S60CiKX9jaoYQYDXLqvJ+DPTGOye9p2AH35cJ9n+NEf1sS+u4+0q+Tokm7fuJNf+5VwtLuMD2kXpsp64q4/4133C1D+1cREk6T0x2cNFkYAyRVFC+0104IjR6Ki8W2PixDTybpXsTYYeTbLldsIY0zDs/byj+9fSfB+kj/6uE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1726152353; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=6IYk5z4L6UVh/eqExHfcLbPdMWjZoVYTsykloWLy4VQ=; b=djJ3BmIDL54UcK+SiToGnjHa2K4iB2lJnd3PAUwj/eBl0dTswX+h6VP1jGF38YhEWkFx1faaoqRS+VEkRVKhKAfizvw4UDuEARVBfr0qHp7sBhnDeJCiFT5BzT9t6fUSaWBG3J3lWpEiSLaoDMDmTKa6/ICz+9uPN5iPB/GA6ZU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17261523538341011.1355256746428; Thu, 12 Sep 2024 07:45:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sol4B-0000DF-25; Thu, 12 Sep 2024 10:45:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sol47-0008W7-S8 for qemu-devel@nongnu.org; Thu, 12 Sep 2024 10:45:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sol46-0007R7-6K for qemu-devel@nongnu.org; Thu, 12 Sep 2024 10:44:59 -0400 Received: from mx-prod-mc-04.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-600-gHJgxhQTMYqAz3RCcDEj9w-1; Thu, 12 Sep 2024 10:44:54 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 06E461944CEE; Thu, 12 Sep 2024 14:44:53 +0000 (UTC) Received: from localhost.localdomain (unknown [10.45.224.195]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8F0303000235; Thu, 12 Sep 2024 14:44:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1726152297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6IYk5z4L6UVh/eqExHfcLbPdMWjZoVYTsykloWLy4VQ=; b=iVj6t9kB8u6isgqo4FtKuF62if9TfglMaHblza4k5MAlLa9gp72w4qVmc9lOercrdXViJp lLn4WrooM+ArsAa8xoesdTCPDrelYTI5DNdSbWM5Obo3laaDYHOJc3WNn69aRtvJowxpU3 n0/eU1pqcMBmIyKtadA5UtofW03khcc= X-MC-Unique: gHJgxhQTMYqAz3RCcDEj9w-1 From: Albert Esteve To: qemu-devel@nongnu.org Cc: slp@redhat.com, hi@alyssa.is, mst@redhat.com, stefanha@redhat.com, Stefano Garzarella , david@redhat.com, stevensd@chromium.org, jasowang@redhat.com, Albert Esteve Subject: [PATCH 2/3] vhost_user.rst: Align VhostUserMsg excerpt members Date: Thu, 12 Sep 2024 16:44:31 +0200 Message-ID: <20240912144432.126717-3-aesteve@redhat.com> In-Reply-To: <20240912144432.126717-1-aesteve@redhat.com> References: <20240912144432.126717-1-aesteve@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=aesteve@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.143, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1726152355902116600 Content-Type: text/plain; charset="utf-8" Add missing VhostUserShared and VhostUserTransferDeviceState members to the VhostUserMsg excerpt in the vhost-user spec documentation. Signed-off-by: Albert Esteve --- docs/interop/vhost-user.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst index d680fea4a3..ec898d2440 100644 --- a/docs/interop/vhost-user.rst +++ b/docs/interop/vhost-user.rst @@ -369,6 +369,8 @@ In QEMU the vhost-user message is implemented with the = following struct: VhostUserConfig config; VhostUserVringArea area; VhostUserInflight inflight; + VhostUserShared object; + VhostUserTransferDeviceState transfer_state; VhostUserMMap mmap; }; } QEMU_PACKED VhostUserMsg; --=20 2.45.2 From nobody Sun Nov 24 03:23:24 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1726152353; cv=none; d=zohomail.com; s=zohoarc; b=YOhpRVgU26iUEuNXUIoTMIM524K8q5yqAYbD6UMW8zWEZZGYJSDoXwLVH/6VvMzgJXeHLiSRfQJXqYnRp2TtryuILenM55jJ0N9AvJdH66sVMFl9rTTAqXh8Q8K6SHfsSXN++4V1MzNipfV0g16cF3czIY8fo8FeLdQnK9wUYHU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1726152353; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=71UNforyMAADaO/AkBH1iXP7SY8+C4OzMXtsk5W1E6U=; b=eGrAqQNUPPgIihjWwNLxEb+baEbwBmakLBl3o5ko09oVCrtDlHaYXfoznkR/EuH1i+dfD8AdC3DaEug/0eb9KB/BeMiaRH+2CQaQ1Gldf1rGDsn+njWRThwMxHcpj02HR8NIHaV0DWt9uE2t9oOM3VbiBaOyVIb+d9Vow52XJ1Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1726152353436320.58582672652017; Thu, 12 Sep 2024 07:45:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sol4F-0000Ud-6u; Thu, 12 Sep 2024 10:45:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sol4C-0000Jd-4i for qemu-devel@nongnu.org; Thu, 12 Sep 2024 10:45:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sol4A-0007RT-HH for qemu-devel@nongnu.org; Thu, 12 Sep 2024 10:45:03 -0400 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-28-bLGT_bRaPWCba4HDDl9ztg-1; Thu, 12 Sep 2024 10:44:58 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 42E1A1944AB1; Thu, 12 Sep 2024 14:44:57 +0000 (UTC) Received: from localhost.localdomain (unknown [10.45.224.195]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 861AB3000235; Thu, 12 Sep 2024 14:44:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1726152301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=71UNforyMAADaO/AkBH1iXP7SY8+C4OzMXtsk5W1E6U=; b=MdArJnSbGibVvgvm1+8oR0ieFWg1knFmehxAfazB7so7ZxbhMZ13Kg/DaBgwMf+1L9qlKo nnqgcxO8ENdEkw9I15lJPGzvTLSaWThsMt6ouX6KEtn+3Sd45//ZoZRd6usIAPhLu+eUkK 1R3hvPX01efT0Klc5SeJNhdXtq+XRSw= X-MC-Unique: bLGT_bRaPWCba4HDDl9ztg-1 From: Albert Esteve To: qemu-devel@nongnu.org Cc: slp@redhat.com, hi@alyssa.is, mst@redhat.com, stefanha@redhat.com, Stefano Garzarella , david@redhat.com, stevensd@chromium.org, jasowang@redhat.com, Albert Esteve Subject: [PATCH 3/3] vhost_user.rst: Add GET_SHMEM_CONFIG message Date: Thu, 12 Sep 2024 16:44:32 +0200 Message-ID: <20240912144432.126717-4-aesteve@redhat.com> In-Reply-To: <20240912144432.126717-1-aesteve@redhat.com> References: <20240912144432.126717-1-aesteve@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=aesteve@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.143, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1726152354519116600 Content-Type: text/plain; charset="utf-8" Add GET_SHMEM_CONFIG vhost-user frontend message to the spec documentation. Signed-off-by: Albert Esteve Reviewed-by: Alyssa Ross --- docs/interop/vhost-user.rst | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst index ec898d2440..fb7b27ce94 100644 --- a/docs/interop/vhost-user.rst +++ b/docs/interop/vhost-user.rst @@ -348,6 +348,19 @@ Device state transfer parameters In the future, additional phases might be added e.g. to allow iterative migration while the device is running. =20 +VIRTIO Shared Memory Region configuration +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ++-------------+---------+------------+----+--------------+ +| num regions | padding | mem size 0 | .. | mem size 255 | ++-------------+---------+------------+----+--------------+ + +:num regions: a 32-bit number of regions + +:padding: 32-bit + +:mem size: 64-bit size of VIRTIO Shared Memory Region + C structure ----------- =20 @@ -372,6 +385,7 @@ In QEMU the vhost-user message is implemented with the = following struct: VhostUserShared object; VhostUserTransferDeviceState transfer_state; VhostUserMMap mmap; + VhostUserShMemConfig shmem; }; } QEMU_PACKED VhostUserMsg; =20 @@ -1054,6 +1068,7 @@ Protocol features #define VHOST_USER_PROTOCOL_F_XEN_MMAP 17 #define VHOST_USER_PROTOCOL_F_SHARED_OBJECT 18 #define VHOST_USER_PROTOCOL_F_DEVICE_STATE 19 + #define VHOST_USER_PROTOCOL_F_SHMEM 20 =20 Front-end message types ----------------------- @@ -1728,6 +1743,30 @@ Front-end message types Using this function requires prior negotiation of the ``VHOST_USER_PROTOCOL_F_DEVICE_STATE`` feature. =20 +``VHOST_USER_GET_SHMEM_CONFIG`` + :id: 44 + :equivalent ioctl: N/A + :request payload: N/A + :reply payload: ``struct VhostUserShMemConfig`` + + When the ``VHOST_USER_PROTOCOL_F_SHMEM`` protocol feature has been + successfully negotiated, this message can be submitted by the front-end + to gather the VIRTIO Shared Memory Region configuration. Back-end will + respond with the number of VIRTIO Shared Memory Regions it requires, and + each shared memory region size in an array. The shared memory IDs are + represented by the index of the array. The information returned shall + comply with the following rules: + + * The shared information will remain valid and unchanged for the entire + lifetime of the connection. + + * The Shared Memory Region size must be a multiple of the page size + supported by mmap(2). + + * The size may be 0 if the region is unused. This can happen when the + device does not support an optional feature but does support a feature + that uses a higher shmid. + Back-end message types ---------------------- =20 --=20 2.45.2