stratovirt/docs-fix-some-statement.patch
Jie Yang 2d9d03c21a Update version to 2.0.0-6
Signed-off-by: Jie Yang <yangjieyj.yang@huawei.com>
(cherry picked from commit 6158eab66897bf7fb11ce7ae8c3b568f8de0e2dd)
2021-08-30 21:19:11 +08:00

228 lines
10 KiB
Diff

From aeede83c9a6a4b07aee477b67d763561a3f342e6 Mon Sep 17 00:00:00 2001
From: Ming Yang <yangming73@huawei.com>
Date: Wed, 18 Aug 2021 18:44:39 +0800
Subject: [PATCH 01/10] docs: fix some statement
Signed-off-by: Ming Yang <yangming73@huawei.com>
---
docs/config_guidebook.md | 32 ++++++++++++++++---------------
docs/interconnect_with_libvirt.md | 8 ++++----
docs/stratovirt_aarch64.xml | 10 +++++-----
docs/stratovirt_x86.xml | 12 ++++++------
4 files changed, 32 insertions(+), 30 deletions(-)
diff --git a/docs/config_guidebook.md b/docs/config_guidebook.md
index 72b4c7e..e1279e1 100644
--- a/docs/config_guidebook.md
+++ b/docs/config_guidebook.md
@@ -148,7 +148,7 @@ There is only one argument for iothread:
Virtio block device is a virtual block device, which process read and write requests in virtio queue from guest.
-Eight properties are supported for virtio block device.
+Nine properties are supported for virtio block device.
* drive_id: unique device-id in StratoVirt.
* path_on_host: the path of block device in host.
@@ -156,7 +156,8 @@ Eight properties are supported for virtio block device.
* read_only: whether virtio block device is read-only. If not set, default is false.
* direct: open block device with `O_DIRECT` mode. If not set, default is true.
* iothread: indicate which iothread will be used, if not specified the main thread will be used. (optional)
-* iops: used to limit IO operations for block device. (optional)
+* throttling.iops-total: used to limit IO operations for block device. (optional)
+* if: drive type, for block drive, it should be `none`. If not set, default is `none` (optional)
* format: the format of block image, default value `raw`. NB: currently only `raw` is supported. (optional)
If not set, default is raw.
@@ -170,11 +171,11 @@ If you want to boot VM with a virtio block device as rootfs, you should add `roo
```shell
# virtio mmio block device.
--drive id=drive_id,file=path_on_host[,serial=serial_num,readonly=off,direct=off]
--device virtio-blk-device,drive=drive_id[,iothread=iothread1,iops=200]
+-drive id=drive_id,file=path_on_host[,serial=serial_num,readonly=off,direct=off,throttling.iops-total=200]
+-device virtio-blk-device,drive=drive_id[,iothread=iothread1]
# virtio pci block device.
--drive id=drive_id,file=path_on_host[,serial=serial_num,readonly=off,direct=off]
--device virtio-blk-pci,drive=drive_id,bus=pcie.0,addr=0x3.0x0[,iothread=iothread1,iops=200]
+-drive id=drive_id,file=path_on_host[,serial=serial_num,readonly=off,direct=off,throttling.iops-total=200]
+-device virtio-blk-pci,drive=drive_id,bus=pcie.0,addr=0x3.0x0[,iothread=iothread1]
```
@@ -207,11 +208,11 @@ is a single function device, the function number should be set to zero.
```shell
# virtio mmio net device
--netdev tap,id=netdevid,ifname=host_dev_name[,mac=12:34:56:78:9A:BC]
--device virtio-net-device,netdev=netdevid,id=netid[,iothread=iothread1]
+-netdev tap,id=netdevid,ifname=host_dev_name
+-device virtio-net-device,netdev=netdevid,id=netid[,iothread=iothread1,mac=12:34:56:78:9A:BC]
# virtio pci net device
--netdev tap,id=netdevid,ifname=host_dev_name[,mac=12:34:56:78:9A:BC]
--device virtio-net-pci,netdev=netdevid,id=netid,bus=pcie.0,addr=0x2.0x0[,iothread=iothread1]
+-netdev tap,id=netdevid,ifname=host_dev_name
+-device virtio-net-pci,netdev=netdevid,id=netid,bus=pcie.0,addr=0x2.0x0[,iothread=iothread1,mac=12:34:56:78:9A:BC]
```
StratoVirt also supports vhost-net to get a higher performance in network. It can be set by
@@ -222,11 +223,11 @@ given when `vhost=on`, StratoVirt gets it by opening "/dev/vhost-net" automatica
```shell
# virtio mmio net device
--netdev tap,id=netdevid,ifname=host_dev_name,vhost=on[,mac=12:34:56:78:9A:BC,vhostfd=2]
--device virtio-net-device,netdev=netdevid,id=netid[,iothread=iothread1]
+-netdev tap,id=netdevid,ifname=host_dev_name,vhost=on[,vhostfd=2]
+-device virtio-net-device,netdev=netdevid,id=netid[,iothread=iothread1,mac=12:34:56:78:9A:BC]
# virtio pci net device
--netdev tap,id=netdevid,ifname=host_dev_name,vhost=on[,mac=12:34:56:78:9A:BC,vhostfd=2]
--device virtio-net-pci,netdev=netdevid,id=netid,bus=pcie.0,addr=0x2.0x0[,iothread=iothread1]
+-netdev tap,id=netdevid,ifname=host_dev_name,vhost=on[,vhostfd=2]
+-device virtio-net-pci,netdev=netdevid,id=netid,bus=pcie.0,addr=0x2.0x0[,iothread=iothread1,mac=12:34:56:78:9A:BC]
```
*How to set a tap device?*
@@ -290,10 +291,11 @@ If you want use it, need:
And `modprobe vhost_vsock` in the host.
-Two properties can be set for virtio vsock device.
+Three properties can be set for virtio vsock device.
* vsock_id: unique device-id in StratoVirt.
* guest_cid: a unique Context-ID in host to each guest, it should satisfy `3<=guest_cid<u32:MAX`.
+* vhostfd: fd of vsock device. (optional).
For vhost-vsock-pci, two more properties are required.
* bus: name of bus which to attach.
diff --git a/docs/interconnect_with_libvirt.md b/docs/interconnect_with_libvirt.md
index d5205ed..2dee64b 100644
--- a/docs/interconnect_with_libvirt.md
+++ b/docs/interconnect_with_libvirt.md
@@ -34,7 +34,7 @@ Optional value of `arch` are: `aarch64` and `x86_64`. On X86 platform, supported
`/path/to/standard_vm_kernel` is the path of standard vm kernel.
```
<kernel>/path/to/standard_vm_kernel</kernel>
-<cmdline>console=ttys0 root=/dev/vda reboot=k panic=1 rw</cmdline>
+<cmdline>console=ttyS0 root=/dev/vda reboot=k panic=1 rw</cmdline>
```
- feature:
@@ -77,7 +77,7 @@ Pflash can be added by the following config.
`/path/to/pflash` is the path of pflash file.
```
<loader readonly='yes' type='pflash'>/path/to/pflash</loader>
-<nvram template='/path/to/OVMF_VARS'/>/path/to/OVMF_VARS</nvram>
+<nvram template='/path/to/OVMF_VARS'>/path/to/OVMF_VARS</nvram>
```
- iothread
@@ -144,7 +144,7 @@ To use `virsh console` command, the virtio console with redirect `pty` should be
<controller type='pci' index='5' model='pcie-root-port' />
<rng model='virtio'>
<rate period='1000' bytes='1234'/>
- <backend model='random'>/dev/random</backend>
+ <backend model='random'>/path/to/random_file</backend>
<address type='pci' domain='0x000' bus='0x05' slot='0x00' function='0x00'/>
</rng>
```
@@ -153,7 +153,7 @@ To use `virsh console` command, the virtio console with redirect `pty` should be
```
<controller type='pci' index='7' model='pcie-root-port' />
-<hostdev model='subsystem' type='pci' managed='yes'>
+<hostdev mode='subsystem' type='pci' managed='yes'>
<driver name='vfio'/>
<source>
<address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
diff --git a/docs/stratovirt_aarch64.xml b/docs/stratovirt_aarch64.xml
index 9bbf8d2..fa37d2b 100644
--- a/docs/stratovirt_aarch64.xml
+++ b/docs/stratovirt_aarch64.xml
@@ -13,7 +13,7 @@
<os>
<type arch='aarch64' machine='virt'>hvm</type>
<kernel>/path/to/standard_vm_kernel</kernel>
- <cmdline>console=ttys0 root=/dev/vda reboot=k panic=1 rw</cmdline>
+ <cmdline>console=ttyAMA0 root=/dev/vda reboot=k panic=1 rw</cmdline>
<loader readonly='yes' type='pflash'>/path/to/pflash</loader>
</os>
<features>
@@ -24,8 +24,8 @@
<emulator>/path/to/StratoVirt_binary_file</emulator>
<controller type='pci' index='0' model='pcie-root'/>
<!-- block -->
- <disk type='file' device='disk' iothread='1'>
- <driver name='qemu' type='raw'/>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='raw' iothread='1'/>
<source file='/path/to/rootfs'/>
<target dev='hda' bus='virtio'/>
<address type='pci' domain='0x000' bus='0x00' slot='0x01' function='0x00'/>
@@ -58,7 +58,7 @@
<!-- rng -->
<rng model='virtio'>
<rate period='1000' bytes='1234'/>
- <backend model='random'>/dev/random</backend>
+ <backend model='random'>/path/to/random_file</backend>
<address type='pci' domain='0x000' bus='0x00' slot='0x05' function='0x00'/>
</rng>
<!-- vsock -->
@@ -67,7 +67,7 @@
<address type='pci' domain='0x000' bus='0x00' slot='0x06' function='0x00'/>
</vsock>
<!-- vfio -->
- <hostdev model='subsystem' type='pci' managed='yes'>
+ <hostdev mode='subsystem' type='pci' managed='yes'>
<driver name='vfio'/>
<source>
<address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
diff --git a/docs/stratovirt_x86.xml b/docs/stratovirt_x86.xml
index b561a5f..68069c0 100644
--- a/docs/stratovirt_x86.xml
+++ b/docs/stratovirt_x86.xml
@@ -13,9 +13,9 @@
<os>
<type arch='x86_64' machine='q35'>hvm</type>
<kernel>/path/to/standard_vm_kernel</kernel>
- <cmdline>console=ttys0 root=/dev/vda reboot=k panic=1 rw</cmdline>
+ <cmdline>console=hvc0 root=/dev/vda reboot=k panic=1 rw</cmdline>
<loader readonly='yes' type='pflash'>/path/to/pflash</loader>
- <nvram template='/path/to/OVMF_VARS'/>/path/to/OVMF_VARS</nvram>
+ <nvram template='/path/to/OVMF_VARS'>/path/to/OVMF_VARS</nvram>
</os>
<features>
<acpi/>
@@ -32,8 +32,8 @@
<controller type='pci' index='6' model='pcie-root-port' />
<controller type='pci' index='7' model='pcie-root-port' />
<!-- block -->
- <disk type='file' device='disk' iothread='1'>
- <driver name='qemu' type='raw'/>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='raw' iothread='1'/>
<source file='/path/to/rootfs'/>
<target dev='hda' bus='virtio'/>
<iotune>
@@ -66,7 +66,7 @@
<!-- rng -->
<rng model='virtio'>
<rate period='1000' bytes='1234'/>
- <backend model='random'>/dev/random</backend>
+ <backend model='random'>/path/to/random_file</backend>
<address type='pci' domain='0x000' bus='0x05' slot='0x00' function='0x00'/>
</rng>
<!-- vsock -->
@@ -75,7 +75,7 @@
<address type='pci' domain='0x000' bus='0x06' slot='0x00' function='0x00'/>
</vsock>
<!-- vfio -->
- <hostdev model='subsystem' type='pci' managed='yes'>
+ <hostdev mode='subsystem' type='pci' managed='yes'>
<driver name='vfio'/>
<source>
<address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
--
2.25.1