Displaying 2 results from an estimated 2 matches for "setup_rng".
Did you mean:
setup_ring
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 2/13] [Mostly resend] virtio additions
...adv() call uses them, and so
+ * it reads straight into the Guest's buffer. */
+ len = readv(dev->fd, iov, in_num);
+ /* Tell the Guest about the new input. */
+ add_used_and_trigger(fd, dev->vq, head, len);
+
+ /* Everything went OK! */
+ return true;
+}
+
+static void setup_rng(void)
+{
+ struct device *dev;
+ int fd;
+
+ fd = open_or_die("/dev/urandom", O_RDONLY);
+
+ /* The device responds to return from I/O thread. */
+ dev = new_device("rng", VIRTIO_ID_RNG, fd, handle_rng_input);
+
+ /* The device has one virtqueue, where the Gues...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 2/13] [Mostly resend] virtio additions
...adv() call uses them, and so
+ * it reads straight into the Guest's buffer. */
+ len = readv(dev->fd, iov, in_num);
+ /* Tell the Guest about the new input. */
+ add_used_and_trigger(fd, dev->vq, head, len);
+
+ /* Everything went OK! */
+ return true;
+}
+
+static void setup_rng(void)
+{
+ struct device *dev;
+ int fd;
+
+ fd = open_or_die("/dev/urandom", O_RDONLY);
+
+ /* The device responds to return from I/O thread. */
+ dev = new_device("rng", VIRTIO_ID_RNG, fd, handle_rng_input);
+
+ /* The device has one virtqueue, where the Gues...