All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yanteng Si <siyanteng@loongson.cn>
To: corbet@lwn.net, alexs@kernel.org, bobwxc@email.cn, seakeel@gmail.com
Cc: Yanteng Si <siyanteng@loongson.cn>,
	chenhuacai@kernel.org, jiaxun.yang@flygoat.com,
	linux-doc@vger.kernel.org, realpuyuwang@gmail.com,
	chenfeiyang@loongson.cn, chris.chenfeiyang@gmail.com,
	siyanteng01@gmail.com
Subject: [PATCH v3 7/8] docs/zh_CN: add virt acrn io-request translation
Date: Sun,  1 Aug 2021 21:32:31 +0800	[thread overview]
Message-ID: <d8be72a1eef2170a22ec1d277d1261e4e7a1d128.1627823347.git.siyanteng@loongson.cn> (raw)
In-Reply-To: <cover.1627823347.git.siyanteng@loongson.cn>

Translate Documentation/virt/acrn/io-request.rst into Chinese.

Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
---
 .../translations/zh_CN/virt/acrn/index.rst    |  3 +-
 .../zh_CN/virt/acrn/io-request.rst            | 99 +++++++++++++++++++
 2 files changed, 101 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/translations/zh_CN/virt/acrn/io-request.rst

diff --git a/Documentation/translations/zh_CN/virt/acrn/index.rst b/Documentation/translations/zh_CN/virt/acrn/index.rst
index b8f502033455..b53976e20a34 100644
--- a/Documentation/translations/zh_CN/virt/acrn/index.rst
+++ b/Documentation/translations/zh_CN/virt/acrn/index.rst
@@ -21,9 +21,10 @@ ACRN超级管理器
    :maxdepth: 1
 
    introduction
+   io-request
 
 TODOLIST:
 
 
-   io-request
+
    cpuid
diff --git a/Documentation/translations/zh_CN/virt/acrn/io-request.rst b/Documentation/translations/zh_CN/virt/acrn/io-request.rst
new file mode 100644
index 000000000000..1a25ea15ae07
--- /dev/null
+++ b/Documentation/translations/zh_CN/virt/acrn/io-request.rst
@@ -0,0 +1,99 @@
+.. SPDX-License-Identifier: GPL-2.0
+.. include:: ../../disclaimer-zh_CN.rst
+
+:Original: Documentation/virt/acrn/io-request.rst
+
+:翻译:
+
+ 司延腾 Yanteng Si <siyanteng@loongson.cn>
+
+:校译:
+
+ 时奎亮 Alex Shi <alexs@kernel.org>
+
+.. _cn_virt_acrn_io-request:
+
+I/O请求处理
+===========
+
+客户虚拟机的I/O请求由超级管理器构建,由ACRN超级管理器服务模块分发到与I/O请求的地址范
+围相对应的I/O客户端。I/O请求处理的细节将在以下章节描述。
+
+1. I/O请求
+----------
+
+对于每个客户虚拟机,有一个共享的4KB字节的内存区域,用于超级管理器和服务虚拟机之间的
+I/O请求通信。一个I/O请求是一个256字节的结构体缓冲区,它是 "acrn_io_request" 结构
+体,当客户虚拟机中发生被困的I/O访问时,由超级管理器的I/O处理器填充。服务虚拟机中的
+ACRN用户空间首先分配一个4KB字节的页面,并将缓冲区的GPA(客户物理地址)传递给管理平
+台。缓冲区被用作16个I/O请求槽的数组,每个I/O请求槽为256字节。这个数组是按vCPU ID
+索引的。
+
+2. I/O客户端
+------------
+
+一个I/O客户端负责处理客户虚拟机的I/O请求,其访问的GPA在一定范围内。每个客户虚拟机
+可以关联多个I/O客户端。每个客户虚拟机都有一个特殊的客户端,称为默认客户端,负责处理
+所有不在其他客户端范围内的I/O请求。ACRN用户空间充当每个客户虚拟机的默认客户端。
+
+下面的图示显示了I/O请求共享缓冲区、I/O请求和I/O客户端之间的关系。
+
+::
+
+     +------------------------------------------------------+
+     |                                       服务VM         |
+     |+--------------------------------------------------+  |
+     ||      +----------------------------------------+  |  |
+     ||      | 共享页                 ACRN用户空间    |  |  |
+     ||      |    +-----------------+  +------------+ |  |  |
+     ||   +----+->| acrn_io_request |<-+  默认      | |  |  |
+     ||   |  | |  +-----------------+  | I/O客户端  | |  |  |
+     ||   |  | |  |       ...       |  +------------+ |  |  |
+     ||   |  | |  +-----------------+                 |  |  |
+     ||   |  +-|--------------------------------------+  |  |
+     ||---|----|-----------------------------------------|  |
+     ||   |    |                             内核        |  |
+     ||   |    |            +----------------------+     |  |
+     ||   |    |            | +-------------+  HSM |     |  |
+     ||   |    +--------------+             |      |     |  |
+     ||   |                 | | I/O客户端   |      |     |  |
+     ||   |                 | |             |      |     |  |
+     ||   |                 | +-------------+      |     |  |
+     ||   |                 +----------------------+     |  |
+     |+---|----------------------------------------------+  |
+     +----|-------------------------------------------------+
+          |
+     +----|-------------------------------------------------+
+     |  +-+-----------+                                     |
+     |  | I/O处理     |              ACRN超级管理器         |
+     |  +-------------+                                     |
+     +------------------------------------------------------+
+
+3. I/O请求状态转换
+------------------
+
+一个ACRN I/O请求的状态转换如下。
+
+::
+
+   FREE -> PENDING -> PROCESSING -> COMPLETE -> FREE -> ...
+
+- FREE: 这个I/O请求槽是空的
+- PENDING: 在这个槽位上有一个有效的I/O请求正在等待
+- PROCESSING: 正在处理I/O请求
+- COMPLETE: 该I/O请求已被处理
+
+处于COMPLETE或FREE状态的I/O请求是由超级管理器拥有的。HSM和ACRN用户空间负责处理其
+他的。
+
+4. I/O请求的处理流程
+--------------------
+
+a. 当客户虚拟机中发生被陷入的I/O访问时,超级管理器的I/O处理程序将把I/O请求填充为
+   PENDING状态。
+b. 超级管理器向服务虚拟机发出一个向上调用,这是一个通知中断。
+c. upcall处理程序会安排一个工作者来调度I/O请求。
+d. 工作者寻找PENDING I/O请求,根据I/O访问的地址将其分配给不同的注册客户,将其
+   状态更新为PROCESSING,并通知相应的客户进行处理。
+e. 被通知的客户端处理指定的I/O请求。
+f. HSM将I/O请求状态更新为COMPLETE,并通过hypercalls通知超级管理器完成。
-- 
2.27.0


  parent reply	other threads:[~2021-08-01 13:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-01 13:32 [PATCH v3 0/8] docs/zh_CN: add some virt docs translation Yanteng Si
2021-08-01 13:32 ` [PATCH v3 1/8] docs/zh_CN: add virt index translation Yanteng Si
2021-08-01 13:32 ` [PATCH v3 2/8] docs/zh_CN: add virt paravirt_ops translation Yanteng Si
2021-08-04  2:39   ` Alex Shi
2021-08-04  6:41     ` yanteng si
2021-08-01 13:32 ` [PATCH v3 3/8] docs/zh_CN: add virt guest-halt-polling translation Yanteng Si
2021-08-04  2:58   ` Alex Shi
2021-08-04  6:43     ` yanteng si
2021-08-01 13:32 ` [PATCH v3 4/8] docs/zh_CN: add virt ne_overview translation Yanteng Si
2021-08-01 13:32 ` [PATCH v3 5/8] docs/zh_CN: add virt acrn index translation Yanteng Si
2021-08-04  3:00   ` Alex Shi
2021-08-01 13:32 ` [PATCH v3 6/8] docs/zh_CN: add virt acrn introduction translation Yanteng Si
2021-08-04  3:01   ` Alex Shi
2021-08-04  6:44     ` yanteng si
2021-08-01 13:32 ` Yanteng Si [this message]
2021-08-04  3:02   ` [PATCH v3 7/8] docs/zh_CN: add virt acrn io-request translation Alex Shi
2021-08-01 13:32 ` [PATCH v3 8/8] docs/zh_CN: add virt acrn cpuid translation Yanteng Si
2021-08-04  3:03   ` Alex Shi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d8be72a1eef2170a22ec1d277d1261e4e7a1d128.1627823347.git.siyanteng@loongson.cn \
    --to=siyanteng@loongson.cn \
    --cc=alexs@kernel.org \
    --cc=bobwxc@email.cn \
    --cc=chenfeiyang@loongson.cn \
    --cc=chenhuacai@kernel.org \
    --cc=chris.chenfeiyang@gmail.com \
    --cc=corbet@lwn.net \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=realpuyuwang@gmail.com \
    --cc=seakeel@gmail.com \
    --cc=siyanteng01@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.