mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-19 12:12:16 +00:00
doc: update the 'ivshmem' HLD
Update the 'ivshmem' document to clarify the existence of two similar mechanisms to expose this device to User VMs. One is implemented in the ACRN Device Model and another (future) is implemented in the hypervisor. Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
This commit is contained in:
parent
7c7bf767f6
commit
5d08f2518f
BIN
doc/developer-guides/hld/images/ivshmem-architecture.png
Normal file
BIN
doc/developer-guides/hld/images/ivshmem-architecture.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 85 KiB |
Binary file not shown.
Before Width: | Height: | Size: 39 KiB |
@ -4,14 +4,14 @@ ACRN Shared Memory Based Inter-VM Communication
|
|||||||
###############################################
|
###############################################
|
||||||
|
|
||||||
ACRN supports inter-virtual machine communication based on a shared
|
ACRN supports inter-virtual machine communication based on a shared
|
||||||
memory mechanism, The ACRN device model and hypervisor emulate a virtual
|
memory mechanism. The ACRN device model or hypervisor emulate a virtual
|
||||||
PCI device (called an ``ivshmem`` device) to expose the base address and
|
PCI device (called an ``ivshmem`` device) to expose the base address and
|
||||||
size of this shared memory.
|
size of this shared memory.
|
||||||
|
|
||||||
Inter-VM Communication Overview
|
Inter-VM Communication Overview
|
||||||
*******************************
|
*******************************
|
||||||
|
|
||||||
.. figure:: images/ivshmem-image1.png
|
.. figure:: images/ivshmem-architecture.png
|
||||||
:align: center
|
:align: center
|
||||||
:name: ivshmem-architecture-overview
|
:name: ivshmem-architecture-overview
|
||||||
|
|
||||||
@ -27,15 +27,19 @@ VMs.
|
|||||||
memory regions reserved in the hypervisor's memory space. This solution
|
memory regions reserved in the hypervisor's memory space. This solution
|
||||||
would work for both pre-launched and post-launched VMs.
|
would work for both pre-launched and post-launched VMs.
|
||||||
|
|
||||||
|
|
||||||
ivshmem hv:
|
ivshmem hv:
|
||||||
The ivshmem device model implements register virtualization
|
The **ivshmem hv** implements register virtualization
|
||||||
and shared memory mapping in the hypervisor (not the acrn-dm).
|
and shared memory mapping in the ACRN hypervisor.
|
||||||
Will support notification/interrupt mechanism in the future.
|
It will support notification/interrupt mechanism in the future.
|
||||||
|
|
||||||
|
ivshmem dm:
|
||||||
|
The **ivshmem dm** implements register virtualization
|
||||||
|
and shared memory mapping in the ACRN Device Model (``acrn-dm``).
|
||||||
|
It will support notification/interrupt mechanism in the future.
|
||||||
|
|
||||||
ivshmem server:
|
ivshmem server:
|
||||||
A daemon for inter-VM notification capability,
|
A daemon for inter-VM notification capability, that will work with **ivshmem
|
||||||
This is currently **not implemented**, so the inter-VM communication
|
dm**. This is currently **not implemented**, so the inter-VM communication
|
||||||
doesn't support a notification mechanism.
|
doesn't support a notification mechanism.
|
||||||
|
|
||||||
Ivshmem Device Introduction
|
Ivshmem Device Introduction
|
||||||
@ -96,7 +100,7 @@ Usage
|
|||||||
*****
|
*****
|
||||||
|
|
||||||
To support two post-launched VMs communicating via an ``ivshmem`` device,
|
To support two post-launched VMs communicating via an ``ivshmem`` device,
|
||||||
add this line as an acrn-dm boot parameter::
|
add this line as an ``acrn-dm`` boot parameter::
|
||||||
|
|
||||||
-s slot,ivshmem,shm_name,shm_size
|
-s slot,ivshmem,shm_name,shm_size
|
||||||
|
|
||||||
@ -112,6 +116,7 @@ where
|
|||||||
- ``shm_size`` - Specify a shared memory size. The two communicating
|
- ``shm_size`` - Specify a shared memory size. The two communicating
|
||||||
VMs must define the same size.
|
VMs must define the same size.
|
||||||
|
|
||||||
|
.. note:: This device can be used with Real-Time VM (RTVM) as well.
|
||||||
|
|
||||||
Inter-VM Communication Example
|
Inter-VM Communication Example
|
||||||
******************************
|
******************************
|
||||||
@ -119,6 +124,8 @@ Inter-VM Communication Example
|
|||||||
The following example uses inter-vm communication between two Linux-based post-launched VMs (VM1 and
|
The following example uses inter-vm communication between two Linux-based post-launched VMs (VM1 and
|
||||||
VM2).
|
VM2).
|
||||||
|
|
||||||
|
.. note:: An ``ivshmem`` Windows driver exists and can be found `here <https://github.com/virtio-win/kvm-guest-drivers-windows/tree/master/ivshmem>`_
|
||||||
|
|
||||||
1. Add a new virtual PCI device for both VMs: the device type is
|
1. Add a new virtual PCI device for both VMs: the device type is
|
||||||
``ivshmem``, shared memory name is ``test`` and shared memory size is
|
``ivshmem``, shared memory name is ``test`` and shared memory size is
|
||||||
4096 bytes. Both VMs must have the same shared memory name and size:
|
4096 bytes. Both VMs must have the same shared memory name and size:
|
||||||
|
Loading…
Reference in New Issue
Block a user