mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-07 09:41:30 +00:00
Randomness sourced from /dev/random which does not block once it has been seeded at bootup and you will always get something when you read from that file. This is true on Freebsd but unfortunately things are not the same on Linux. Most cases, you can't read anything from /dev/random especially on current acrn platform which lacking random events. virtio_rnd inherted from freebsd doesn't work anymore. This patch makes virtio_rnd working on Linux based SOS. It uses blocking IO to sevice the front-end random driver and delays the read operation into a new thread to avoid blocking the main notify thread. Signed-off-by: Jie Deng <jie.deng@intel.com> Reviewed-by: Shuo Liu <shuo.a.liu@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>