docs: fix syntax issues and struct description in devices

Some description in the device document were inconsistent with the
source code. Also fix some syntax issues to make the sentences more
fluent.

Signed-off-by: Yi Wang <foxywang@tencent.com>
This commit is contained in:
Yi Wang
2026-01-06 19:46:25 +08:00
committed by Rob Bradford
parent 34ee973ee0
commit 7b92a36c4c
8 changed files with 59 additions and 59 deletions

View File

@@ -5,7 +5,7 @@ region between a guest and the host. In order for all guests to be able to
pick up the shared memory area, it is modeled as a PCI device exposing said
memory to the guest as a PCI BAR.
Device Specification is
Device Specification is available
at https://www.qemu.org/docs/master/specs/ivshmem-spec.html.
Now we support setting a backend file to share data between host and guest.
@@ -16,9 +16,10 @@ supported yet.
`--ivshmem`, an optional argument, can be passed to enable ivshmem device.
This argument takes a file as a `path` value and a file size as a `size` value.
The `size` value must be 2^n.
```
--ivshmem <ivshmem> device backend file "path=</path/to/a/file>,size=<file_size/must=2^n>";
--ivshmem <ivshmem> device backend file "path=</path/to/a/file>,size=<file_size>"
```
## Example
@@ -41,11 +42,11 @@ Start application to mmap the file data to a memory region:
--ivshmem path=/tmp/ivshmem.data,size=1M
```
Insmod a ivshmem device driver to enable the device. The file data will be
Insmod an ivshmem device driver to enable the device. The file data will be
mmapped to the PCI `bar2` of ivshmem device,
guest can r/w data by accessing this memory.
A simple example of ivshmem driver can get from:
A simple example of ivshmem driver can be obtained from:
https://github.com/lisongqian/clh-linux/commits/ch-6.12.8-ivshmem
The host process can r/w this data by remmaping the `/tmp/ivshmem.data`.
The host process can r/w this data by remapping the `/tmp/ivshmem.data`.