Skip to content

Commit 067b403

Browse files
committed
docs: fix some syntax and bash usage
Minor modifications were made to make the sentences sound more natural. Also fixed some parameter usage issues in bash code block. Signed-off-by: Yi Wang <foxywang@tencent.com>
1 parent cd16a58 commit 067b403

5 files changed

Lines changed: 24 additions & 24 deletions

File tree

docs/hotplug.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Mem: 3.0Gi 71Mi 2.8Gi 0.0Ki 47Mi 2.8Gi
110110
Swap: 32Mi 0B 32Mi
111111
```
112112

113-
Due to guest OS limitations is is necessary to ensure that amount of memory added (between currently assigned RAM and that which is desired) is a multiple of 128MiB.
113+
Due to guest OS limitations it is necessary to ensure that amount of memory added (between currently assigned RAM and that which is desired) is a multiple of 128MiB.
114114

115115
The same API can also be used to reduce the desired RAM for a VM but the change will not be applied until the VM is rebooted.
116116

@@ -179,47 +179,47 @@ Notice the addition of `--api-socket=/tmp/ch-socket`.
179179

180180
### Add VFIO Device
181181

182-
To ask the VMM to add additional VFIO device then use the `add-device` API.
182+
To ask the VMM to add additional VFIO device, use the `add-device` API.
183183

184184
```shell
185185
./ch-remote --api-socket=/tmp/ch-socket add-device path=/sys/bus/pci/devices/0000:01:00.0/
186186
```
187187

188188
### Add Disk Device
189189

190-
To ask the VMM to add additional disk device then use the `add-disk` API.
190+
To ask the VMM to add additional disk device, use the `add-disk` API.
191191

192192
```shell
193193
./ch-remote --api-socket=/tmp/ch-socket add-disk path=/foo/bar/cloud.img
194194
```
195195

196196
### Add Fs Device
197197

198-
To ask the VMM to add additional fs device then use the `add-fs` API.
198+
To ask the VMM to add additional fs device, use the `add-fs` API.
199199

200200
```shell
201201
./ch-remote --api-socket=/tmp/ch-socket add-fs tag=myfs,socket=/foo/bar/virtiofs.sock
202202
```
203203

204204
### Add Net Device
205205

206-
To ask the VMM to add additional network device then use the `add-net` API.
206+
To ask the VMM to add additional network device, use the `add-net` API.
207207

208208
```shell
209209
./ch-remote --api-socket=/tmp/ch-socket add-net tap=chtap0
210210
```
211211

212212
### Add Pmem Device
213213

214-
To ask the VMM to add additional PMEM device then use the `add-pmem` API.
214+
To ask the VMM to add additional PMEM device, use the `add-pmem` API.
215215

216216
```shell
217217
./ch-remote --api-socket=/tmp/ch-socket add-pmem file=/foo/bar.cloud.img
218218
```
219219

220220
### Add Vsock Device
221221

222-
To ask the VMM to add additional vsock device then use the `add-vsock` API.
222+
To ask the VMM to add additional vsock device, use the `add-vsock` API.
223223

224224
```shell
225225
./ch-remote --api-socket=/tmp/ch-socket add-vsock cid=3,socket=/foo/bar/vsock.sock
@@ -241,7 +241,7 @@ After a reboot the added PCI device will remain.
241241

242242
### Remove PCI device
243243

244-
Removing a PCI device works the same way for all kind of PCI devices. The unique identifier related to the device must be provided. This identifier can be provided by the user when adding the new device, or by default Cloud Hypervisor will assign one.
244+
Removing a PCI device works the same way for all kinds of PCI devices. The unique identifier related to the device must be provided. This identifier can be provided by the user when adding the new device, or by default Cloud Hypervisor will assign one.
245245

246246
```shell
247247
./ch-remote --api-socket=/tmp/ch-socket remove-device _disk0

docs/io_throttling.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ Hypervisor provides another three options for limiting I/O operations,
2727
i.e., `ops_size` (I/O operations), `ops_one_time_burst` (I/O operations),
2828
and `ops_refill_time` (ms).
2929

30-
One caveat in the I/O throttling is that every-time the bucket gets
30+
One caveat in the I/O throttling is that every time the bucket gets
3131
empty, it will stop I/O operations for a fixed amount of time
3232
(`cool_down_time`). The `cool_down_time` now is fixed at `100 ms`, it
33-
can have big implications to the actual rate limit (which can be a lot
34-
different the expected "refill-rate" derived from user inputs). For
33+
can have big implications for the actual rate limit (which can be quite
34+
different from the expected "refill-rate" derived from user inputs). For
3535
example, to have a 1000 IOPS limit on a virtio-blk device, users should
3636
be able to provide either of the following two options:
3737
`ops_size=1000,ops_refill_time=1000` or
@@ -53,5 +53,5 @@ demonstrates how to throttle the aggregate bandwidth of two disks to 10 MiB/s.
5353
```
5454
--disk path=disk0.raw,rate_limit_group=group0 \
5555
path=disk1.raw,rate_limit_group=group0 \
56-
--rate-limit-group bw_size=1048576,bw_refill_time,bw_refill_time=100
56+
--rate-limit-group bw_size=1048576,bw_refill_time=100
5757
```

docs/iommu.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ to increase the security regarding the memory accesses performed by the virtual
1515
devices (VIRTIO devices), on behalf of the guest drivers.
1616

1717
With a virtual IOMMU, the VMM stands between the guest driver and its device
18-
counterpart, validating and translating every address before to try accessing
18+
counterpart, validating and translating every address before trying accessing
1919
the guest memory. This is standard interposition that is performed here by the
2020
VMM.
2121

@@ -75,8 +75,8 @@ Not all devices support this extra option, and the default value will always
7575
be `off` since we want to avoid the performance impact for most users who don't
7676
need this.
7777

78-
Refer to the command line `--help` to find out which device support to be
79-
attached to the virtual IOMMU.
78+
Refer to the command line `--help` to find out which devices can be supported
79+
to be attached to the virtual IOMMU.
8080

8181
Below is a simple example exposing the `virtio-blk` device as attached to the
8282
virtual IOMMU:
@@ -128,7 +128,7 @@ When ACPI is disabled, virtual IOMMU is supported through Flattened Device Tree
128128
IOMMU-attached and which should not. No matter how many devices you attached to
129129
the virtual IOMMU by setting `iommu=on` option, all the devices on the PCI bus
130130
will be attached to the virtual IOMMU (except the IOMMU itself). Each of the
131-
devices will be added into a IOMMU group.
131+
devices will be added into an IOMMU group.
132132

133133
As a result, the directory content of `/sys/kernel/iommu_groups` would be:
134134

@@ -151,7 +151,7 @@ of requests need to be issued in order to create large mappings.
151151
One use case is even more impacted by the slowdown, the nested VFIO case. When
152152
passing a device through a L2 guest, the VFIO driver running in L1 will update
153153
the DMAR entries for the specific device. Because VFIO pins the entire guest
154-
memory, this means the entire mapping of the L2 guest need to be stored into
154+
memory, this means the entire mapping of the L2 guest needs to be stored into
155155
multiple 4k mappings. Obviously, the bigger the L2 guest RAM is, the longer the
156156
update of the mappings will last. There is an additional problem happening in
157157
this case, if the L2 guest RAM is quite large, it will require a large number
@@ -194,7 +194,7 @@ be consumed.
194194
### Nested usage
195195

196196
Let's now look at the specific example of nested virtualization. In order to
197-
reach optimized performances, the L2 guest also need to be mapped based on
197+
reach optimized performances, the L2 guest also needs to be mapped based on
198198
huge pages. Here is how to achieve this, assuming the physical device you are
199199
passing through is `0000:00:01.0`.
200200

docs/landlock.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ permissions.
1616

1717
## Host Setup
1818

19-
Landlock should be enabled in Host kernel to use it with cloud-hypervisor.
20-
Please following [Kernel-Support](https://docs.kernel.org/userspace-api/landlock.html#kernel-support) link to enable Landlock on Host kernel.
19+
Landlock should be enabled in host kernel to use it with cloud-hypervisor.
20+
Please follow [Kernel-Support](https://docs.kernel.org/userspace-api/landlock.html#kernel-support) link to enable Landlock on Host kernel.
2121

2222

23-
Landlock support can be checked with following command:
23+
Landlock support can be checked with the following command:
2424
```
2525
$ sudo dmesg | grep -w landlock
2626
[ 0.000000] landlock: Up and running.
@@ -30,8 +30,8 @@ Linux kernel confirms Landlock support with above message in dmesg.
3030
## Enable Landlock
3131

3232
At the time of enabling Landlock, Cloud-Hypervisor process needs the complete
33-
list of files it accesses over its lifetime. So, Landlock is enabled `vm_create`
34-
stage of guest boot.
33+
list of files it accesses over its lifetime. So, Landlock is enabled at the
34+
`vm_create` stage of guest boot.
3535

3636
### Command Line
3737
Append `--landlock` to Cloud-Hypervisor's command line to enable Landlock

docs/live_migration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ in Cloud Hypervisor:
66
1. local migration - migrating a VM from one Cloud Hypervisor instance to another on the same machine;
77
1. remote migration - migrating a VM between two machines;
88

9-
> :warning: These examples place sockets /tmp. This is done for
9+
> :warning: These examples place sockets in /tmp. This is done for
1010
> simplicity and should not be done in production.
1111
1212
## Local Migration (Suitable for Live Upgrade of VMM)

0 commit comments

Comments
 (0)