Provide an inter-guest system shared memory device
vdev shmem options
For a list of options available to all vdevs, see Common vdev options at the beginning of this chapter.
ARM and x86. Normally this device appears as a PCI device, but if the loc and intr options are specified, the guest will see it as a memory-mapped I/O (MMIO) device at the specified location.
You can use the allow and deny options to establish a list of shared memory regions the guest may and may not access.
The fnpattern argument for these options can use wildcards, with the same syntax as shell file name expansion. For example, specifying allow test* will allow the guest to create or attach to any shared memory region whose name begins with test. Similarly, deny live* will forbid the guest access to any shared memory region whose name begins with live.
If you use the allow option, the configuration will include an implicit deny* check at the end of the restrictions list. The guest will be denied access to all shared memory regions not specified by allow options. For example:
vdev shmem
allow test*
allow pluto
allows the guest to create or attach to any shared memory region whose name begins with test, as well as to the shared memory region called pluto. The guest is denied access to all other shared memory regions.
Conversely:
vdev shmem
deny live*
deny pluto
denies the guest access to any shared memory region whose name begins with live, as well as to the shared memory called pluto. The guest is allowed to attach to any other shared memory region, however.
Finally, you can use the allow and deny options together to specify exactly which shared memory regions a guest may or may not access. For example:
vdev shmem
deny pluto
allow pluto*
denies the guest access to a shared memory region called pluto, but allows it to connect to other shared memory regions whose names begin with pluto (e.g., plutoplanet).
For more information about using the shared memory vdev, see Memory sharing in the Using a QNX Hypervisor System chapter.
You can use the subst option to present the host with different names for shared memory regions for each guest, while presenting the same name to each guest so you can use the same executables in the different guests. For example, each guest might see a shared memory region called foomem, but the host would see these regions as guest0mem, guest1mem, etc.
The following VM configurations would produce the result presented above by substituting guest* for foo:
vdev shmem subst foo,guest0 create foomem,0xf0000 ...
vdev shmem subst foo,guest1 ...
An equivalent result could be achieved by simply adding the guest* prefix, as follows:
vdev shmem subst ,guest0 create mem,0xf0000 ...
vdev shmem subst ,guest1 ...