From nobody Sun Nov 24 05:29:28 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1726034774; cv=none; d=zohomail.com; s=zohoarc; b=Slowtt8lv/lKsVKKS4pIC5V+HGae4jd9SBlxtPZyrfxODx4Tpd7Y2FUNkBAxFe52+5NmFQHgeb4xVhD7TZuzQnOFs70r/Fmb8H2Nuy9DhcvIC9mSCL8AW1qykrPK1TAN10bQ9w9aOK5V1vTGOsuYzP7a2Weo7yN7ZtvadGn4xQI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1726034774; h=Content-Type: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=FIAF1X69aSLXHJC27ryfdtdWE2pXgbLkXo6se6JTYgQ=; b=K6tgIHy/LSToun+alNf5D+yBcszAEDzvN2ZGY/l5HDO0AqLhKmaCmJtn9ByVSQ9fE9yrZp1kLf0alwNUIMQIlMlGItaKXu1Hs+vKV1bBmgWyBKAp3cp2vpvwH7zcDr5sKb1WErob4ZW09rIH0PncMIUypWwhBmVrmFCdOGhkWUc= 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 1726034774692783.9656600088668; Tue, 10 Sep 2024 23:06:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1soGU1-0004ho-On; Wed, 11 Sep 2024 02:05:41 -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 1soGTz-0004h3-Tu for qemu-devel@nongnu.org; Wed, 11 Sep 2024 02:05:39 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1soGTx-0007j1-Ad for qemu-devel@nongnu.org; Wed, 11 Sep 2024 02:05:39 -0400 Received: by mail-pf1-x444.google.com with SMTP id d2e1a72fcca58-717849c0dcaso5926355b3a.3 for ; Tue, 10 Sep 2024 23:05:36 -0700 (PDT) Received: from localhost.localdomain ([39.144.194.76]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7d8256da131sm6662874a12.70.2024.09.10.23.05.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 23:05:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726034735; x=1726639535; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FIAF1X69aSLXHJC27ryfdtdWE2pXgbLkXo6se6JTYgQ=; b=LBjuf068gweTvR1GjfgHnvPQx6ZeFWiTiXGNeDtMUZsqpuoaH7O/0lu4zc4QZ47RHE 5rF08w6dXv+nnjc2UdVChOflSLUyiadyWdnvuGA+xOZh4e2uCflJVkqq/LUe1Ja15SwI D1Ms3IvisIBl3SU8FnxxRoHf1HOUUdcsO1IVqpGZuz3odAOJwfYAUulCIWOkIRs0/wJi SFiEcVduKSDZQrXsgRUdMRmIFSKSWqa55Q+Og7GCimlVI+krkIsAnzclz16YXpPQ0XS7 xwXu2W6RB0xAaEYI4zTftti7jotXwBHhqm7PfWcXADzPYVVPdSJBf5z1gle9VRckH20Y hoNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726034735; x=1726639535; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FIAF1X69aSLXHJC27ryfdtdWE2pXgbLkXo6se6JTYgQ=; b=xAZS0HTj3pjnt6QGPvlt+5ZzWNb2wrldqgPa/Q3UNx/lKmfktnEvnTuTX5qaXvehSR 1asPkxM8MsAJo3wITu3CnLiV6qD+lninBVPhT7B+AL4GhFYyXBT8/wKXN/9yXQw2Gy5b LAkGuqFr8xy4ZkneACReVO7fY+gNIOusRD8am7thFx/CDdA/dyEyu7LXbM+ccfPhq8wr fZa8uQ3dt3SMyqFqf5Uy/xlDWG5pxwQQ5vJFCDsWITOlANNTMeDsGaAaLraK9TxQbP6P qeJmHz9415Zu4z7Wf5ISv3WSGNUzqsDIqvoZ471JB3adMhPtcL0ZrUkRh/D24hkWYvHx /zxQ== X-Forwarded-Encrypted: i=1; AJvYcCUeRUadTuWDKHN2eXBKjoUXlUxtZvi1uUiVg6HO7UmNDQUOEQfQ0BW8p4ZVEkMvfFYaNqusdjBwAYgV@nongnu.org X-Gm-Message-State: AOJu0Yy8wskG7K/fMdjxBBua8atfi1XAEfpcY2v5t1Esn8F0Spme/Pf+ eLGshxW40ChnUC8jQEns+n95Os6H2jWR8yPRZvifQ7J04EwFLnJA X-Google-Smtp-Source: AGHT+IGos+XdhiQ9oR+8F5Wx/BBFLs3IFFNNj9KQ2h90qAooLXXD0nXgTZ9F/wAhSwhIxMwvs5RzAg== X-Received: by 2002:a05:6a00:85a2:b0:70d:2796:bce8 with SMTP id d2e1a72fcca58-718d5f3370cmr19731315b3a.20.1726034735097; Tue, 10 Sep 2024 23:05:35 -0700 (PDT) From: luzhixing12345 To: mst@redhat.com Cc: luzhixing12345@gmail.com, qemu-devel@nongnu.org, sgarzare@redhat.com Subject: [PATCH v2] docs: fix vhost-user protocol doc Date: Wed, 11 Sep 2024 14:04:00 +0800 Message-Id: <20240911060400.3472-1-luzhixing12345@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240910132855-mutt-send-email-mst@kernel.org> References: <20240910132855-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2607:f8b0:4864:20::444; envelope-from=luzhixing12345@gmail.com; helo=mail-pf1-x444.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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 @gmail.com) X-ZM-MESSAGEID: 1726034777134116600 Add a ref link to Memory region description and Multiple Memory region desc= ription. Desciptions about memory regions are merged into one line. Add extra type(64 bits) to Log description structure fields Fix =E2=80=99s to 's >On Sun, Sep 08, 2024 at 10:49:54PM +0800, luzhixing12345 wrote: >> >On Fri, Sep 06, 2024 at 10:10:45AM +0800, luzhixing12345 wrote: >> >> Hi, can someone help review this patch? >> >>=20 >> >> Signed-off-by: luzhixing12345 >> > >> >You got comments Aug 5, pls address them. >>=20 >> ok, the comments are addressed. > >Pls post v2, list the comments addressed in the changelog, >coming after --- > >Thanks! > > >> >On Sun, Aug 04, 2024 at 01:04:20PM GMT, luzhixing12345 wrote: >> >>add a ref link to Memory region description >> >> >> >>add extra type(64 bits) to Log description structure fields >> >> >> >>fix =E2=80=99s to 's >> >> >> >>--- >> >> docs/interop/vhost-user.rst | 22 +++++++++++++--------- >> >> 1 file changed, 13 insertions(+), 9 deletions(-) >> > >> >Please run `scripts/checkpatch.pl` before sending. >> > >> >S-o-b missing here. >> > >> >> >> >>diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst >> >>index d8419fd2f1..e34b305bd9 100644 >> >>--- a/docs/interop/vhost-user.rst >> >>+++ b/docs/interop/vhost-user.rst >> >>@@ -167,6 +167,8 @@ A vring address description >> >> Note that a ring address is an IOVA if ``VIRTIO_F_IOMMU_PLATFORM`` has >> >> been negotiated. Otherwise it is a user address. >> >> >> >>+.. _memory_region_description: >> >>+ >> >> Memory region description >> >> ^^^^^^^^^^^^^^^^^^^^^^^^^ >> >> >> >>@@ -180,7 +182,7 @@ Memory region description >> >> >> >> :user address: a 64-bit user address >> >> >> >>-:mmap offset: 64-bit offset where region starts in the mapped memory >> >>+:mmap offset: a 64-bit offset where region starts in the mapped memory >> >> >> >> When the ``VHOST_USER_PROTOCOL_F_XEN_MMAP`` protocol feature has been >> >> successfully negotiated, the memory region description contains two e= xtra >> >>@@ -190,7 +192,7 @@ fields at the end. >> >> | guest address | size | user address | mmap offset | xen mmap flags = | domid | >> >> +---------------+------+--------------+-------------+----------------= +-------+ >> >> >> >>-:xen mmap flags: 32-bit bit field >> >>+:xen mmap flags: a 32-bit bit field >> >> >> >> - Bit 0 is set for Xen foreign memory mapping. >> >> - Bit 1 is set for Xen grant memory mapping. >> >>@@ -211,6 +213,8 @@ Single memory region description >> >> >> >> :padding: 64-bit >> >> >> >>+:region: :ref:`Memory region description ` >> >>+ >> >> A region is represented by Memory region description. >> > >> >Should we merge this line with the one added? >>=20 >> Desciptions about memory regions are merged into one line. >>=20 >> >> >> >> Multiple Memory regions description >> > >> >Should we extend also the Multiple Memory region description? >>=20 >> Yes, this patch adds a ref link to it. >>=20 >> >>@@ -233,9 +237,9 @@ Log description >> >> | log size | log offset | >> >> +----------+------------+ >> >> >> >>-:log size: size of area used for logging >> >>+:log size: a 64-bit size of area used for logging >> >> >> >>-:log offset: offset from start of supplied file descriptor where >> >>+:log offset: a 64-bit offset from start of supplied file descriptor w= here >> >> logging starts (i.e. where guest address 0 would be >> >> logged) >> >> >> >>@@ -382,7 +386,7 @@ the kernel implementation. >> >> >> >> The communication consists of the *front-end* sending message request= s and >> >> the *back-end* sending message replies. Most of the requests don't re= quire >> >>-replies. Here is a list of the ones that do: >> >>+replies, except for the following requests: >> >> >> >> * ``VHOST_USER_GET_FEATURES`` >> >> * ``VHOST_USER_GET_PROTOCOL_FEATURES`` >> >>@@ -1239,11 +1243,11 @@ Front-end message types >> >> (*a vring descriptor index for split virtqueues* vs. *vring descrip= tor >> >> indices for packed virtqueues*). >> >> >> >>- When and as long as all of a device's vrings are stopped, it is >> >>+ When and as long as all of a device's vrings are stopped, it is >> >> *suspended*, see :ref:`Suspended device state >> >> `. >> >> >> >>- The request payload's *num* field is currently reserved and must be >> >>+ The request payload's *num* field is currently reserved and must be >> >> set to 0. >> >> >> >> ``VHOST_USER_SET_VRING_KICK`` >> >>@@ -1662,7 +1666,7 @@ Front-end message types >> >> :reply payload: ``u64`` >> >> >> >> Front-end and back-end negotiate a channel over which to transfer t= he >> >>- back-end's internal state during migration. Either side (front-end= or >> >>+ back-end's internal state during migration. Either side (front-end= or >> >> back-end) may create the channel. The nature of this channel is not >> >> restricted or defined in this document, but whichever side creates = it >> >> must create a file descriptor that is provided to the respectively >> >>@@ -1714,7 +1718,7 @@ Front-end message types >> >> :request payload: N/A >> >> :reply payload: ``u64`` >> >> >> >>- After transferring the back-end's internal state during migration (= see >> >>+ After transferring the back-end's internal state during migration (= see >> >> the :ref:`Migrating back-end state ` >> >> section), check whether the back-end was able to successfully fully >> >> process the state. >> >>--=20 >> >>2.34.1 >> >> >>=20 >> Signed-off-by: luzhixing12345 >> --- >> docs/interop/vhost-user.rst | 24 +++++++++++++----------- >> 1 file changed, 13 insertions(+), 11 deletions(-) >>=20 >> diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst >> index d8419fd2f1..2e50f2ddfa 100644 >> --- a/docs/interop/vhost-user.rst >> +++ b/docs/interop/vhost-user.rst >> @@ -167,6 +167,8 @@ A vring address description >> Note that a ring address is an IOVA if ``VIRTIO_F_IOMMU_PLATFORM`` has >> been negotiated. Otherwise it is a user address. >> =20 >> +.. _memory_region_description: >> + >> Memory region description >> ^^^^^^^^^^^^^^^^^^^^^^^^^ >> =20 >> @@ -180,7 +182,7 @@ Memory region description >> =20 >> :user address: a 64-bit user address >> =20 >> -:mmap offset: 64-bit offset where region starts in the mapped memory >> +:mmap offset: a 64-bit offset where region starts in the mapped memory >> =20 >> When the ``VHOST_USER_PROTOCOL_F_XEN_MMAP`` protocol feature has been >> successfully negotiated, the memory region description contains two ext= ra >> @@ -190,7 +192,7 @@ fields at the end. >> | guest address | size | user address | mmap offset | xen mmap flags | = domid | >> +---------------+------+--------------+-------------+----------------+-= ------+ >> =20 >> -:xen mmap flags: 32-bit bit field >> +:xen mmap flags: a 32-bit bit field >> =20 >> - Bit 0 is set for Xen foreign memory mapping. >> - Bit 1 is set for Xen grant memory mapping. >> @@ -211,7 +213,7 @@ Single memory region description >> =20 >> :padding: 64-bit >> =20 >> -A region is represented by Memory region description. >> +:region: region is represented by :ref:`Memory region description `. >> =20 >> Multiple Memory regions description >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> @@ -224,7 +226,7 @@ Multiple Memory regions description >> =20 >> :padding: 32-bit >> =20 >> -A region is represented by Memory region description. >> +:regions: regions field contains 8 regions of type :ref:`Memory region = description >`. >> =20 >> Log description >> ^^^^^^^^^^^^^^^ >> @@ -233,9 +235,9 @@ Log description >> | log size | log offset | >> +----------+------------+ >> =20 >> -:log size: size of area used for logging >> +:log size: a 64-bit size of area used for logging >> =20 >> -:log offset: offset from start of supplied file descriptor where >> +:log offset: a 64-bit offset from start of supplied file descriptor whe= re >> logging starts (i.e. where guest address 0 would be >> logged) >> =20 >> @@ -382,7 +384,7 @@ the kernel implementation. >> =20 >> The communication consists of the *front-end* sending message requests = and >> the *back-end* sending message replies. Most of the requests don't requ= ire >> -replies. Here is a list of the ones that do: >> +replies, except for the following requests: >> =20 >> * ``VHOST_USER_GET_FEATURES`` >> * ``VHOST_USER_GET_PROTOCOL_FEATURES`` >> @@ -1239,11 +1241,11 @@ Front-end message types >> (*a vring descriptor index for split virtqueues* vs. *vring descriptor >> indices for packed virtqueues*). >> =20 >> - When and as long as all of a device=E2=80=99s vrings are stopped, it = is >> + When and as long as all of a device's vrings are stopped, it is >> *suspended*, see :ref:`Suspended device state >> `. >> =20 >> - The request payload=E2=80=99s *num* field is currently reserved and m= ust be >> + The request payload's *num* field is currently reserved and must be >> set to 0. >> =20 >> ``VHOST_USER_SET_VRING_KICK`` >> @@ -1662,7 +1664,7 @@ Front-end message types >> :reply payload: ``u64`` >> =20 >> Front-end and back-end negotiate a channel over which to transfer the >> - back-end=E2=80=99s internal state during migration. Either side (fro= nt-end or >> + back-end's internal state during migration. Either side (front-end or >> back-end) may create the channel. The nature of this channel is not >> restricted or defined in this document, but whichever side creates it >> must create a file descriptor that is provided to the respectively >> @@ -1714,7 +1716,7 @@ Front-end message types >> :request payload: N/A >> :reply payload: ``u64`` >> =20 >> - After transferring the back-end=E2=80=99s internal state during migra= tion (see >> + After transferring the back-end's internal state during migration (see >> the :ref:`Migrating back-end state ` >> section), check whether the back-end was able to successfully fully >> process the state. >> --=20 >> 2.34.1 Signed-off-by: luzhixing12345 --- docs/interop/vhost-user.rst | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst index d8419fd2f1..2e50f2ddfa 100644 --- a/docs/interop/vhost-user.rst +++ b/docs/interop/vhost-user.rst @@ -167,6 +167,8 @@ A vring address description Note that a ring address is an IOVA if ``VIRTIO_F_IOMMU_PLATFORM`` has been negotiated. Otherwise it is a user address. =20 +.. _memory_region_description: + Memory region description ^^^^^^^^^^^^^^^^^^^^^^^^^ =20 @@ -180,7 +182,7 @@ Memory region description =20 :user address: a 64-bit user address =20 -:mmap offset: 64-bit offset where region starts in the mapped memory +:mmap offset: a 64-bit offset where region starts in the mapped memory =20 When the ``VHOST_USER_PROTOCOL_F_XEN_MMAP`` protocol feature has been successfully negotiated, the memory region description contains two extra @@ -190,7 +192,7 @@ fields at the end. | guest address | size | user address | mmap offset | xen mmap flags | dom= id | +---------------+------+--------------+-------------+----------------+----= ---+ =20 -:xen mmap flags: 32-bit bit field +:xen mmap flags: a 32-bit bit field =20 - Bit 0 is set for Xen foreign memory mapping. - Bit 1 is set for Xen grant memory mapping. @@ -211,7 +213,7 @@ Single memory region description =20 :padding: 64-bit =20 -A region is represented by Memory region description. +:region: region is represented by :ref:`Memory region description `. =20 Multiple Memory regions description ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -224,7 +226,7 @@ Multiple Memory regions description =20 :padding: 32-bit =20 -A region is represented by Memory region description. +:regions: regions field contains 8 regions of type :ref:`Memory region des= cription `. =20 Log description ^^^^^^^^^^^^^^^ @@ -233,9 +235,9 @@ Log description | log size | log offset | +----------+------------+ =20 -:log size: size of area used for logging +:log size: a 64-bit size of area used for logging =20 -:log offset: offset from start of supplied file descriptor where +:log offset: a 64-bit offset from start of supplied file descriptor where logging starts (i.e. where guest address 0 would be logged) =20 @@ -382,7 +384,7 @@ the kernel implementation. =20 The communication consists of the *front-end* sending message requests and the *back-end* sending message replies. Most of the requests don't require -replies. Here is a list of the ones that do: +replies, except for the following requests: =20 * ``VHOST_USER_GET_FEATURES`` * ``VHOST_USER_GET_PROTOCOL_FEATURES`` @@ -1239,11 +1241,11 @@ Front-end message types (*a vring descriptor index for split virtqueues* vs. *vring descriptor indices for packed virtqueues*). =20 - When and as long as all of a device=E2=80=99s vrings are stopped, it is + When and as long as all of a device's vrings are stopped, it is *suspended*, see :ref:`Suspended device state `. =20 - The request payload=E2=80=99s *num* field is currently reserved and must= be + The request payload's *num* field is currently reserved and must be set to 0. =20 ``VHOST_USER_SET_VRING_KICK`` @@ -1662,7 +1664,7 @@ Front-end message types :reply payload: ``u64`` =20 Front-end and back-end negotiate a channel over which to transfer the - back-end=E2=80=99s internal state during migration. Either side (front-= end or + back-end's internal state during migration. Either side (front-end or back-end) may create the channel. The nature of this channel is not restricted or defined in this document, but whichever side creates it must create a file descriptor that is provided to the respectively @@ -1714,7 +1716,7 @@ Front-end message types :request payload: N/A :reply payload: ``u64`` =20 - After transferring the back-end=E2=80=99s internal state during migratio= n (see + After transferring the back-end's internal state during migration (see the :ref:`Migrating back-end state ` section), check whether the back-end was able to successfully fully process the state. --=20 2.34.1