From f7f510ec195781c857ab76366a3e1c59e1caae42 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 30 May 2008 15:09:44 -0500 Subject: virtio: An entropy device, as suggested by hpa. Note that by itself, having a "hardware" random generator does very little: you should probably run "rngd" in your guest to feed this into the kernel entropy pool. Included: virtio_rng: dont use vmalloced addresses for virtio If virtio_rng is build as a module, random_data is an address in vmalloc space. As virtio expects guest real addresses, this can cause any kind of funny behaviour, so lets allocate random_data dynamically with kmalloc. Signed-off-by: Christian Borntraeger Signed-off-by: Rusty Russell --- include/linux/virtio_rng.h | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 include/linux/virtio_rng.h (limited to 'include/linux/virtio_rng.h') diff --git a/include/linux/virtio_rng.h b/include/linux/virtio_rng.h new file mode 100644 index 000000000000..331afb6c9f62 --- /dev/null +++ b/include/linux/virtio_rng.h @@ -0,0 +1,8 @@ +#ifndef _LINUX_VIRTIO_RNG_H +#define _LINUX_VIRTIO_RNG_H +#include + +/* The ID for virtio_rng */ +#define VIRTIO_ID_RNG 4 + +#endif /* _LINUX_VIRTIO_RNG_H */ -- cgit v1.2.3