mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-01 11:55:25 +00:00
Changing the folder structure will cause too many broken links for external references (from other sites). So, let's put the content back where it was before the reorg, and instead use the new persona-based navigation to point to documents in the original locations. Also, introduce redirects for some documents that no longer exits. Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
38 lines
1.2 KiB
ReStructuredText
38 lines
1.2 KiB
ReStructuredText
.. _virtio-rnd:
|
|
|
|
Virtio-rnd
|
|
##########
|
|
|
|
virtio-rnd provides a hardware random source for UOS. The
|
|
virtual random device is based on virtio user mode framework and
|
|
simulates a PCI device based on virtio specification.
|
|
|
|
:numref:`virtio-rnd-arch` shows the Random Device Virtualization
|
|
Architecture in ACRN. virtio-rnd is implemented as a virtio legacy
|
|
device in the ACRN device model (DM), and is registered as a PCI virtio
|
|
device to the guest OS (UOS).
|
|
|
|
When the FE driver requires some random bytes, the BE device will place
|
|
bytes of random data onto the virtqueue.
|
|
|
|
Tools such as ``od`` can be used to read randomness from
|
|
``/dev/random``. This device file in UOS is bound with frontend
|
|
virtio-rng driver (The guest kernel must be built with
|
|
``CONFIG_HW_RANDOM_VIRTIO=y``). The backend virtio-rnd reads the HW
|
|
randomness from ``/dev/random`` in SOS and sends them to frontend.
|
|
|
|
.. figure:: images/virtio-hld-image61.png
|
|
:align: center
|
|
:name: virtio-rnd-arch
|
|
|
|
Virtio-rnd Architecture on ACRN
|
|
|
|
To launch the virtio-rnd device, use the following virtio command::
|
|
|
|
-s <slot>,virtio-rnd
|
|
|
|
To verify the correctness in user OS, use the following
|
|
command::
|
|
|
|
od /dev/random
|